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
// Is there a better way when using call from href? | |
$(document).ready(function() { | |
$.extend($.facebox.settings, {inited: false}); | |
$(document).bind('init.facebox', function() { | |
$('#facebox .close_image').hide(); | |
}); | |
}): |
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
require "benchmark" | |
TIMES = (ARGV[0] || 1_000_000).to_i | |
class A | |
def to_s | |
"foo" | |
end | |
end | |
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
class MyMailerClassTest < ActionMailer::TestCase | |
def test_should_render_special_template_under_circumstance | |
mailer = MyMailerClass.send(:new, 'mailer_method') # new('mailer_method') is a short cut for new.create!('mailer_method') | |
assert_equal 'special_template.html.erb', mailer.template | |
end | |
end |
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
javascript:u=window.location.href.split(/\//);r=u[3]+'/'+u[4];s=prompt('Github Code Search ('+r+')');if(s==null)return;q=s+' repo:'+r;window.location.href='http://github.com/search?q='+q |
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
# spec/spec_helper in waves project | |
require 'rubygems' | |
require 'waves' | |
require 'runtime/console' | |
require 'spec' | |
Waves::Console.load(:mode => 'test') | |
require File.expand_path(File.dirname(__FILE__) + '/../configurations/test') | |
Spec::Runner.configure do |config| |
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
dumont:~ ryanbriones$ /usr/bin/curl -i -F 'login=ryanbriones' -F 'token=[REDACTED]' https://github.com/api/v1/json/ryanbriones/[REDACTED]/commits/master |
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
(* | |
Open New Webkit Window.scpt | |
Open a new Webkit window in the current space | |
Used in conjunction with Quicksilver | |
*) | |
tell application "System Events" | |
if (count (processes whose name is "Webkit")) is 1 then | |
tell application "WebKit" to make new document | |
end if |
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
(* | |
Open New Terminal Window.scpt | |
Open a new Terminal window in the current space | |
Used in conjunction with Quicksilver | |
*) | |
tell application "System Events" | |
if (count (processes whose name is "Terminal")) is 1 then | |
tell application "Terminal" to do script "" | |
end if |
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
# db:migrate:reset was doing nothing for me against (jruby) jdbc/oracle. | |
# added this task, and all is well with the world. | |
# written for Rails 2.2 | |
namespace :db do | |
task :drop do | |
unless defined? RAILS_ENV | |
RAILS_ENV = ENV['RAILS_ENV'] ||= 'development' | |
end | |
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
Spec::Rake::SpecTask.new do |t| | |
t.spec_files = FileList['spec/**/*_spec.rb', 'app/shared/spec/**/*_spec.rb'] | |
end |
OlderNewer