This file contains hidden or 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
if defined?(Unicorn) | |
class Unicorn::HttpRequest | |
alias _read read | |
undef_method :read | |
def read(socket) | |
_read(socket) | |
REQ.update('HTTP_X_REQUEST_START' => "t=#{((Time.now.to_f) * 1e6).to_i.to_s}") | |
end | |
end |
This file contains hidden or 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
[11:13-focus!][weplay(masterΔ)]$ gem install memcached | |
Building native extensions. This could take a while... | |
gem install memcache-clientSuccessfully installed memcached-0.19.3 | |
1 gem installed | |
[11:14-focus!][weplay(masterΔ)]$ gem install memcache-client | |
Successfully installed memcache-client-1.8.3 | |
1 gem installed | |
[11:18-focus!][weplay(masterΔ)]$ rake environment | |
(in /Users/lmelia/devprojects/weplay) | |
rake aborted! |
This file contains hidden or 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 | |
url = `git config --get remote.origin.url`.chomp | |
url.gsub!(%r|git://github.com/(.*\.git)|, '[email protected]:\1') | |
if url =~ /^git@github/ | |
puts "git remote rm writeable" | |
puts `git remote rm writeable` | |
puts "git remote add writeable #{url}" | |
puts `git remote add writeable #{url}` | |
else | |
raise "only supports github URLs" |
This file contains hidden or 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
How we're using Hydra's listener and messaging architecture to have each runner spin up a database after it boots. See also: http://github.com/ngauthier/hydra/wikis/multiple-test-databases |
This file contains hidden or 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
8/3/10 1:20:40 AM KitchenSink[29868] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: section)' | |
*** Call stack at first throw: | |
( | |
0 CoreFoundation 0x0366d919 __exceptionPreprocess + 185 | |
1 libobjc.A.dylib 0x037bb5de objc_exception_throw + 47 | |
2 CoreFoundation 0x03626078 +[NSException raise:format:arguments:] + 136 | |
3 CoreFoundation 0x03625fea +[NSException raise:format:] + 58 | |
4 CoreFoundation 0x0366c185 -[__NSCFDictionary setObject:forKey:] + 293 | |
5 KitchenSink 0x000f6bc4 -[TiUITableViewRowProxy createEventObject:] + 286 | |
6 KitchenSink 0x000f6cf3 -[TiUITableViewRowProxy fireEvent:withObject:withSource:propagate:] + 58 |
This file contains hidden or 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
using System; | |
using System.Collections; | |
using System.Collections.Specialized; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Reflection; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Xml; |
This file contains hidden or 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
namespace :analyze do | |
namespace :commits do | |
desc 'Flog the most commonly revised files in the git history' | |
task :most_changed_files do | |
counts = Hash.new(0) | |
IO.popen("PAGER=cat git log --name-only --pretty=oneline 2>&1") do |pipe| | |
while (!pipe.eof) do | |
line = pipe.readline | |
next unless line =~ /^(app|lib).*\.rb$/ | |
counts[line.chomp] += 1 |
This file contains hidden or 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></head><body leftMargin="0" topMargin="0" marginwidth="0" marginheight="0"><script language="Javascript1.1" type="text/javascript"> | |
var ftClick = "http://adclick.g.doubleclick.net/aclk?sa=L&ai=BBntyHeGtTd2_IZLtlQeF7qSkD8jZiuwBAAAAEAEgADgAWLDUiJAgYMnGqYvApNgPggEXY2EtcHViLTE3NDEzNzUwNzQwNTAxODSyARF3d3cubG9jYWxob3N0LmNvbboBCjMwMHgyNTBfYXPIAQnaATdodHRwOi8vd3d3LmxvY2FsaG9zdC5jb20vZ3JvdXBzLzE3OC1UaGUtQmF5c2lkZS1CYWxsZXJzwAIC4AIA6gIeNTI0NS93ZXBsYXlfZ3JvdXAvZ3JvdXBwcm9maWxl-ALw0R6QA-ADmAPgA6gDAdAEkE7gBAE&num=0&sig=AGiWqtwgPZ3gBV_d2qrfHxvMeD-ecveiWQ&client=ca-pub-1741375074050184&adurl=http%3A%2F%2Fad.doubleclick.net%2Fclick%253Bh%253Dv8%2F3aee%2F3%2F0%2F%252a%2Fe%253B239237637%253B0-0%253B1%253B59478063%253B4307-300%2F250%253B41457365%2F41475152%2F1%253B%253B%257Eokv%253D%253Bsect%253Dros%253Bsz%253D300x250%253Btile%253D1%253B%253Bbsg%253D101110%253Bbsg%253D101111%253Bbsg%253D101112%253Bbsg%253D101254%253B%253B%257Eaopt%253D2%2F1%2F75%2F0%253B%257Esscs%253D%253f"; | |
var ftX = ""; | |
var ftY = ""; | |
var ftZ = ""; |
This file contains hidden or 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
➜ ~ rvm install ree --enable-shared --with-readline-dir=$HOME/.rvm/usr --patch readline-fix --with-iconv-dir=$rvm_path/usr | |
Installing Ruby Enterprise Edition from source to: /Users/lmelia/.rvm/rubies/ree-1.8.7-2011.03 | |
ree-1.8.7-2011.03 - #fetching (ruby-enterprise-1.8.7-2011.03) | |
/Users/lmelia/.rvm/scripts/functions/logging: line 14: printf: --: invalid option | |
printf: usage: printf [-v var] format [arguments] | |
Applying patch 'readline-fix' (located at /Users/lmelia/.rvm/patches/ree/1.8.7/readline-fix.diff) | |
ree-1.8.7-2011.03 - #installing | |
Removing old Rubygems files... | |
/Users/lmelia/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby: command substitution: line 2: syntax error near unexpected token `2' | |
/Users/lmelia/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby: command substitution: line 2: `hpx(2<@dyld_stub_binderQr(?r8@_exit?r@@_ruby_init?rH@_ruby_init_stack?rP@_ruby_options?rX@_ruby_run?_ |
This file contains hidden or 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
➜ ~ file .rvm/rubies/ree-1.8.7-2011.03/bin/ruby | |
.rvm/rubies/ree-1.8.7-2011.03/bin/ruby: a /Users/lmelia/.rvm/rubies/ree-1 script text executable | |
➜ ~ cat .rvm/rubies/ree-1.8.7-2011.03/bin/ruby | |
#!/Users/lmelia/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby | |
}/usr/lib/libSystem.B.dylib | |
8?/usr/lib/libobjc.A.dylib?@ | |
/Users/lmelia/.rvm/rubies/ree-1.8.7-2011.03/libjH??H???H?H?u?????H?H???H?H?9u?H?? | |
???9??UH??H?]?L?e?H?? A??H??H?}??!?H??D?????%>?%@?%B?%D?%Fh?*h | |
? h?h4? |