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 Foo | |
| def destroy | |
| puts "destroyed!" | |
| end | |
| end | |
| class Bar < Foo | |
| private :destroy |
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.join = function(val) { var res = ""; var sep = (val === undefined)?"\0":val; this.forEach(function(el){ res+= el.toString() + sep }); return res.slice(0, -1*sep.length);} |
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
| ruby-1.9.3-p194 is not installed. | |
| To install do: 'rvm install ruby-1.9.3-p194' | |
| Running /Users/aurelian/.rvm/hooks/after_cd | |
| belgorod /Projects/Code/october(master) $ ruby -v | |
| ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin10.8.0] | |
| belgorod /Projects/Code/october(master) $ cat .rvmrc | |
| rvm use 1.9.3 |
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
| <form action="http://localhost:8199/search?done=1" method="get"> | |
| <input name="q"> | |
| <button>go | |
| </form> |
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
| # vi mode | |
| setw -g mode-keys vi | |
| # prefix to ctrl-a | |
| unbind C-b | |
| set -g prefix C-a | |
| # split horizontally with | | |
| # and vertically with - | |
| unbind % |
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
| # shell: bash-version 3.2.39 | |
| # .bash_profile | |
| export EDITOR=vim | |
| if [ -f ~/.bashrc ]; then | |
| . ~/.bashrc | |
| fi |
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 [[ -s "~/.rvm/environments/ruby-1.9.2-p180@mygemset" ]] ; then | |
| . "~/.rvm/environments/ruby-1.9.2-p180@mygemset" | |
| else | |
| rvm --create use "ruby-1.9.2-p180@mygemset" 1> /dev/null | |
| fi | |
| if ! which bundle 1>/dev/null ; then | |
| rvm gemset import mygemset.gems | |
| fi |
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
| # Opens the github page for the current git repository and branch in your browser | |
| # | |
| # based on this: http://jasonneylon.wordpress.com/2011/04/22/opening-github-in-your-browser-from-the-terminal/ | |
| # + works with current branch | |
| # + pass file: gh foo/bar.txt #=> https://github.com/o/o/tree/master/foo/bar.txt | |
| # + pass commit sh: gh 5116fba #=> https://github.com/o/o/commits/5116fba | |
| # | |
| function gh() { | |
| giturl=$(git config --get remote.origin.url) | |
| if [ "$giturl" == "" ] |
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
| _headers.reject!{|h| h.starts_with?("HTTP") }.inject([]){|a, k| a<< {k.split(":")[0].gsub("-","_").downcase.to_sym => k.split(":")[1].strip}} |
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
| tag += (sequence == 0)? '.1' : ((sequence < 0)? '' : ("."+(sequence+1).to_s) |