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
function encode64($input, $count) | |
{ | |
$output = ''; | |
$i = 0; | |
do { | |
$value = ord($input[$i++]); | |
$output .= $this->itoa64[$value & 0x3f]; // % 64 | |
if ($i < $count) | |
$value |= ord($input[$i]) << 8; // ord * 2^8 | |
$output .= $this->itoa64[($value >> 6) & 0x3f]; // (ord div 64) % 64 |
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 'ruby-prof' | |
RubyProf.measure_mode = RubyProf::ALLOCATIONS | |
RubyProf.start | |
1_000_000.times{ Array.new(10) } | |
result = RubyProf.stop | |
# Print a flat profile to text | |
printer = RubyProf::FlatPrinter.new(result) | |
printer.print(STDOUT) |
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
1.9.2p320 :006 > x | |
=> ["𠜎"] | |
1.9.2p320 :007 > x.to_json | |
=> "[\"\\u070e\"]" | |
1.9.2p320 :008 > JSON.dump x | |
=> "[\"𠜎\"]" |
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
Enclosing class/module 'mDigest' for class MD5 not known | |
Enclosing class/module 'mDigest' for class RMD160 not known | |
Enclosing class/module 'mDigest' for class SHA1 not known | |
Enclosing class/module "cASN1ObjectId" for alias short_name sn not known | |
Enclosing class/module "cASN1ObjectId" for alias long_name ln not known |
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
# -*- coding: utf-8 -*- | |
# a functional is a function that takes a function for its input | |
def fact(factorial): | |
def fn(n): | |
if n == 0: return 1 | |
else: | |
return n * factorial(n - 1) | |
return fn | |
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
char*a[]={ | |
"40h50mfu2!epxo0svo>spv7b7eft?u20nblf2!dsz0tbz!hppeczf0ufmm>!mjf>7ivsu2", | |
"44Xf(wf8o!fbdi!pui?!gps!t<mpoh4Zpvs!ifbs=bdiA-!cvu2@;p<tiz;<tbz!ju4Jotj\ | |
ef!xf!cpui8!xib=hpA!po4Xf8;if!hbnf>7xf@9qmbz!ju44","4Ofw?9", | |
"J!kvtu!xboob;fmm26Hpuub!nblf2!voe?tuboe.","!zpv","0hjwf-!ofw?9hjwf4)H5*","\v", | |
"jwf2!vq","!ipx!J(n!gffmA4","oe!","!lopx","!hpoob!",")Pppi-!h5*4","!u","p!", | |
"u(t!cffo!","!b","fs","(sf","joh"}; | |
f(char*s){for(;*s;++s)*s>45&&*s<66?f(a[*s-46]):putchar(*s-1);} | |
main(){f("Xf@!o<tusboh?t;<mpwf4Zpv8;if!svmft>7t<e<J4B!gvmm!dpnnjunfou" | |
"(t!xibu!J(n;ijolA!pg4Zpv!xpvmeo(u!hfu;ijt!gspn>oz!pui?!hvz441/B7jg2>tl!nf6" |
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
# Add gems from vendor dir | |
config.autoload_paths += Dir["#{config.root}/vendor/gems/**"].map do |dir| | |
File.directory?(lib = "#{dir}/lib") ? lib : dir | |
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
Traceback (most recent call last): | |
File "/usr/local/bin/post-review", line 9, in <module> | |
load_entry_point('RBTools==0.3.4', 'console_scripts', 'post-review')() | |
File "/usr/local/lib/python2.7/dist-packages/rbtools/postreview.py", line 3972, in main | |
if not server.check_api_version(): | |
File "/usr/local/lib/python2.7/dist-packages/rbtools/postreview.py", line 511, in check_api_version | |
rsp = self.api_get(root_resource['links']['info']['href']) | |
File "/usr/local/lib/python2.7/dist-packages/rbtools/postreview.py", line 962, in api_get | |
return self.process_json(self.http_get(path)) | |
File "/usr/local/lib/python2.7/dist-packages/rbtools/postreview.py", line 932, in http_get |
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
Traceback (most recent call last): | |
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/post-review", line 9, in <module> | |
load_entry_point('RBTools==0.3.2', 'console_scripts', 'post-review')() | |
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/rbtools/postreview.py", line 3794, in main | |
submit_as=options.submit_as) | |
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/rbtools/postreview.py", line 3460, in tempt_fate | |
parent_diff_content) | |
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/rbtools/postreview.py", line 769, in upload_diff | |
fields, files) | |
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/rbtools/postreview.py", line 982, in api_post |
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
./haskell-bcrypt.cabal has been changed. Re-configuring with most recently | |
used options. If this fails, please run configure manually. | |
Configuring haskell-bcrypt-0.1... | |
Dependency base ==4.3.1.0: using base-4.3.1.0 | |
Dependency bytestring ==0.9.1.10: using bytestring-0.9.1.10 | |
Using Cabal-1.10.1.0 compiled by ghc-7.0 | |
Using compiler: ghc-7.0.3 | |
Using install prefix: | |
/Users/brett/Library/Haskell/ghc-7.0.3/lib/haskell-bcrypt-0.1 | |
Binaries installed in: |