Jérémy Van de Wyngaert jeremyvdw

View gist:7351993
1 2 3 4 5 6 7 8 9 10
if [[ -e /usr/local/share/chruby ]]; then
# Load chruby
source '/usr/local/share/chruby/chruby.sh'
 
# Automatically switch rubies
source '/usr/local/share/chruby/auto.sh'
 
# Set a default ruby if a .ruby-version file exists in the home dir
if [[ -f ~/.ruby-version ]]; then
chruby $(cat ~/.ruby-version)
View gist:5055886
1 2 3 4 5 6 7 8 9 10
> db.players.find( { team_id: { $in: ["phi"] } }).sort({last_name: 1}).explain()
{
"cursor" : "BtreeCursor team_id_1",
"isMultiKey" : false,
"n" : 37,
"nscannedObjects" : 37,
"nscanned" : 37,
"nscannedObjectsAllPlans" : 74,
"nscannedAllPlans" : 74,
"scanAndOrder" : true,
View gist:3699810
1 2 3 4 5 6 7 8 9 10
jeremy:preplaysports-api/ (rbx-2.0.testing) (master✗) $ foreman start worker=10 [18:47:20]
18:47:37 worker.1 | started with pid 34890
18:47:37 worker.2 | started with pid 34891
18:47:37 worker.3 | started with pid 34892
18:47:37 worker.4 | started with pid 34893
18:47:37 worker.5 | started with pid 34894
18:47:37 worker.6 | started with pid 34895
18:47:37 worker.7 | started with pid 34896
18:47:37 worker.8 | started with pid 34897
18:47:37 worker.9 | started with pid 34898
View gist:3692550
1 2 3 4 5 6 7 8 9 10
Redis::TimeoutError: Connection timed out
 
vendor/bundle/ruby/1.9.1/bundler/gems/redis-rb-4f7eadc119ba/lib/redis/client.rb:198 • rescue in io
vendor/bundle/ruby/1.9.1/bundler/gems/redis-rb-4f7eadc119ba/lib/redis/client.rb:196 • io
vendor/bundle/ruby/1.9.1/bundler/gems/redis-rb-4f7eadc119ba/lib/redis/client.rb:204 • read
vendor/bundle/ruby/1.9.1/bundler/gems/redis-rb-4f7eadc119ba/lib/redis/client.rb:142 • block in call_pipelined
vendor/bundle/ruby/1.9.1/bundler/gems/redis-rb-4f7eadc119ba/lib/redis/client.rb:177 • block (2 levels) in process
vendor/bundle/ruby/1.9.1/bundler/gems/redis-rb-4f7eadc119ba/lib/redis/client.rb:281 • ensure_connected
vendor/bundle/ruby/1.9.1/bundler/gems/redis-rb-4f7eadc119ba/lib/redis/client.rb:167 • block in process
vendor/bundle/ruby/1.9.1/bundler/gems/redis-rb-4f7eadc119ba/lib/redis/client.rb:242 • logging
View Redis::TimeoutError
1 2 3 4 5 6 7 8 9 10
Redis::TimeoutError: Connection timed out
Collapse
vendor/bundle/ruby/1.9.1/bundler/gems/redis-rb-4f7eadc119ba/lib/redis/client.rb:198 • rescue in io
vendor/bundle/ruby/1.9.1/bundler/gems/redis-rb-4f7eadc119ba/lib/redis/client.rb:196 • io
vendor/bundle/ruby/1.9.1/bundler/gems/redis-rb-4f7eadc119ba/lib/redis/client.rb:204 • read
vendor/bundle/ruby/1.9.1/bundler/gems/redis-rb-4f7eadc119ba/lib/redis/client.rb:142 • block in call_pipelined
vendor/bundle/ruby/1.9.1/bundler/gems/redis-rb-4f7eadc119ba/lib/redis/client.rb:177 • block (2 levels) in process
vendor/bundle/ruby/1.9.1/bundler/gems/redis-rb-4f7eadc119ba/lib/redis/client.rb:281 • ensure_connected
vendor/bundle/ruby/1.9.1/bundler/gems/redis-rb-4f7eadc119ba/lib/redis/client.rb:167 • block in process
vendor/bundle/ruby/1.9.1/bundler/gems/redis-rb-4f7eadc119ba/lib/redis/client.rb:242 • logging
View celluloid_registry_issue.rb
1 2 3 4 5 6 7 8 9 10
require 'celluloid'
require 'awesome_print'
 
Celluloid.logger = Logger.new STDOUT
 
class Monitor
include Celluloid
attr_reader :name
View gist:2344813
1 2 3 4 5 6 7 8 9 10
diff --git a/app/models/trophy.rb b/app/models/trophy.rb
index 059ccca..b9bf3ee 100644
--- a/app/models/trophy.rb
+++ b/app/models/trophy.rb
@@ -201,12 +201,12 @@ class Trophy
trophies = trophies_list
- user_values = Statistics::UserActivity::Query.new.for_user(user_id) do
- trophies.map { |trophy| metric_promise(trophy.dimension, trophy.metric) }
View apubnub.rb
1 2 3 4 5 6 7 8 9 10
require 'eventmachine'
require 'em-http-request'
require 'yajl'
 
module PubSub
class Pubnub
#**
#* Pubnub
#*
#* Init the Pubnub Client API
View async_upload.rb
1 2 3 4 5 6 7 8 9 10
require 'goliath'
require 'yajl'
 
# adapted from goliath/examples/async_upload.rb
class AsyncUpload < Goliath::API
use Goliath::Rack::Params # parse & merge query and body parameters
use Goliath::Rack::DefaultMimeType # cleanup accepted media types
use Goliath::Rack::Render, 'json' # auto-negotiate response format
 
def on_headers(env, headers)
View Gemfile
1 2 3 4
source :gemcutter
 
gem 'goliath', :git => 'git://github.com/postrank-labs/goliath.git'
gem 'em-synchrony', :git => 'git://github.com/igrigorik/em-synchrony.git'
Something went wrong with that request. Please try again.