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 'dbus' | |
require 'eventmachine' | |
module EM | |
module Avahi | |
AVAHI = "org.freedesktop.Avahi" | |
AVAHI_SERVER = "org.freedesktop.Avahi.Server" | |
AVAHI_BROWSER = "org.freedesktop.Avahi.ServiceBrowser" | |
class ServiceBrowser |
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 has_id?(doc) | |
# mongo-ruby-driver seems to take :_id over '_id' for some reason | |
id = doc[:_id] || doc['_id'] | |
return id if id | |
nil | |
end | |
def sanitize_id!(doc) | |
doc[:_id] = has_id?(doc) || BSON::ObjectId.new | |
doc.delete('_id') |
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
" Mappings for tabs moving | |
noremap <silent> <C-S-PageUp> :exe "silent! tabmove " . (tabpagenr() - 2)<CR> | |
noremap <silent> <C-S-PageDown> :exe "silent! tabmove " . tabpagenr()<CR> |
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
# For RVM | |
rvm: bash curl git | |
# For Ruby (MRI & ree) you should install the following OS dependencies: | |
ruby: /usr/bin/apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev |
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 MyError < StandardError; end | |
begin | |
raise "look ma, no NameError" | |
rescue MyError | |
undefined = undefined | |
rescue Exception | |
undefined | |
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 MyError < StandardError; end | |
begin | |
raise "look ma, no NameError" | |
rescue MyError | |
undefined = "defined" | |
puts undefined | |
rescue Exception | |
puts undefined | |
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
[ pid=16079 thr=4120880 file=utils.rb:176 time=2011-07-02 03:12:16.715 ]: *** Exception LoadError in PhusionPassenger::Rack::ApplicationSpawner (no such file to load -- bundler) | |
(process 16079, thread #<Thread:0x7dc260>): | |
from /usr/local/rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' | |
from /usr/local/rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' | |
from /usr/local/rvm/gems/ree-1.8.7-2011.03/gems/passenger-3.0.7/lib/phusion_passenger/utils.rb:325:in `prepare_app_process' | |
from /usr/local/rvm/gems/ree-1.8.7-2011.03/gems/passenger-3.0.7/lib/phusion_passenger/rack/application_spawner.rb:155:in `initialize_server' | |
from /usr/local/rvm/gems/ree-1.8.7-2011.03/gems/passenger-3.0.7/lib/phusion_passenger/utils.rb:572:in `report_app_init_status' | |
from /usr/local/rvm/gems/ree-1.8.7-2011.03/gems/passenger-3.0.7/lib/phusion_passenger/rack/application_spawner.rb:153:in `init |
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
#!/usr/bin/env rake | |
task "test:first" do | |
puts "yada yada" | |
end | |
task "test:second" do | |
puts "kaka dudu" | |
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 WidgetsTest < Bbq::TestCase | |
scenario "old school" do | |
user = TestUser.new | |
user.visit root_url | |
user.within "#foo" do | |
user.see! "bar" | |
end | |
end | |
scenario "page components wrapped as widgets for the glory!" do |
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
BlackBerry Pearl 8130 Trusted Certificate Authorities | |
----------------------------------------------------- | |
Anny Way WAP Root (has red X icon - expired) | |
Baltimore CybertTrust Mobile Root | |
Baltimore CybertTrust Root | |
Certicom MobileTrust RSA Root | |
Comodo AAA Certificate Services | |
Comodo AddTrust External CA Root | |
Comodo UTN USERFirst Client |