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
require 'rubygems' | |
require 'sinatra' | |
require 'lib/sms' | |
require 'thread' | |
SECONDS_PER_MESSAGE = 1.0 | |
queue = Queue.new | |
consumer = Thread.new do |
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
# boo.irc | |
# written by prym | |
alias ooooMDOP { | |
if ([$3]) { QUOTE MODE $C -oooo $0 $1 $2 $3 ;}{ | |
if ([$2]) { QUOTE MODE $C -booo *!*@* $0 $1 $2 ;}{ | |
if ([$1]) { QUOTE MODE $C -boo *!*@* $0 $1 ;}{ | |
if ([$0]) { QUOTE MODE $C -bo *!*@* $0 ;} | |
} | |
} |
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
require 'closure-compiler' | |
task :copy do | |
IO.popen('pbcopy', 'w') do |io| | |
io << Closure::Compiler.new.compile(IO.popen("coffee -p *.coffee")) | |
end | |
end |
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
window.printSource = (object, depth) -> | |
depth ?= 1 | |
indent = new Array(depth + 1).join(' ') | |
entries = [] | |
for all key, value of object | |
entries.push "\"#{key}\": #{value}" | |
if object.__proto__? | |
for all key, value of object.__proto__ | |
entries.push "\"#{key}\": #{value}" |
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
/* ReaderJSController.originalArticleFinder(): */ | |
{ | |
"contentDocument": [object HTMLDocument], | |
"didSearchForArticleNode": true, | |
"article": [object Object], | |
"didSearchForPrependedArticleNode": true, | |
"prependedArticle": null, | |
"_cachedScrollY": 0, | |
"_cachedScrollX": 0, | |
"_elementsWithCachedBoundingRects": [object HTMLDivElement], |
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
def connection | |
@connection ||= Faraday::Connection.new(:url => @uri.to_s) do |conn| | |
conn.use Faraday::Request::ActiveSupportJson | |
conn.adapter Faraday.default_adapter | |
conn.use Tinder::FaradayResponse::RaiseOnAuthenticationFailure | |
conn.use Faraday::Response::ActiveSupportJson | |
conn.use Tinder::FaradayResponse::WithIndifferentAccess | |
conn.headers['Content-Type'] = 'application/json' | |
conn.proxy ENV['HTTP_PROXY'] |
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
This time bay-beee I'll beeeeeeEEEEEEEEEeeeee - BullehhhhhhhhhhhhhhhT PROOOF. | |
This time may-beee I'll beeeeeeeeeee... Bulleeeeeht proof. |
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/env ruby | |
require 'johnson' | |
require 'open-uri' | |
require 'yajl' | |
# Grab the source to the Javascript JSON implementation | |
json_js = open('http://www.json.org/json2.js').read | |
# Strip that silly alert at the top of the file | |
json_js.gsub!(/^(alert.*)$/, '/* \1 */') |
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/env ruby | |
require 'johnson' | |
require 'open-uri' | |
require 'yajl' | |
# Grab the source to the Javascript JSON implementation | |
json_js = open('http://www.json.org/json2.js').read | |
# Strip that silly alert at the top of the file | |
json_js.gsub!(/^(alert.*)$/, '/* \1 */') |
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
$ rackup -p 8880 static.ru |