Florent Monbillard EppO

View consoleoutput.rb
1 2 3 4 5 6 7
irb(main):001:0> f = Folk.first
Folk Load (0.2ms) SELECT "folks".* FROM "folks" ORDER BY "folks"."id" ASC LIMIT 1
=> #<Folk id: 1, email: "folk@rockandfolk.com", encrypted_password: "$2a$10$bBJsiFh52QCNi0enN57XeerS2M7Tx8TXWXOgO9xj9pS8...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil, created_at: "2014-01-27 16:56:02", updated_at: "2014-01-27 16:56:02">
irb(main):002:0> f.add_role :staff
Role Load (0.2ms) SELECT "roles".* FROM "roles" WHERE "roles"."name" = 'staff' AND "roles"."resource_type" IS NULL AND "roles"."resource_id" IS NULL ORDER BY "roles"."id" ASC LIMIT 1
Role Exists (27.6ms) SELECT 1 AS one FROM "roles" INNER JOIN "folks_roles" ON "roles"."id" = "folks_roles"."role_id" WHERE "folks_roles"."folk_id" = ? AND "roles"."id" = 2 LIMIT 1 [["folk_id", 1]]
(0.2ms) SELECT "roles".id FROM "roles" INNER JOIN "folks_roles" ON "roles"."id" = "folks_ro
View brew doctor
1 2 3 4 5 6 7 8 9 10
$ brew doctor
Your system is ready to brew.
 
$ brew --config
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew
HEAD: 4f2f733bb54a1523e7f39fa6b5f0f8ddb925e5e7
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
View gist:4227865
1 2 3 4 5 6 7 8 9
# User model
class Usuario < ActiveRecord::Base
rolify :role_cname => 'Rol'
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable,
# :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
View gist:3873342
1 2 3 4 5
#XML
$ curl http://something/xml | xmllint —format -
 
#JSON
$ curl http://something/json | python -mjson.tool
View rbx 2.0 + rubygems 1.8.11
1 2 3 4 5 6 7 8 9 10
$ rvm use rbx@rbgems1.8.11
Using /Users/florent/.rvm/gems/rbx-head with gemset rubygems-1.8.11
 
$ gem -v
1.8.11
 
$ ruby -v
rubinius 2.0.0dev (1.8.7 d1c8aa95 yyyy-mm-dd JI) [x86_64-apple-darwin11.2.0]
 
$ time bundle install
View sequel + fiveruns-memcache-client
1 2 3 4 5 6 7 8 9 10
$ sequel postgres://mylogin:mypasswd@localhost/bddtest
Your database is stored in DB...
>> require 'memcache'
=> true
>> MemCache
=> MemCache
>> MemCache::VERSION
=> "1.5.0.1"
>> CACHE = MemCache.new("localhost")
=> MemCache: 1 servers, 1 buckets, ns: nil, ro: false
View Ruby 1.8.7 MRI - ARCHFLAGS="-arch x86_64" gem install memcached
1 2 3 4 5 6 7 8 9 10
# ruby bench.rb
/opt/local/lib/ruby/gems/1.8/gems/memcached-0.17.3/lib/rlibmemcached.bundle: dlopen(/opt/local/lib/ruby/gems/1.8/gems/memcached-0.17.3/lib/rlibmemcached.bundle, 9): Symbol not found: _memcached_free (LoadError)
Referenced from: /opt/local/lib/ruby/gems/1.8/gems/memcached-0.17.3/lib/rlibmemcached.bundle
Expected in: flat namespace
in /opt/local/lib/ruby/gems/1.8/gems/memcached-0.17.3/lib/rlibmemcached.bundle - /opt/local/lib/ruby/gems/1.8/gems/memcached-0.17.3/lib/rlibmemcached.bundle
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /opt/local/lib/ruby/gems/1.8/gems/memcached-0.17.3/lib/memcached.rb:19
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from bench.rb:2
Something went wrong with that request. Please try again.