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
set foldmethod=syntax | |
set foldlevelstart=1 | |
set foldnestmax=5 | |
let javaScript_fold=1 | |
set textwidth=0 | |
"set foldclose=all | |
"colorscheme torte | |
" os x backspace fix |
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
def load_configuration(config_file) | |
if File.exist?(config_file) | |
if defined? RAILS_ENV | |
vidoopcaptcha = YAML.load_file(config_file)[RAILS_ENV] | |
else | |
vidoopcaptcha = YAML.load_file(config_file) | |
end | |
ENV['VIDOOP_SERVER'] = vidoopcaptcha['server'] |
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
it "should build xhtml form pieces" do | |
@captcha.should_receive(:request_image).and_return @image | |
puts @captcha.vidoop_captcha | |
@captcha.vidoop_captcha().should have_tag "div.captcha" do | |
with_tag "img[src=http://api.vidoop.com/vs/captchas/cpt123/image]" | |
with_tag "input[type=hidden][name=captcha_id]" | |
with_tag "input[name=captcha]" | |
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
bj-clarks-macbook-pro:compost bj$ git diff | |
/Users/bjclark/.bin/gitx-diff: fork: Resource temporarily unavailable | |
external diff died, stopping at compost/test/functional/authentication_controller_test.rb. | |
/Users/bjclark/.bin/gitx-diff: fork: Resource temporarily unavailable | |
external diff died, stopping at compost/test/functional/authentication_controller_test.rb. | |
2009-04-07 14:10:48.480 gitx[4657:10b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '[NOTE: this exception originated in the serv | |
couldn't fork: errno 35' | |
2009-04-07 14:10:48.482 gitx[4657:10b] Stack: ( | |
2512331019, | |
2491858491, |
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
git diff --cached | |
fatal: ambiguous argument 'compost/support/js/flyout-0.9.5.js': unknown revision or path not in the working tree. | |
Use '--' to separate paths from revisions |
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
<div class="entry-author"> | |
<address class="vcard"> | |
<span class="fn">Pat Maddox</span> | |
<span class="org">the science department</span> | |
<span class="email">pat.maddox@scidept.com</span> | |
</address> | |
</div> | |
<script type="text/javascript" charset="utf-8"> | |
$('div.entry-author').find("address"). |
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 "rubygems" | |
require "ruby-prof" | |
require "mysql" | |
def print_profile(result) | |
if result | |
printer = RubyProf::FlatPrinter.new(result) | |
printer.print(STDOUT, 0) | |
else | |
puts "There are no result to print." |
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 SomeEvent | |
attr :attr1, :attr2 | |
def to_scribe | |
"#{attr1}\t#{attr2}\n" | |
end | |
end | |
Rails.scribe.event(SomeEvent.new("foo", "bar")) |
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
iRoMac:dev bjclark$ gem list dch | |
*** LOCAL GEMS *** | |
dchelimsky-rspec (1.1.99.13, 1.1.99.6) | |
dchelimsky-rspec-rails (1.1.99.13, 1.1.99.6) | |
iRoMac:dev bjclark$ gem which dchelimsky-rspec-rails | |
Can't find ruby library file or shared library dchelimsky-rspec-rails | |
iRoMac:dev bjclark$ irb | |
irb(main):001:0> require 'rubygems' |
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
task :deploy, :roles => :live_web do | |
set(:deploy_tag) do | |
Capistrano::CLI.ui.ask "Tag to deploy to: " | |
end | |
die 'Tag must be longer than 4 characters' unless deploy_tag.length > 4 | |
`cd #{RAILS_ROOT} && ruby vendor/plugins/newrelic_rpm/bin/newrelic_cmd deployments -e production -r #{deploy_tag}` | |
do_deploy | |
end | |
serial_task :do_deploy, :roles => :live_web do |
OlderNewer