Skip to content

Instantly share code, notes, and snippets.

@kblake
kblake / 0_reuse_code.js
Created January 30, 2014 19:04
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@kblake
kblake / rules.md
Created February 4, 2013 22:43 — forked from henrik/rules.md
  1. Your class can be no longer than 100 lines of code.
  2. Your methods can be no longer than five lines of code.
  3. You can pass no more than four parameters and you can’t just make it one big hash.
  4. When a call comes into your Rails controller, you can only instantiate one object to do whatever it is that needs to be done.

You can break these rules if you can talk your pair into agreeing with you.

@kblake
kblake / mountain-lion-brew-setup.markdown
Created July 13, 2012 23:21 — forked from myobie/mountain-lion-brew-setup.markdown
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from http://developer.apple.com. You will not be able to submit apps to any stores using this XCode version, so turn away if that is something you might want to do.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

@kblake
kblake / postsql.sql
Created May 17, 2012 19:52 — forked from tobyhede/postsql.sql
PostgreSQL as JSON Document Store
-- PostgreSQL 9.2 beta (for the new JSON datatype)
-- You can actually use an earlier version and a TEXT type too
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8
-- JSON Types need to be mapped into corresponding PG types
--
-- Number => INT or DOUBLE PRECISION
-- String => TEXT
@kblake
kblake / gist:1810854
Created February 12, 2012 21:08 — forked from maxim/gist:1810525
>> foo = proc { bar }
=> #<Proc:0x0000000101c444b8@(pry):1>
>> foo.call
NameError: undefined local variable or method `bar' for #<Object:0x1001dc288>
from (pry):1
>> def bar
>> "bar"
>> end
@kblake
kblake / about.md
Created August 11, 2011 05:45 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer