Skip to content

Instantly share code, notes, and snippets.

View titanous's full-sized avatar

Jonathan Rudenberg titanous

View GitHub Profile
@titanous
titanous / get.js
Created May 24, 2011 22:52
node.js v0.4.8 https.get regression
var https = require('https');
https.get({ host: 'www.google.com', path: '/accounts/o8/site-xrds?hd=jadedpixel.com' }, function(res) {
res.on('data', function(d) {
console.log('chunk');
});
res.on('end', function() {
console.log('end');
});
DEBUG -- : Test Load (0.2ms) SELECT "tests".* FROM "tests" ORDER BY COALESCE(updated_at DESC, created_at) ASC LIMIT 1
DEBUG -- : SQLite3::SQLException: near "DESC": syntax error: SELECT "tests".* FROM "tests" ORDER BY COALESCE(updated_at DESC, created_at) ASC LIMIT 1
/Users/titanous/.rvm/gems/ree-1.8.7-2011.03@fix/gems/activerecord-3.0.8/lib/active_record/connection_adapters/abstract_adapter.rb:207:in `log': SQLite3::SQLException: near "DESC": syntax error: SELECT "tests".* FROM "tests" ORDER BY COALESCE(updated_at DESC, created_at) ASC LIMIT 1 (ActiveRecord::StatementInvalid)
from /Users/titanous/.rvm/gems/ree-1.8.7-2011.03@fix/gems/activerecord-3.0.8/lib/active_record/connection_adapters/sqlite_adapter.rb:135:in `execute'
from /Users/titanous/.rvm/gems/ree-1.8.7-2011.03@fix/gems/activerecord-3.0.8/lib/active_record/connection_adapters/sqlite_adapter.rb:284:in `select'
from /Users/titanous/.rvm/gems/ree-1.8.7-2011.03@fix/gems/activerecord-3.0.8/lib/active_record/connection_adapters/abstract/database_
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>vc-build-version</key><string>1W16</string>
<key>vc-build-revision</key><string>198959</string>
<key>id-validation-cert</key><string>https://identity.ess.apple.com/WebObjects/TDIdentityService.woa/wa/validationCert</string>
<key>id-initialize-validation</key><string>https://identity.ess.apple.com/WebObjects/TDIdentityService.woa/wa/initializeValidation</string>
<key>id-provision-phone-number</key><string>https://identity.ess.apple.com/WebObjects/TDIdentityService.woa/wa/provisionPhoneNumber</string>
<key>id-provision-ds-id</key><string>https://profile.ess.apple.com/WebObjects/VCProfileService.woa/wa/idsProvisionEmails</string>
/*
* Generated by class-dump 3.3.3 (64 bit).
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2010 by Steve Nygard.
*/
#pragma mark -
/*
* File: /System/Library/PrivateFrameworks/ApplePushService.framework/applepushserviced
/*
* Generated by class-dump 3.3.3 (64 bit).
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2010 by Steve Nygard.
*/
#pragma mark -
/*
* File: /System/Library/PrivateFrameworks/ApplePushService.framework/Versions/A/ApplePushService
#!/bin/sh
git checkout master
git fetch mainline
git rebase mainline/master
git checkout production
git merge mainline/production
git merge master
git push mainline production
git checkout master
def days_in_month(n)
if n == 2 then 28
elsif [4,6,9,11].include?(n) then 30
else 31
end
end
require 'benchmark'
module Arel
module Nodes
class Ordering
end
end
end
def old_reverse_sql_order(order_query)
user system total real
BERT int encode 0.010000 0.000000 0.010000 ( 0.013525)
MessagePack int encode 0.000000 0.000000 0.000000 ( 0.000396)
Yajl int encode 0.010000 0.000000 0.010000 ( 0.002894)
BERT int decode 0.000000 0.000000 0.000000 ( 0.000346)
MessagePack int decode 0.000000 0.000000 0.000000 ( 0.000336)
Yajl int decode 0.010000 0.000000 0.010000 ( 0.001949)
BERT array encode 8.010000 0.010000 8.020000 ( 8.022767)
MessagePack array encode 0.060000 0.000000 0.060000 ( 0.063025)
Yajl array encode 0.170000 0.000000 0.170000 ( 0.169183)
@titanous
titanous / 0-readme.md
Created October 7, 2011 16:20
Ruby 1.9.3-p0 with ruby-debug19

Ruby 1.9.3-p0 with ruby-debug19

Ruby 1.9.3-p0 requires a minor patch to make ruby-debug19 work. If you have ruby-build and rbenv installed, these scripts will install ruby-1.9.3-p0.

curl https://raw.github.com/gist/1270704/install-ruby-1.9.3-p0.sh | sh