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
# Remove all partitions, erase, format with FAT with 'Disk Utility' BEFORE commands below | |
# Unmount flash drive, still shown in 'diskutil list` | |
diskutil unmountdisk /dev/disk2 | |
# Write .iso to flash drive | |
sudo dd if=/path/to/your/distro.iso of=/dev/disk2 bs=1m | |
# Eject disk | |
diskutil eject /dev/disk2 |
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 push origin master && git push heroku master && newrelic deployments |
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 ~/Downloads -name '*(2).yml' -exec cp {} ~/project-foo/config/newrelic.yml \; |
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
IO.popen('pbcopy', 'r+') { |clipboard| clipboard.puts markdown.to_html } |
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://osxdaily.com/2012/01/30/encrypt-and-decrypt-files-with-openssl/ | |
# Encrypt | |
openssl des3 -in file.txt -out encrypted.txt | |
# Decrypt | |
openssl des3 -d -in encrypted.txt -out normal.txt |
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
awk -F ',' '{print NF}' foo.csv | uniq -c |
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 diff HEAD --ignore-space-at-eol |
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
subset(df, sprint.end.date %in% as.Date(c("2012-11-16", "2012-11-30"))) |
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
while max <= 100 do; puts Net::HTTP.get('www.google.com', '/'); max +=1; sleep 60; 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
# Credit - http://mattsears.com/articles/2011/12/10/minitest-quick-reference | |
# | |
# must_be list.size.must_be :==, 0 | |
# must_be_close_to subject.size.must_be_close_to 1,1 | |
# must_be_empty list.must_be_empty | |
# must_be_instance_of list.must_be_instance_of Array | |
# must_be_kind_of list.must_be_kind_of Enumerable | |
# must_be_nil list.first.must_be_nil |