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/local/bin/macruby | |
| framework 'QuartzCore' | |
| framework 'AVFoundation' | |
| class NSTimer | |
| def self.scheduledTimerWithTimeInterval interval, repeats: repeat_flag, block: block | |
| self.scheduledTimerWithTimeInterval interval, | |
| target: self, | |
| selector: 'executeBlockFromTimer:', | |
| userInfo: block, | |
| repeats: repeat_flag |
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/local/bin/macruby | |
| framework 'QuartzCore' | |
| framework 'AVFoundation' | |
| class NSColor | |
| def toCGColor | |
| # approach #2 | |
| components = [redComponent, greenComponent, blueComponent, alphaComponent] | |
| color_space = CGColorSpaceCreateWithName(KCGColorSpaceGenericRGB) |
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
| {"feed":"http://api.pachube.com/v2/feeds/504.json","creator":"http://www.pachube.com/users/hdr","tags":["hq","office"],"description":"Sensors in Pachube.com's headquarters.","datastreams":[{"max_value":"658.0","min_value":"0.0","at":"2011-06-13T12:05:09.317006Z","tags":["humidity"],"current_value":"16","id":"0"},{"max_value":"999.0","min_value":"0.0","at":"2011-06-13T12:05:09.317006Z","tags":["light level"],"current_value":"939","id":"1"},{"max_value":"774.0","min_value":"158.0","at":"2011-06-13T12:05:09.317006Z","tags":["temperature"],"current_value":"327","id":"2"},{"max_value":"0.0","min_value":"0.0","at":"2011-06-13T12:05:09.317006Z","tags":["door 1"],"current_value":"0","id":"3"},{"max_value":"0.0","min_value":"0.0","at":"2011-06-13T12:05:09.317006Z","tags":["door 2"],"current_value":"0","id":"4"},{"max_value":"40.0","min_value":"0.0","at":"2011-06-13T12:05:09.317006Z","tags":["failures"],"current_value":"0","id":"5"},{"max_value":"32767.0","min_value":"-32768.0","at":"2011-06-13T12:05:09.317006Z","tags |
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
| Juggernaut.publish("task_board_#{@task_board.id}", @task.as_json) |
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
| /* | |
| Pachube sensor client | |
| This sketch connects an analog sensor to Pachube (http://www.pachube.com) | |
| using a Wiznet Ethernet shield. You can use the Arduino Ethernet shield, or | |
| the Adafruit Ethernet shield, either one will work, as long as it's got | |
| a Wiznet Ethernet module on board. | |
| Circuit: | |
| * Analog sensor attached to analog in 0 |
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
| grep -v INFO app.log | less -S |
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.inject(Hash.new(0)) { |hash, item| | |
| hash[item] += 1 | |
| hash }.sort_by { |k, v| v }.reverse.map { |k, v| "#{k}:#{v}" } |
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
| My responses to SPAM from Huntress recruitment consultants | |
| Each time they replied with confirmation that my email had been removed | |
| ================= | |
| ================= | |
| January 07 | |
| please unsubscribe my email address from all your lists | |
| thanks and happy new year |
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
| set nocompatible | |
| syntax on | |
| filetype plugin indent on | |
| set number | |
| set softtabstop=2 | |
| set tabstop=2 | |
| set shiftwidth=2 | |
| set expandtab | |
| au BufNewFile,BufRead *.less set filetype=css | |
| colorscheme vividchalk |
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
| /* | |
| Less CSS3 utils. | |
| Usage: | |
| .fooClass { | |
| border: 3px solid #000; | |
| .vbg-gradient(#FFF, #CCC); | |
| .hbox(); | |
| } | |
| */ |