Skip to content

Instantly share code, notes, and snippets.

View tdelam's full-sized avatar

Trevor Delamorandiere tdelam

View GitHub Profile
@tdelam
tdelam / controller.rb
Created March 15, 2012 14:08 — forked from nicinabox/controller.rb
Setting i18n translations in Refinery
# In a controller
# This is not necessary when using the view code below
::I18n.locale = params[:locale]
@tdelam
tdelam / osx_lion_rail_setup.md
Created March 17, 2012 18:01 — forked from jpantuso/osx_lion_rail_setup.md
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, rails, and MySQL
@tdelam
tdelam / fabfile.py
Created April 20, 2012 15:56 — forked from fiee/fabfile.py
fabric fabfile.py for deployment of django apps on Debian servers
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
fabfile for Django
------------------
see http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p/
modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle)
several additions, corrections and customizations, too
@tdelam
tdelam / promises.md
Last active August 29, 2015 14:24 — forked from domenic/promises.md

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.