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 'sinatra' | |
| require 'net/https' | |
| client_id = '2044a7773387915a7a2a' | |
| client_secret = 'secret' | |
| get '/' do | |
| html = <<-EOS | |
| <html> | |
| <head> |
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
| test?a=10&b:a//foo(?!|@:* | |
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
| all: | |
| gcc -o dict -Wall -fobjc-gc -O2 -std=c99 dict.m -framework carbon -framework cocoa |
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
| diff -ur ../../../ruby-1.8.7-p302/gems/refe-0.8.0.3/lib/refe/fsdbm.rb ./lib/refe/fsdbm.rb | |
| --- ../../../ruby-1.8.7-p302/gems/refe-0.8.0.3/lib/refe/fsdbm.rb 2011-08-14 20:56:32.000000000 +0900 | |
| +++ ./lib/refe/fsdbm.rb 2011-08-14 19:59:40.000000000 +0900 | |
| @@ -85,7 +85,7 @@ | |
| def encode( str ) | |
| str.gsub(/[^a-z0-9_]/n) {|ch| | |
| - (/[A-Z]/n === ch) ? "-#{ch}" : sprintf('%%%02x', ch[0]) | |
| + (/[A-Z]/n === ch) ? "-#{ch}" : sprintf('%%%02x', ch[0].bytes.first) | |
| }.downcase |
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
| function uniq(arr, f) { | |
| var r = [] | |
| var h = {} | |
| var f = f ? f : JSON.stringify | |
| arr.forEach(function(i) { | |
| var v = f(i) | |
| if (!h.hasOwnProperty(v)) { | |
| r.push(i) | |
| } | |
| h[v] = true |
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
| def glitch s | |
| s.gsub(/0/m) { (rand > 0.9 ? rand(10) : 0).to_s } | |
| end | |
| if /darwin/ === RUBY_PLATFORM | |
| cmd :ggyast, '', 'post glitched screencapture' do | |
| now = Time.now.to_i | |
| file_jpg = "/tmp/#{now}.jpg" | |
| system "screencapture -i -t jpg \"#{file_jpg}\"" | |
| sleep 2 |