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
#!/usr/bin/ruby | |
# Instructions | |
# - Install optipng + libjpeg (http://mxcl.github.com/homebrew/) | |
# - Put this file in a directory of images | |
# - Open in TextMate + run it (cmd+r) | |
# Config |
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
1.9.3-p0 :005 > (BigDecimal("70") - BigDecimal("10.95")).to_s("F") | |
=> "59.05" | |
1.9.3-p0 :006 > (BigDecimal("70") - BigDecimal("40.95")).to_s("F") | |
=> "29.05" | |
1.9.3-p0 :007 > |
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
YAHOO.AgileBench.StoryDataSource = function() { | |
this.todoDataSource = null; | |
this.inprogressDataSource = null; | |
this.completeDataSource = null; | |
this.incompleteDataSource = null; | |
this.dataSourceReady = new YAHOO.util.CustomEvent("dataSourceReady", this); | |
this.init = function() { | |
url = "http://server/stories.json" | |
var request = YAHOO.util.Connect.asyncRequest('GET', url, jsonRequestCallback); |
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 | |
if [[ "$0" =~ "set_proxy.sh" ]] | |
then | |
echo "You must run this script via 'source $0' not directly" | |
exit -1 | |
fi | |
TIMEOUT=10 | |
# have to blank out variables in case this is run more than once | |
USER_NAME= |