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
URI.encode("hello world") #=> "hello%20world" | |
CGI.escape("hello world") #=> "hello+world" | |
CGI.escape("Hello~world") #=> "Hello%7Eworld" | |
URI.encode("Hello~world") #=> "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
class Transaction | |
attr_accessor :transaction_id | |
attr_accessor :url | |
SIGNATURE_KEYNAME = "Signature" | |
SIGNATURE_METHOD_KEYNAME = "SignatureMethod" | |
SIGNATURE_VERSION_KEYNAME = "SignatureVersion" | |
HMAC_SHA256_ALGORITHM = "HmacSHA256" | |
HMAC_SHA1_ALGORITHM = "HmacSHA1" |
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
ffmpeg: | |
./configure --prefix=/usr/local/ffmpeg \ | |
--disable-yasm \ | |
--enable-shared \ | |
--enable-libmp3lame \ | |
--enable-libx264 \ | |
--enable-libxvid \ | |
--enable-libfaac \ | |
--enable-libtheora \ |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: nginx init.d dash script for Ubuntu or other *nix. | |
# Description: nginx init.d dash script for Ubuntu or other *nix. | |
### END INIT INFO |
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
./configure --prefix='/usr/local/nginx' --with-http_ssl_module --add-module='/usr/local/ruby-1.9.2-p136/lib/ruby/gems/1.9.1/gems/passenger-3.0.2/ext/nginx' --add-module=/sources/nginx-files/nginx-rtmp-module |
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
ab -n 10000 -c 100 -T "application/json; charset=utf-8" http://localhost:3000/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking localhost (be patient) | |
Completed 1000 requests | |
Completed 2000 requests | |
Completed 3000 requests | |
Completed 4000 requests |
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
/* | |
* Copyright (c) 2010 Tobias Schneider | |
* This script is freely distributable under the terms of the MIT license. | |
*/ | |
(function(){ | |
var UPC_SET = { | |
"3211": '0', | |
"2221": '1', | |
"2122": '2', |
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
# Ember.js View routes | |
App.Router.router.recognizer.names |
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
$.fn.serializeObject = function() { | |
var o = {}; | |
var a = this.serializeArray(); | |
$.each(a, function() { | |
if (o[this.name] !== undefined) { | |
if (!o[this.name].push) { | |
o[this.name] = [o[this.name]]; | |
} | |
o[this.name].push(this.value || ''); | |
} else { |
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
_.templateSettings = { | |
interpolate: /\{\{\=(.+?)\}\}/g, | |
evaluate: /\{\{(.+?)\}\}/g | |
}; |