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
diskutil list | |
diskutil unmountDisk /dev/disk1 | |
dd if=/Users/vlad/Downloads/imagefile.iso of=/dev/disk1 bs=1m |
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
$ git checkout -b feature dev | |
# ... | |
$ git checkout dev | |
$ git merge --no-ff feature | |
$ git branch -d feature | |
$ git push origin dev |
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
tar -zcvf archive.tar.gz dir | |
# -z: Compress archive using gzip program | |
# -c: Create archive | |
# -v: Verbose i.e display progress while creating archive | |
# -f: Archive File name | |
# Extract | |
tar -zxvf archive.tar.gz -C dir |
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
# update on ubuntu | |
cd ~/.rbenv/ | |
git pull | |
cd plugins/ruby-build | |
git pull | |
rbenv install -l | |
rbenv install 2.0.0-p195 | |
rbenv global 2.0.0-p195 | |
ruby -v | |
gem update --system |
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
# Find the process ID | |
ps -ax | grep Safari | |
# Pause the process | |
kill -STOP 1234 | |
# Resume the process | |
kill -CONT 1234 | |
# Force stop |
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 -I test test/unit/my_model_test.rb -n test_name |
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
http://localhost:3000/rails/info/routes |
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
export LC_CTYPE="en_US.UTF-8" |
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
text.gsub(URI.regexp(%W[https http])) do | |
"<a href=\"#{$&}\">#{$&}</a>" | |
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
#= require jquery.ui.sortable | |
#= require jquery.ui.nestedSortable | |
#= require sortable_tree/initializer | |
#= require_self | |
# case insensitive jQuery Contains http://goo.gl/IrNmk | |
jQuery.expr[":"].Contains = (a, i, m) -> | |
jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase()) >= 0 | |
jQuery.expr[":"].contains = (a, i, m) -> | |
jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase()) >= 0 | |
$ -> |