This file contains 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
pkgin -y install git mercurial gcc47 gmake giflib-5.0.5 ImageMagick-6.8.7.4 | |
export GOROOT=$HOME/go | |
export PATH=$PATH:$GOROOT/bin | |
export GOPATH=$HOME/gocode | |
cd | |
hg clone -u release https://code.google.com/p/go | |
cd go | |
hg update default |
This file contains 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
select * from pg_stat_activity where state != 'idle'; |
This file contains 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
sudo security add-trusted-cert -d -r trustRoot -k "/Library/Keychains/System.keychain" "path_to_cer/mycert.cer" |
This file contains 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 A | |
def method_missing(method_sym, *arguments, &block) | |
if method_sym == :[] && arguments.first.is_a?(Integer) | |
# do something here with value (search something or create) | |
arguments.first | |
else | |
super | |
end | |
end | |
end |
This file contains 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
$ sudo gem update --system -V | |
GET 200 OK: http://gemcutter.org/latest_specs.4.8.gz | |
GET 200 OK: http://gems.rubyforge.org/latest_specs.4.8.gz | |
GET 200 OK: http://gems.github.com/latest_specs.4.8.gz | |
Nothing to update | |
$ sudo gem install paperclip -V | |
GET 200 OK: http://gemcutter.org/latest_specs.4.8.gz | |
GET 200 OK: http://gems.rubyforge.org/latest_specs.4.8.gz | |
GET 200 OK: http://gems.github.com/latest_specs.4.8.gz |