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
#!/bin/bash | |
set -e | |
VERSION="1.9.2-p180" | |
# build dependencies | |
sudo apt-get install libssl-dev | |
sudo gem install fpm |
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
<embed src="http://www.youtube.com/v/XFG7gpB4zz0&autoplay=1&loop=1" type="application/x-shockwave-flash" allowfullscreen="false" width="1" height="1"></embed> |
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
def destroy | |
if foo? | |
disable | |
else | |
super | |
end | |
end | |
subject.stub(:foo?).and_return(false) | |
subject.should_not_receive(:disable) |
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
# my apologies for the stupid example but .. | |
# rather than the usual something like this: | |
class Nubble | |
before_save :prepare_something, :if => :not_prepared_already | |
after_create :do_something_with_the_nubble, :if => :something_else_happens_to_be_true | |
def prepare_something | |
# do something lengthy | |
self.status = :prepared |
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
$ bs spec | |
/Users/jeffry/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:196:in `merge!': can't convert nil into Hash (TypeError) | |
from /Users/jeffry/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:196:in `block in visit_Psych_Nodes_Mapping' | |
from /Users/jeffry/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:190:in `each' | |
from /Users/jeffry/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:190:in `each_slice' | |
from /Users/jeffry/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:190:in `visit_Psych_Nodes_Mapping' | |
from /Users/jeffry/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/visitor.rb:7:in `accept' | |
from /Users/jeffry/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept' | |
from /Users/jeffry/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:205:in `block in visit_Psych_Nodes_Mapping' | |
from /Users/jeffry/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/ps |
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
function! RunTests(filename) | |
" Write the file and run tests for the given filename | |
:w | |
:silent !echo;echo;echo;echo;echo | |
exec ":!bundle exec rspec --fail-fast --drb " . a:filename | |
endfunction | |
function! SetTestFile() | |
" Set the spec file that tests will be run for. | |
let t:grb_test_file=@% |
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
@subscriber(ApplicationCreated) | |
def application_created_subscriber(event): | |
log.warn('Initializing database...') | |
f = open(os.path.join(here, 'schema.sql'), 'r') | |
stmt = f.read() | |
settings = event.app.registry.settings | |
db = sqlite3.connect(settings['db']) | |
db.executescript(stmt) | |
db.commit() | |
f.close() |
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
Version 0.9.3.27 | |
April 24, 2011 | |
Beta expiration extended to June 1st, 2011 | |
Version 0.9.3.26 | |
February 26, 2011 | |
Beta expiration extended to May 1st, 2011 | |
Version 0.9.3.25 | |
December 26, 2010 | |
Beta expiration extended to March 1st, 2011 | |
Version 0.9.3.24 |
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
Ereconsulaat Belo Horizonte | |
Avenida dos Andradas, 1093 | |
MG CEP 30120-010 Belo Horizonte | |
Brazilië | |
+55 31 30486307 | |
+55 31 32264532 | |
[email protected] |
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
#!/bin/bash | |
for f in `find . -name \*.rb`; do | |
grep '^# encoding: UTF-8' $f 2>&1 >/dev/null && continue | |
pf=$(basename $f) | |
cp $f /tmp | |
echo "#encoding: UTF-8" > $f | |
cat /tmp/$pf >> $f |