Skip to content

Instantly share code, notes, and snippets.

View hone's full-sized avatar

Terence Lee hone

View GitHub Profile
@hone
hone / .vimrc
Created September 11, 2009 21:56
set nocompatible " We're running Vim, not Vi!
syntax on " Enable syntax highlighting
set nocp " for omnicppcomplete plugin
filetype on " Enable filetype detection
filetype indent on " Enable filetype-specific indenting
filetype plugin on " Enable filetype-specific plugins
set laststatus=2
set statusline=%<%f\ %h%m%r%=%-20.(%)\%h%m%r%=%-40(%n%Y%)\%P
set nocul " cursor line
set cf " Enable error files & error jumping
@hone
hone / selenium
Created September 17, 2009 16:24
require 'selenium'
# start selenium server
selenium_server = Selenium::RemoteControl::RemoteControl.new("0.0.0.0", 4444, {:timeout => 5000})
selenium_server.start
selenium = Selenium::SeleniumDriver.new("0.0.0.0", 4444, "*firefox3", "http://localhost")
selenium.start
When /^I follow "([^\"]*)"$/ do |link|
if CUCUMBER_ENV == :enhanced
# hack to get follow link to work right in selenium.
begin
selenium.wait_for :wait_for => :text, :text => link
rescue Selenium::CommandError
selenium.wait_for_page(5)
end
end
click_link(link)
class DeferredMailer < ActionMailer::Base
def deliver(*args)
EM.defer{ super }
end
end
module DelayedJobHelper
def stub_send_later(klass)
old_method = klass.method(:send_later)
klass.module_eval do
def self.send_later(method, *args)
self.send(method, *args)
end
end
module S3
def self.extended base
warn('[DEPRECATION] S3 support through RightAWS is deprecated. S3 support will ' +
'be changed to AWS::S3 in a future version.')
require 'right_aws'
// cpp file
TheVisitor::TheVisitor()
{
depth = 0;
}
void TheVisitor::VisitElement( Element* thisele )
{
list<Attr*> attrcopy = thisele->Copyattrs();
list<Node*> nodecopy = thisele->Copynodes();
<bringo> indded
if I could invoice MS for all the countless extra hours I have spent over that past years just to make things work with their broken shit. i would be rich.
<johnny> you and me both..
:(
class action lawsuit over lost productivity?
<bringo> i was just thinking that
<hone> for stuff in general or just ie6?
<asciant> lol
<bringo> good question. maybe several lawsuits are in order.
when /the (.*) registration page/
case $1
when /venue director/
'/register/director'
end
config.gem "openrain-action_mailer_tls",
:lib => "smtp_tls.rb",
:source => "http://gems.github.com"