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
#!/bin/sh | |
# | |
# Stupid script that handles big Rails logs in search for activation emails queued on DelayedJobs. | |
# Like I said, stupid. No more than the bug that created the need to do this, but still. | |
# | |
# And nevermind the name. I decided to look the web for inspiration and got an article on Ford, | |
# Chrysler and Lee Iacocca. Thus, iacocca.sh. | |
# | |
echo "spliting log file in 30M tempfiles..." |
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
database: &database | |
adapter: mysql | |
username: <pwd> | |
password: <pwd> | |
host: localhost | |
encoding: utf8 | |
development: | |
<<: *database | |
database: <proj>_development |
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
MAC OS X: | |
*** ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.7.0] | |
user system total real | |
Symbol#to_proc 97.820000 26.180000 124.000000 (128.542748) | |
*** ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-darwin9.7.0] |
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
module Upstream | |
module Streamer | |
def self.included(receiver) | |
receiver.extend ExtensionMethods | |
end | |
module ExtensionMethods | |
def streamable! | |
self.send :include, InstanceMethods |
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
# http://www.jroller.com/dscataglini/entry/speeding_up_method_missing | |
require 'benchmark' | |
include Benchmark | |
class A | |
def foo(a, b, c) | |
1 | |
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
# make gvim set its servername to the current dir | |
_basedir() { | |
basename `pwd` | |
} | |
alias gvim='/Applications/MacVim.app/Content/MacOS/Vim -g --servername $(_basedir)' |
NewerOlder