This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # by mark burns | |
| brew install sl; echo "alias ls='sl'" >> ~/.bash_profile && source ~/.bash_profile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # keith.rb | |
| class << Time | |
| # The only two times of the day that matter to Keith! | |
| def now | |
| ["Bounce 'o' clock", "Tuna 'o' clock"].sample | |
| end | |
| end | |
| class String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| If builds of PostgreSQL 9 are failing and you have version 8.x installed, | |
| you may need to remove the previous version first. See: | |
| https://github.com/mxcl/homebrew/issues/issue/2510 | |
| To build plpython against a specific Python, set PYTHON prior to brewing: | |
| PYTHON=/usr/local/bin/python brew install postgresql | |
| See: | |
| http://www.postgresql.org/docs/9.0/static/install-procedure.html | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Enumerable = function() { | |
| this.map = function(func, i, m) { | |
| var idx = i || 0 | |
| var mem = m || [] | |
| if(this.length != idx) { | |
| return this.map(func, idx+1, mem.concat(func(this[idx]))) | |
| } else { | |
| return mem | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| div#content h2 img { | |
| float: left; | |
| margin-right: 3px; | |
| } | |
| div.comment { | |
| min-height:94px; | |
| padding-bottom: 10px !important; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "_id": "_design/example", | |
| "_rev": "8-9dfbf79df2f15317ef69e37e0a70a704", | |
| "validate_doc_update": "function(newDoc,oldDoc,user) { | |
| function require(prop, message) { | |
| message = message || prop + 'is required' | |
| if(!newDoc[prop]) throw({'forbidden': message }) | |
| } | |
| require('title') | |
| require('body') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Array.prototype.map = function(func) { | |
| var output = [] | |
| for(i=0; i < this.length; i++) { | |
| output[i] = func(this[i]) | |
| } | |
| return output | |
| } | |
| // Example usage: | |
| // [1,2,3].map(function(i) { return i * i }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class IVRMenuController | |
| respond_to :voice | |
| def index | |
| case params['Digits'] | |
| when '1' then render :template => 'directions' | |
| when '2' then render :template => 'opening_hours' | |
| when '3' then render :template => 'special_offers' | |
| else render :template => 'welcome' | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Gchart.instance_eval { def url; 'https://chart.googleapis.com/chart?' end } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| call.url = 'http://example.com/im_in_ur_appz_redirectin_ur_callz' |