What Up Derek?

  • Archive
  • RSS
  • Ask me anything

mynt - Python-powered static site generator

thechangelog:

There’s no shortage of static site generators lately, but most are very blog-focused. Mynt from Andrew Fricke aims to deliver true CMS flexibility in a Python package. Mynt supports custom date and tag-based archives, Jinja templates, Markdown posts, and YAML front matter.

Check out the nicely done docs site for usage and options, or drop into #mynt on IRC.

Source: thechangelog

  • 3 days ago > thechangelog
  • 4
  • Permalink
  • Share
    Tweet

New Smarty Plugin - Attr

Hey,

Created a new Smarty plugin that makes it easy to add attributes to html elements based on properties of an object.

attr

This attr function is meant to shorten the syntax used to set various html attributes more specifically the class attribute. It was inspired by the bindAttr helper in ember.js. You provide a target object and that is used to grab properties from. If the value passed in for the attribute is a property on the target the value of that property is returned. If it is not a valid property then the string literal will be used instead.

When dealing with a class attribute it acts a little differently. First of all you can pass in a space delimited list of property names or values. If the property is a boolean it will dashize the property name some_bool => is-some_bool. If you don’t want that you can pass in an alternate value for when the bool is true some_bool:this-was-true => this-was-true. If the bool is false the class won’t be added to the attribute.

# Sample object
$obj->active     = true;
$obj->title      = 'Whaddup';
$obj->status     = 'pending';
$obj->public_url = 'http://example.com';

template file

{attr target=$obj class="active active:this-is-active status crap" href="public_url"}
> class="is-active this-is-active pending" href="http://example.com"

Options

There are a few options you can pass in to customize the output of the generated attributes string.

enclose

default: “

{attr target=$obj class="active" enclose="'"}
> class='is-active'

delimiter

default: ” ” (single space)

{attr target=$obj class="active" href="public_url" delimiter="\n"}
> class="is-active"\nhref="http://example.com"

sort

default: false

{attr target=$obj href="public_url" class="active" sort=true}
> class="is-active" href="http://example.com"

Check out the github repo to download it and provide any feedback. Thanks!

    • #smarty
    • #php
    • #html
    • #templates
    • #frontend
  • 6 days ago
  • 1
  • Permalink
  • Share
    Tweet
View Separately

Source: britefutures

  • 1 month ago > britefutures
  • 64
  • Permalink
  • Share
    Tweet
  • damiano.braga: SHIT
  • damiano.braga: they didnt let me close my account
  • damiano.braga: because i use the debit card today
  • damiano.braga: that's bulsshit
  • damiano.braga: bullshit
  • Derek Reynolds: what the fuuuuuck
  • Derek Reynolds: that's dumb
  • Derek Reynolds: did you kill them?
  • damiano.braga: no i was polite
  • damiano.braga: i just spit on the table
  • 1 month ago
  • Permalink
  • Share
    Tweet
View Separately

(via ihatemyparents)

Source: ponycamp

  • 1 month ago > ponycamp
  • 35511
  • Permalink
  • Share
    Tweet
View Separately

(via ihatemyparents)

Source: dayofthedreamweavers

  • 2 months ago > dayofthedreamweavers
  • 1755
  • Permalink
  • Share
    Tweet

Moved to San Francisco and no longer need my car. Looking to sell a 2011 Ford Fiesta w/ very low mileage. I’ve owned it for a little over a year now, and have taken really great care of it. I love this car, and am bummed to be getting rid of it, but my loss is your gain.

Specs

  • make: Ford
  • model: Fiesta
  • year: 2011
  • color: Black
  • miles: 13,000
  • transmission: manual 5 speed
  • Front-wheel drive.

Features

  • Microsoft Sync
    • Play music via blue tooth from your phone (this is my favorite feature).
    • Voice operated commands (answer phone, make calls, play music).
    • Turn by Turn GPS.
  • Plug in a USB device to play music from.
  • CD Player.
  • AM/FM Radio.
  • Two power sockets.
  • 5 cup holders.
  • Power Locks/Windows.
  • Lots of trunk space.
  • Display how many miles until empty.
  • Display mpg/average speed.

Notes

  • Have never spilled anything in the car.
  • Rarely brought fast food in it.
  • There is minor damage on the front bumper from someone backing in to it while parked.
  • I have most if not all maintenance documents.
  • Passed smog test.
  • Have had no mechanical issues/failures.

PRICE

$14,500 OBO

More Photos: https://picasaweb.google.com/111866066735022395763/FordFiesta2011?authuser=0&authkey=Gv1sRgCP2b4sv764qziwE&feat=directlink

As noted above I’m in San Francisco now so my mom will be helping me out with showing the car to anyone interested.

If you have any questions about the car or want to schedule a time to check it out feel free to email or call 949 407 8125.

Thanks!

Derek

    • #car
    • #ford
    • #fiesta
    • #buy
    • #for sale
  • 2 months ago
  • 7
  • Permalink
  • Share
    Tweet

Put Display to Sleep With Alfred

Buh-Bye is an Alfred extension that allows you to put your display to sleep.

You’ll need 2 things for this to work:

  1. Set your top-left hot corner to put the display to sleep. Hot Corner
  2. And the Alfred Powerpack.

Install the plugin by double clicking the icon. Invoke by typing bye.

Action Shot

It works by executing an apple script originally found at http://hints.macworld.com/article.php?story=20100418152304108.

    • #alfred
    • #tip
    • #osx
    • #mac
  • 3 months ago
  • 26
  • Permalink
  • Share
    Tweet
britefutures:

Just putting this here so when I look back at the archives, I’ll know today we lost an amazing man. RIP Steve. 
View Separately

britefutures:

Just putting this here so when I look back at the archives, I’ll know today we lost an amazing man. RIP Steve. 

Source: britefutures

  • 3 months ago > britefutures
  • 30
  • Permalink
  • Share
    Tweet
robsheridan:


I knew it!
Pop-upView Separately

robsheridan:

I knew it!

(via fascinated)

Source: lovelypixel

    • #OH GOD
    • #gaming
    • #humor
  • 3 months ago > lovelypixel
  • 3553
  • Permalink
  • Share
    Tweet
← Newer • Older →
Page 1 of 48

About

Pages

  • Resume
  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr