Skip to content

Instantly share code, notes, and snippets.

➜ foo git:(master) ./sequential.rb
Finished in 1.293349
➜ foo git:(master) ./sequential.py
Finished in 2.837504
➜ foo git:(master) ./threads.rb
Finished in 1.272466
➜ foo git:(master) ./threads.py
Finished in 3.681996
➜ ~ git:(master) ✗ groc
zsh: command not found: groc
➜ ~ git:(master) ✗ git clone https://github.com/nevir/groc /tmp/groc
Cloning into '/tmp/groc'...
remote: Counting objects: 885, done.
remote: Compressing objects: 100% (311/311), done.
remote: Total 885 (delta 597), reused 838 (delta 550)
Receiving objects: 100% (885/885), 471.55 KiB | 383 KiB/s, done.
Resolving deltas: 100% (597/597), done.
➜ ~ git:(master) ✗ pushd /tmp/groc
@nevir
nevir / test_airbrake.rb
Created March 9, 2012 18:45 — forked from shime/test_airbrake.rb
test airbrake
t = Time.now; count = (1..100).select { Airbrake.notify(:error_class => "Testing success rate",:error_message => "Error Message") }.length; puts "success: #{count / 100.0}, avg time: #{(Time.now - t) / 100.0}"
@nevir
nevir / gist:1301641
Created October 20, 2011 16:52
Salumi Menu

Salumi Options:

Prefab Cold Sandwiches

  • Muffo (cotto, hot sopressata, provolone - marinated for a few hours)
  • Magharita
  • Prosciutto, Fig and Goat Cheese (seasonal - have a backup option)

Prefab Hot Sandwiches

{"expiration": "2009-01-01T00:00:00Z",
"conditions": [
{"bucket": "s3-bucket"},
["starts-with", "$key", "uploads/"],
{"acl": "private"},
{"success_action_redirect": "http://localhost/"},
["starts-with", "$Content-Type", ""],
["content-length-range", 0, 1048576]
]
}
1: LD vm/test/runner
ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame
vm/test/runner
Running 683 tests...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................OK!
bin/mspec ci --background --agent
rubinius 2.0.0dev (1.8.7 6d095fd3 yyyy-mm-dd JI) [x86_64-apple-darwin11.2.0]
.....................................................................
@nevir
nevir / gist:1232888
Created September 21, 2011 18:27
Salumi!

Salumi Orders!

  • Erik: Fig prosciutto
  • Ian: Muffo
  • Evan: Hot Sopressata & provolone
  • Chadwick: Finocchiona & provolone
  • Marcus: Fig prosciutto
  • Adrian: Fig prosciutto
  • Andrew: grilled lamb
NevBook:lib ian$ cat outer.js
console.log(require('./inner.js')());
NevBook:lib ian$ cat inner.js
module.exports = function() {
return __filename;
}
NevBook:lib ian$ node outer.js
/Users/ian/Coding/node-autorequire/lib/inner.js
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'sass' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
#!/usr/bin/env ruby
#
# This file was generated by RubyGems.
#
# The application 'sass' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'rubygems'