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
#!/usr/bin/env ruby | |
# This script installs only to /usr/local on Mac or ~/.linuxbrew on Linux. | |
# To install elsewhere you can just untar | |
# https://github.com/Homebrew/homebrew/tarball/master anywhere you like or | |
# change the value of HOMEBREW_PREFIX. | |
def mac? | |
/darwin/i === RUBY_PLATFORM | |
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
Ruby 1.9 偏好使用新的 lambda 字面语法。 | |
# 差 | |
lambda = lambda { |a, b| a + b } | |
lambda.call(1, 2) | |
# 好 | |
lambda = ->(a, b) { a + b } | |
lambda.(1, 2) |
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
ps aux | sort -nk +4 | tail |
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
correct: RAILS_ENV=production rails console | |
not : rails console RAILS_ENV=production |
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
http://blog.crowdint.com/2011/10/05/using-rbenv-for-managing-your-rubies.html | |
CONFIGURE_OPTS="--with-readline-dir=/usr/include/readline" rbenv install 1.9.3-preview1 |
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 field, count(*) from table group by field having count(*) >1 |
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
export PATH="/Users/frankelma/github/homebrew/bin:$PATH:/Users/frankelma/github/homebrew/Cellar/gems/bin" | |
export CC=/usr/bin/gcc-4.2 | |
if [[ -s /Users/frankelma/.rvm/scripts/rvm ]] ; then source /Users/frankelma/.rvm/scripts/rvm ; fi | |
export GEM_HOME="/Users/frankelma/github/homebrew/Cellar/gems" | |
export GEM_PATH="/Users/frankelma/github/homebrew/Cellar/gems/gems" | |
alias ll='ls -al' |
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
rails g scaffold product name price:decimal --skip-stylesheets | |
rails g bootstrap:themed products -f |
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
gem install nokogiri -- --with-xml2-include=/Users/frankelma/github/homebrew/Cellar/libxml2/2.7.8/include/libxml2 --with-xml2-lib=/Users/frankelma/github/homebrew/Cellar/libxml2/2.7.8/lib --with-xslt-dir=/Users/frankelma/github/homebrew/Cellar/libxslt/1.1.26 | |
gem install nokogiri -- --with-xml2-include=/Users/frankelma/github/homebrew/Cellar/libxml2/2.7.8/include/libxml2 | |
--with-xml2-lib=/Users/frankelma/github/homebrew/Cellar/libxml2/2.7.8/lib | |
--with-xslt-dir=/Users/frankelma/github/homebrew/Cellar/libxslt/1.1.26 |
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
xrandr --newmode "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync | |
xrandr --addmode VGA-0 "1280x1024_60.00" | |
xrandr --output VGA-0 --mode 1280x1024_60.00 | |
xrandr --output VGA-0 --left-of DVI-0 |
NewerOlder