$ hello
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
prefix=TPL_PREFIX | |
major_version=5.2 | |
version=5.2.3 | |
lib_name=lua | |
libdir=${prefix}/lib | |
includedir=${prefix}/include | |
# | |
# The following are intended to be used via "pkg-config --variable". |
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/bin/env ruby | |
require 'json' | |
require 'msgpack' | |
data = JSON.parse($stdin.read) | |
$stdout.write(data.to_msgpack) |
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 "benchmark" | |
require "msgpack" | |
require "json" | |
N = Integer(ARGV[0] || 10000) | |
data = { 'hello' => { 'there' => 'peeps' }, | |
'yes' => [1, 2, 3], | |
'no' => true, 'bam' => false } |
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 --git a/tests/models/listing_test.js b/tests/models/listing_test.js | |
index 14c3d14..c04b7a6 100644 | |
--- a/tests/models/listing_test.js | |
+++ b/tests/models/listing_test.js | |
@@ -10,6 +10,7 @@ var dict = { | |
'Name': 'CPK', | |
'HeadingText': 'Restaurants', | |
'PrimaryCollection': 'food', | |
+ 'Personalization.TotalNotes': '10' | |
}; |
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
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include /home/t/nginx/conf/mime.types; | |
default_type application/octet-stream; |
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
console.log(new Buffer("Hello World").toString('base64')); | |
// => "SGVsbG8gV29ybGQ=" | |
console.log(new Buffer("SGVsbG8gV29ybGQ=", 'base64').toString('ascii')) | |
// => "Hello World" |
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 'benchmark' | |
require 'rack' | |
require 'json' | |
payload = { | |
'user' => { | |
'a' => '1', 'b' => '2', | |
'comments' => [ | |
{ 'body' => 'Hello' }, | |
{ 'body' => 'World' } |
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
Dir["*.NEF"].each do |file| | |
# Since you don't really get to display the raw quality, | |
# we save ourselves bandwidth and reduce to something reasonable, | |
# in this case 2520x2160. | |
puts `gm convert -resize '2520X2160>' #{file} #{file.gsub(".NEF", ".JPG")}` | |
end |
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
import re, sys | |
keys = ('abc', 'def', 'ghi', 'jkl', 'mno', 'pqrs', 'tuv', 'wxyz') | |
m = dict((l, str(n)) for n, letters in enumerate(keys, start=2) for l in letters) | |
data, ocurrences = {}, {} | |
wmatch = re.compile('[^a-z]+') | |
def learn(word): | |
num = ''.join(m[c] for c in word) | |
for i in xrange(1, len(word) + 1): |