Skip to content

Instantly share code, notes, and snippets.

View steveh's full-sized avatar

Steve Hoeksema steveh

View GitHub Profile
package main
import (
"hash/crc32"
"fmt"
"os"
)
func main() {
table := crc32.MakeTable(crc32.Castagnoli)
@steveh
steveh / Gemfile
Created October 13, 2011 01:26
Git Megaclone
source :rubygems
gem "excon"
gem "json"
$ ab -c1 -n10 http://d3jm3zorfs1yhu.cloudfront.net/original/12870.jpg
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 d3jm3zorfs1yhu.cloudfront.net (be patient).....done
Server Software: AmazonS3
Server Hostname: d3jm3zorfs1yhu.cloudfront.net
d-i debian-installer/locale string en_NZ.UTF-8
d-i debian-installer/splash boolean false
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
d-i console-setup/variantcode string
d-i console-keymaps-at/keymap select us
d-i netcfg/choose_interface select eth0
d-i netcfg/get_nameservers string 202.27.184.3 202.27.184.5
d-i netcfg/get_ipaddress string
d-i netcfg/get_netmask string 255.255.255.0
var ProphetCalendar = new Class({
initialize: function (a) {
var d = this;
for (var c in a) {
d[c] = a[c];
}
this.calendarShown = false;
this.Date355 = new Date(this.today.getFullYear(), this.today.getMonth(), this.today.getDate() + 355);
this.firstMonth = new Date(this.today.getFullYear(), this.today.getMonth(), 1);
this.endFirstMonth = new Date(this.today.getFullYear(), this.today.getMonth(), this.today.getLastDayOfMonth());
<xsd:OrderProductsRequest>
<xsd:context>
<xsd:callerReference>830989</xsd:callerReference>
<xsd:repeatCall>false</xsd:repeatCall>
</xsd:context>
<xsd:user>
<xsd:emailAddress>ali22bi22@gmail.com</xsd:emailAddress>
<xsd:contact>
<xsd:firstName>ali</xsd:firstName>
<xsd:lastName>bi</xsd:lastName>
{:customer=>
{:bank_account=>
{:account_number=>"0001866",
:account_number_suffix=>"00",
:bank_code=>"03",
:branch_code=>"0584",
:name=>"D Cooper"},
:card=>
{:card_name=>"111111",
:card_number=>"411111........11",
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://soap.sforce.com/schemas/class/Api" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://soap.sforce.com/schemas/class/Api">
<env:Header>
<wsdl:SessionHeader>
<wsdl:sessionId>00DQ0000000CNKD!AQIAQAscoSP23zs5SK8xoRdZNRGzDgUB60ZCJPrSME3tv9xpiQGnrZa9lhaXTcG3vsw1eOMAtS9o983gAxPhYz.7KVIPF8rK</wsdl:sessionId>
</wsdl:SessionHeader>
</env:Header>
<env:Body>
<ins0:orderProducts>
<xsd:OrderProductsRequest>
module AWS
class S3
class ObjectCollection
protected
def each_member_in_page(page, &block)
super
page.contents.each do |content|
yield(S3Object.new(bucket, content.key, { :etag => content.etag }))
end
end
class ApplicationController
rescue_from ArgumentError do |exception|
if exception.message =~ /invalid byte sequence/
flash[:error] = exception.message
redirect_to "/" and return
else
raise exception
end
end