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://www.fmwconcepts.com/imagemagick/autocolor/index.php | |
| mkdir optimized | |
| title="Happy Hour" | |
| n=1 | |
| for file in DSC* | |
| do | |
| convert $file -resize "800x600>" resized.jpg | |
| ~/Projects/scripts/autocolor -m none resized.jpg optimized.jpg |
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
| curdate = "" | |
| data = File.open("fights.txt").read | |
| data.gsub!(/^(Month|Name|Red|Gray).*\n/, '') | |
| data.gsub!(/\t/, '","') | |
| data.gsub!(/^/, '"').gsub!(/$/, '"') | |
| data.gsub!(/(\w+), (\w+)/, "\\2 \\1") | |
| data.gsub!(/(,"")*$/, '') | |
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
| #!/usr/bin/ruby | |
| # cronjob set up like this: | |
| # */5 * * * * /var/cron/twitter.rb 12571852 > /var/www/davideisinger.com/twitter.txt | |
| # */5 * * * * /var/cron/twitter.rb 14090058 > /var/www/sarahbetheisinger.com/twitter.txt | |
| require 'rubygems' | |
| require 'net/http' | |
| require 'json' | |
NewerOlder