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
| module Athega | |
| class LonemodellWithJSON < Lonemodell | |
| def to_json(*args) | |
| Yajl::Encoder.encode(to_hash) | |
| end | |
| 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
| function blunderbuss { | |
| if [ -z "$1" ]; then | |
| PORT=9393 | |
| else | |
| PORT=$1 | |
| fi | |
| IP=`ifconfig | grep -m 1 broadcast | awk '{print $2}'` | |
| shotgun -s thin -o $IP -p $PORT | |
| } |
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
| require 'set' | |
| # Sorted list of random numbers | |
| pp 10.times.each_with_object(SortedSet.new) { |n, s| s << Random.new.rand(1..100) } | |
| # Associative arrays | |
| aoa = ('a'..'l').each_slice(2).to_a | |
| Hash[aoa] #=> {"a"=>"b", "c"=>"d", "e"=>"f", "g"=>"h", "i"=>"j", "k"=>"l"} |
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
| function sass-watch { | |
| if [ -z "$3" ]; then | |
| SASS_IN='all.scss' | |
| CSS_OUT='all.css' | |
| SASS_WATCH_PATH='.' | |
| else | |
| SASS_IN=$1 | |
| CSS_OUT=$2 | |
| SASS_WATCH_PATH=$3 | |
| 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
| puts "first file" |
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
| #!/bin/sh | |
| smc=/Applications/smcFanControl.app/Contents/Resources/smc | |
| min_hex=$(python -c "print hex("2000" << 2)[2:]") | |
| max_hex=$(python -c "print hex("6500" << 2)[2:]") | |
| ${smc} -k F0Mn -w ${min_hex} | |
| ${smc} -k F0Mx -w ${max_hex} |
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
| rvm --create use 1.9.3@goliath-wrong-number-of-arguments |
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
| guard 'shell' do | |
| watch(/relation_tree_spec\.rb/) { `clear && ruby relation_tree_spec.rb` } | |
| 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
| # .bash_profile | |
| # Get the aliases and functions | |
| if [ -f ~/.bashrc ]; then | |
| . ~/.bashrc | |
| fi | |
| # User specific environment and startup programs | |
| PATH=$PATH:$HOME/bin |
OlderNewer