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
# I want to say all four tabs have the same set of fields | |
has_dialog :add_reagent_dialog do | |
@common_bits = lambda do | |
has_drop_down :default_staining_protocol1 | |
has_drop_down :default_staining_protocol2 | |
has_drop_down :default_staining_protocol3 | |
has_drop_down :default_staining_protocol4 | |
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
export EDITOR=vi | |
export HISTFILESIZE=1000000 | |
alias ls="ls -laGh" | |
alias mysql="mysql5 -u root $1" | |
PS1="\w $ " | |
set -o vi | |
alias vim=vi |
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
class Withdrawal | |
workflow do | |
state :new do | |
event :request_amount, :transitions_to => :awaiting_payment | |
event :request_max, :transitions_to => :pending_end_of_month | |
end | |
state :awaiting_payment do | |
event :pay, :transitions_to => :paid |
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
# install the mysql gem on os x, when you have apple's ruby but macport's mysql: | |
sudo env ARCHFLAGS="-arch i386" gem install mysql -- \ | |
--with-mysql-dir=/opt/local --with-mysql-lib=/opt/local/lib/mysql5/mysql \ | |
--with-mysql-include=/opt/local/include/mysql5/mysql |
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
Instead of every person in the extended family buying a present for every person | |
in the extended family, which is like, totally crap, this year we played The | |
Present Game. | |
The game works by each participant buying some random gift, to the tune of a | |
budget (ours was $20 AUD), and they are wrapped and all put in a pile. | |
Every participants name is put in a bowl and someone draws and names the person | |
drawn. That person goes and picks a present, unwraps it in front of everyone | |
and shows them what it is. |
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
// just how my cute lua test thingo worked, without setup and | |
// teardown and nesting :) in javascript! | |
var testrunner = { | |
run: function(tests) { | |
for (var test in tests) { | |
if (tests[test].call()) { | |
print(test + " passed.") | |
} else { | |
print(test + " FAILED!") |
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
// i was wondering... | |
var stu = {name:'stu'} | |
var ry = {name:'ry'} | |
var namer = function () { | |
print("wtf is this? it's " + this.name + "!!!") | |
} | |
stu.wtf = namer |
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
gnome-terminal --geometry="120x60" |
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
dr nic! dr nic! | |
his custom codes are really shwick! | |
laziness he gives the flick! | |
dr nic! dir nic! | |
dr nic! coding boom! | |
queenslander presence in the room! | |
he'll move to tassie some day soon | |
dr nic! coding boom! |
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 | |
%w(rubygems hpricot).each { |lib| require(lib) } | |
if ARGV.length < 2 | |
puts "Usage: './backup-databases /path/to/backups label databases,to,ignore'" | |
puts "Example: './backup-databases /tmp/db-backups weekly mysql,information_schema,test'" | |
else |