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.2-p0 :001 > require 'rubygems' # required? | |
=> true | |
ruby-1.9.2-p0 :002 > require 'flickr' | |
=> true | |
ruby-1.9.2-p0 :003 > f = Flickr.new('xxxxxxxxxxxxxxxxxxxxxxxxxxxxx') | |
=> #<Flickr:0xa713dc4 @api_key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxx", @host="http://flickr.com", @api="/services/rest"> | |
ruby-1.9.2-p0 :004 > u = f.users('Ian Vaughan') | |
ArgumentError: File does not exist: . | |
from /home/ian/.rvm/gems/ruby-1.9.2-p0/gems/xml-simple-1.0.14/lib/xmlsimple.rb:983:in `find_xml_file' |
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
kill `ps aux | grep [v]algrind | awk '{print $2}' | tail -n1` |
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
#!/bin/bash | |
PIDS=`ps aux | grep "[n]ame" | awk '{print $2}'` | |
if [ $PIDS = "" ]; then | |
exit | |
fi | |
PID_LIST= | |
for pid in $PIDS; do | |
PID_LIST="-p$pid $PID_LIST" | |
done | |
top ${PID_LIST} |
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
#!/bin/bash | |
FILENAME=$1 | |
HOURS=$2 | |
SECONDS=$((3600 * ${HOURS})) | |
echo "Recording ${FILENAME} for ${SECONDS} seconds..." | |
rec -c 2 ${FILENAME}.ogg trim 0 ${SECONDS} #7200 | |
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://gitready.com/intermediate/2009/02/06/helpful-command-aliases.html | |
git config --global alias.rb rebase | |
git config --global alias.st status | |
git config --global alias.ci commit | |
git config --global alias.br branch | |
git config --global alias.co checkout | |
git config --global alias.df df | |
git config --global alias.lg log -p |
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
#!/bin/bash | |
# Bash script that monitors a directory of source files for changes, then does something (like build) if changed. | |
# It does this via creating a SHA of the ls tree of the folder in question, and if changed, triggers the action. | |
# The "action" is just the variable $command, normally make. | |
# Usage : | |
# ./monitor.sh | |
# Then save a file, and it gets built! Magic! | |
command="make" | |
params="" |
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
#!/bin/bash | |
# Update to monitor.sh, this time its serious! | |
# This monitors a group of directories for source file changes, and if a file in one of them changes it only actions that directory command. | |
# It does this via creating a SHA of the ls tree of the folder in question, and if changed, triggers the action. | |
# The "action" is just the variable $command, normally make. | |
# Usage : | |
# ./monitor.sh | |
# Then save a file, and it gets built! Magic! |
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
$ brew doctor | |
Your system is raring to brew. | |
$ brew update | |
Already up-to-date. | |
$ brew install -v gpg | |
==> Downloading ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.12.tar.bz2 | |
File already downloaded in /Users/ivaughan/Library/Caches/Homebrew | |
/usr/bin/tar xf /Users/ivaughan/Library/Caches/Homebrew/gnupg-1.4.12.tar.bz2 |
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
# with git-up (gem install git-up) | |
`ls`.split.each { |f| `cd #{f}; git up` } |
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 /Users/ivaughan/dev/ianvaughan/ruby_kml/ruby_kml-0.0.1.gem ✹ ✭master ‹1.9.3-p125› | |
Successfully installed ruby_kml-0.0.1 | |
1 gem installed | |
$ gem list ruby_kml ✹ ✭master ‹1.9.3-p125› | |
*** LOCAL GEMS *** | |
ruby_kml (0.0.1) | |
$ gem contents ruby_kml ✹ ✭master ‹1.9.3-p125› | |
/Users/ivaughan/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/ruby_kml-0.0.1/CHANGELOG |