View .eslintrc.js
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true
},
"settings": {
"ecmascript": 6,
"jsx": true
},
View application.js
//= require main.bundle
View gist:4024626
/Users/pro/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.1.3/lib/active_support/whiny_nil.rb:48:in `method_missing': undefined method `keys' for nil:NilClass (NoMethodError)
from /Users/pro/.rvm/gems/ruby-1.9.3-p194/bundler/gems/librato-rails-7fdb0ec65cb2/lib/librato/rails.rb:57:in `check_config'
from /Users/pro/.rvm/gems/ruby-1.9.3-p194/bundler/gems/librato-rails-7fdb0ec65cb2/lib/librato/rails.rb:111:in `setup'
from /Users/pro/.rvm/gems/ruby-1.9.3-p194/bundler/gems/librato-rails-7fdb0ec65cb2/lib/librato/rails/railtie.rb:11:in `block in <class:Railtie>'
from /Users/pro/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/pro/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `run'
from /Users/pro/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.1.3/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/pro/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `each'
from /Users/pro/.r
View gist:3898499
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" PROMOTE VARIABLE TO RSPEC LET
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! PromoteToLet()
:normal! dd
" :exec '?^\s*it\>'
:normal! P
:.s/\(\w\+\) = \(.*\)$/let(:\1) { \2 }/
:normal ==
endfunction
View gist:3117600
19:13:56 sidekiq.1 | Thread TID-ousccjq2c
19:13:56 sidekiq.1 | /Users/pro/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/monitor.rb:185:in `mon_enter'
19:13:56 sidekiq.1 | /Users/pro/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/monitor.rb:209:in `mon_synchronize'
19:13:56 sidekiq.1 | /Users/pro/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:290:in `checkin'
19:13:56 sidekiq.1 | /Users/pro/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:176:in `release_connection'
19:13:56 sidekiq.1 | /Users/pro/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:386:in `block in clear_active_connections!'
19:13:56 sidekiq.1 | /Users/pro/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:386:in `each_value'
19:13:56 sidekiq.1 | /Users/pro/.rvm/gems/ruby-1.9.3-p12
View deploy.rb
load 'deploy/assets'
namespace :deploy do
namespace :assets do
desc 'Run the precompile task locally and rsync with shared'
task :precompile, :roles => :web, :except => { :no_release => true } do
%x{bundle exec rake assets:precompile}
%x{rsync --recursive --times --rsh=ssh --compress --human-readable --progress public/assets #{user}@#{host}:#{shared_path}}
%x{bundle exec rake assets:clean}
end
View gist:2507892
class ActionDispatch::Routing::Mapper
def draw(routes_name)
instance_eval(File.read(Rails.root.join("config/routes", "#{@scope[:shallow_prefix]}", "#{routes_name}.rb")))
end
end
BCX::Application.routes.draw do
draw :projects # => config/routes/projects.rb
namespace :admin do
View hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
View clean-merged-branches
#!/bin/sh
#/ Usage: clean-merged-branches [-f]
#/ Delete merged branches from the origin remote.
#/
#/ Options:
#/ -f Really delete the branches. Without this branches are shown
#/ but nothing is deleted.
set -e
# show usage maybe
View gist:1341179
namespace :resque do
task :setup => :environment do
Resque.before_fork { ActiveRecord::Base.connection.disconnect! }
Resque.after_fork { ActiveRecord::Base.establish_connection }
end
end