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
require 'rubygems' | |
require 'httparty' | |
require 'json' | |
# Ruby client for 3M's Radio Thermostat (http://www.radiothermostat.com/) | |
# James Ryan <[email protected]> | |
# -- | |
# | |
# Examples: | |
# |
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
#!/opt/local/bin/ruby | |
# | |
# iam - block distracting websites while working | |
# | |
# Examples: | |
# | |
# Switch to work mode -- disable distracting websites | |
# % iam working | |
# | |
# Switch to play mode -- enable distracting websites |
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
1000.times { puts "BRIAN CARLSON!" } |
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
TinyOOP = { }; | |
TinyOOP.Class = function(definition) { | |
var klass = function() { | |
if (typeof this.initialize !== 'undefined') this.initialize.apply(this, arguments); | |
} | |
for (key in TinyOOP.Class.Methods) { klass[key] = TinyOOP.Class.Methods[key]; } | |
for (key in definition) { klass.prototype[key] = definition[key]; } | |
return klass; | |
} |
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
/** | |
* | |
* smtpd.js -- an event-driven simple SMTP service for Node.js | |
* | |
* smtpd.js fires events at various points in the lifecycle of an SMTP | |
* connection, and those events are caught by observer functions added via | |
* SMTPD.Event.observe(). The design is very similar to Prototype.js's | |
* event observation model. | |
* | |
* Observers can also fire custom events, which can be caught by other custom |
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
Array.prototype.hashify = Array.prototype.hashify || function(transform) { | |
var h = { }; | |
for (var i = 0; i < this.length; i += 1) h[transform(i)] = i; | |
return h; | |
}; |