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 | |
CHANNEL = "#shrug_bots" | |
SERVER = 'irc.freenode.net' | |
PORT = 6667 | |
NICK = 'notify' | |
PASS = '' | |
require "socket" |
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
Stats for optimized parallel_specs spec-grouping. | |
Not much, but it's better. | |
Old sorting - Run #1 | |
Process #1: Finished in 190.369665 seconds | |
Process #2: Finished in 196.368211 seconds | |
Real time: 3min 35sec. | |
Old sorting - Run #2 |
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
Bug? | |
The SchemaDumper in rails, which is used by rake db:schema:dump expects there to be either a | |
"pk_and_sequence_for" or "primary_key" on the connection adapter. See line 82: | |
http://github.com/rails/rails/blob/master/activerecord/lib/active_record/schema_dumper.rb#L82 | |
However... the jdbcmysql adapter does not have either method. The result of this is that running | |
"jruby -S rake db:schema:dump" will create a schema.rb where every table has :id => false. |
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
# .autotest in your project or ~/.autotest | |
# This reduces the time from when you save a file to when autotest runs the tests. | |
# Optimization: Quicker response time for the files you change more than once | |
class Autotest | |
alias_method :find_files_orig, :find_files | |
def find_files | |
result = {} | |
@recently_updated ||= [] |
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
... | |
/bin/sh ../../libtool --tag=CC --mode=link /Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2 -O4 -march=core2 -mmmx -msse4.1 -pipe -Wall -L/usr/local/Cellar/gettext/0.17/lib /private/tmp/homebrew-glib-2.20.5-VZb3/glib-2.20.5/iconv/lib/libiconv.a -framework Carbon -o buffered-input-stream buffered-input-stream.o ../../glib/libglib-2.0.la ../../gobject/libgobject-2.0.la ../../gio/libgio-2.0.la -lintl | |
libtool: link: /Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2 -O4 -march=core2 -mmmx -msse4.1 -pipe -Wall -o .libs/g-icon g-icon.o -L/usr/local/Cellar/gettext/0.17/lib /private/tmp/homebrew-glib-2.20.5-VZb3/glib-2.20.5/iconv/lib/libiconv.a ../../glib/.libs/libglib-2.0.dylib ../../gobject/.libs/libgobject-2.0.dylib ../../gio/.libs/libgio-2.0.dylib /private/tmp/homebrew-glib-2.20.5-VZb3/glib-2.20.5/gobject/.libs/libgobject-2.0.dylib /private/tmp/homebrew-glib-2.20.5-VZb3/glib-2.20.5/gmodule/.libs/libgmodule-2.0.dylib /private/tmp/homebrew-glib-2.20.5-VZb3/glib-2.20.5/glib/.libs/libglib-2.0.dylib -liconv -lintl - |
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
# http://gist.github.com/gists/593755 (fork of http://gist.github.com/485785) | |
require 'spec/runner/formatter/progress_bar_formatter' | |
class FailuresDuringRunFormatter < Spec::Runner::Formatter::ProgressBarFormatter | |
def example_failed(example, counter, failure) | |
super # show the 'F' in progress | |
dump_failure(counter, failure) | |
end | |
end | |
class Spec::Runner::Reporter |
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
du -hs `gem env gemdir`/doc | |
# 465M /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/doc | |
sudo rm -r `gem env gemdir`/doc | |
echo 'gem: --no-ri --no-rdoc' >> ~/.gemrc |
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
desc "Continuously watch for changes and rebuild files" | |
task :livereload do | |
pids = `ps ax|grep ruby|grep livereload|awk '{ print $1 }'`.split | |
other_pids = pids.reject { |pid| Process.pid == pid.to_i } | |
system "kill #{other_pids.join(' ')} &> /dev/null" | |
system "nohup livereload &> /dev/null &" | |
require 'rubygems' | |
require 'fssm' |
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
# Install script for Apache+REE+Passenger 3 on Ubuntu 10.04 64bit | |
# BEFORE: | |
# - Make sure you are logged as a non-root user that can sudo. | |
# - Add your key here: | |
SSH_KEY="ssh-rsa ..." | |
# Add key to admin user | |
mkdir -p .ssh && echo "$SSH_KEY" >> .ssh/authorized_keys || exit 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
sudo apt-get update && sudo apt-get install build-essential vim ruby ruby-dev libsqlite3-dev && wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz && tar xvfz rubygems-1.3.7.tgz && cd rubygems-1.3.7 && sudo ruby setup.rb && sudo ln -s /usr/bin/gem1.8 /usr/bin/gem |