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
vjadmin@ollie:~$ time ab -n 1000000 -c 1020 -t 120 207.158.15.183/ | |
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0 | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Copyright 2006 The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking 207.158.15.183 (be patient) | |
Completed 5000 requests | |
Completed 10000 requests | |
Completed 15000 requests | |
Completed 20000 requests |
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
$ git svn rebase --all | |
error: refs/heads/master does not point to a valid object! | |
error: refs/remotes/git-svn does not point to a valid object! | |
error: refs/stash does not point to a valid object! | |
code/applications/actionpack/sessions/script/about: needs update | |
code/applications/actionpack/sessions/script/console: needs update | |
code/applications/actionpack/sessions/script/dbconsole: needs update | |
code/applications/actionpack/sessions/script/destroy: needs update | |
code/applications/actionpack/sessions/script/generate: needs update | |
code/applications/actionpack/sessions/script/performance/benchmarker: needs update |
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
# This should print out | |
# | |
# [the arabic] 5.67 | |
# | |
# right? | |
# | |
# Btw, run from Textmate (set the language to Ruby and hit cmd-r) or whatever your text editor. | |
# (Executing straight from irb seems to segfault.) | |
puts "ر.ق" + |
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
#!/usr/bin/env ruby -wKU | |
# Usage: | |
# $ cat master\ no\ multivariant_2009-01-13_13.42.23.sql | ack "INSERT INTO .*?orders" | ./restore_note_attributes.rb > update_note_attributes.sql | |
# $ mysql your_db -u your_user < update_note_attributes.sql | |
require 'rubygems' | |
require 'fastercsv' | |
def extract_note_attributes(note) |
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
module Dad | |
def self.make_breakfast | |
things_i_like("I like toast.") | |
puts "These are the things we should make for breakfast." | |
end | |
def self.things_i_like(things) | |
puts things | |
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
#!/usr/bin/env ruby | |
# sudo gem install ZenTest | |
# run "autotest", or "autotest -f" to skip the initial full test suite | |
# colour coded results | |
require 'autotest/redgreen' | |
# growl notifications...put something like this in ~/.autotest if you want |
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
a = [ | |
def f(a) | |
puts a | |
end, | |
f(1) | |
] |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<env:Header> | |
<aws:AWSAccessKeyId env:mustUnderstand="0" xmlns:aws="http://security.amazonaws.com/doc/2007-01-01/" env:actor="http://schemas.xmlsoap.org/soap/actor/next">0BRV8WCYSJ4MJMXRNKR2</aws:AWSAccessKeyId> | |
<aws:Signature env:mustUnderstand="0" xmlns:aws="http://security.amazonaws.com/doc/2007-01-01/" env:actor="http://schemas.xmlsoap.org/soap/actor/next">WnK8kc9rEMtHGkX/mYbJjA406FA=</aws:Signature> | |
<aws:Timestamp env:mustUnderstand="0" xmlns:aws="http://security.amazonaws.com/doc/2007-01-01/" env:actor="http://schemas.xmlsoap.org/soap/actor/next">2009-08-12T19:19:48Z</aws:Timestamp> | |
</env:Header> | |
<env:Body> | |
<CreateFulfillmentOrder xmlns="http://fba-outbound.amazonaws.com/doc/2007-08-02/"> | |
<MerchantFulfillmentOrderId>8af0a8f37b8e40a999ce3929a66275f4</MerchantFulfillmentOrder |
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
<html> | |
<head> | |
<script type="text/javascript" src="json-template.js"> | |
</script> | |
<script type="text/javascript"> | |
// Note that this requires json-template.js | |
function write() { | |