Skip to content

Instantly share code, notes, and snippets.

View russplaysguitar's full-sized avatar

Russ russplaysguitar

View GitHub Profile

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@russplaysguitar
russplaysguitar / gist:3259915
Created August 4, 2012 21:03
Turn a Coldfusion Struct into an "object" using _.bindAll()
/*
This is an example of one way to use _.bindAll from the Underscore.cfc library: http://russplaysguitar.github.com/UnderscoreCF/#bindAll
Normally, you wouldn't be able to access other keys in the same struct using "this", but _.bindAll() lets us!
*/
_ = new Underscore();
exampleStruct = {
greeting: 'Hello, World!',
@russplaysguitar
russplaysguitar / Application.cfc
Created January 5, 2012 08:23
A generalized "pass-through" from cfscript to any cf tag
<cfcomponent
output="false"
hint="I define the application settings and event handlers.">
<!--- Define the application. --->
<cfset this.name = hash( getCurrentTemplatePath() ) />
<cfset this.applicationTimeout = createTimeSpan( 0, 0, 0, 30 ) />
<!---
Create a mapping to the virtual file system so that we
@webRat
webRat / git_commands
Created June 23, 2011 02:38
9 Common Git Commands
git init - navigate to the appropriate directory and just type that.
git add . - adds everything in that path
git commit -m 'stuff' - Commits with the message 'stuff'
git branch - views branches
git checkout -b <new branch> - Creates & switches to new branch
git checkout <branch> - switches to branch
git merge <branch> - merges that branch to the existing branch that you're already in.
git branch -d <branch> - deletes branch
git push - This assumes you already have a remote setup (like github)