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
# 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
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
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
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
# 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
sudo security dump-keychain -d login.keychain | grep inet -A23 |
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
sass-convert -F scss -T sass application_styles.css.scss application_styles.css.sass |
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
HrtBus::Config.routes_uri = "ftp://216.54.15.3/Anrd/vid.csv" | |
HrtBus::Config.buses_uri = "ftp://216.54.15.3/Anrd/hrtrtf.txt" | |
HrtBus::Config.hydra ||= Typhoeus::Hydra.new | |
HrtBus::Bus.download {|buses| @buses = buses } | |
HrtBus::Route.download {|routes| @routes = routes } | |
HrtBus::Config.hydra.run | |
@routes.each do |route| |
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
Model.order("DATE(created_at)").group("DATE(created_at)").count |