Skip to content

Instantly share code, notes, and snippets.


Alexey Kuleshov kulesa

View GitHub Profile

Keybase proof

I hereby claim:

  • I am kulesa on github.
  • I am kulesa ( on keybase.
  • I have a public key ASDM_x0AoGoam_1agRPuFanXb5YDfsa78f6LKlZwDFsl2wo

To claim this, I am signing this object:

View .eslintrc.js
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true
"settings": {
"ecmascript": 6,
"jsx": true
kulesa / application.js
Created Feb 2, 2015
Webpack config for Rails
View application.js
//= require main.bundle
kulesa / gist:4024626
Created Nov 6, 2012
Librato stack trace
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
kulesa / gist:3898499
Created Oct 16, 2012
vim: promote variable to rspec let
View gist:3898499
function! PromoteToLet()
:normal! dd
" :exec '?^\s*it\>'
:normal! P
:.s/\(\w\+\) = \(.*\)$/let(:\1) { \2 }/
:normal ==
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
kulesa / deploy.rb
Created May 18, 2012 — forked from uhlenbrock/deploy.rb
Precompile assets locally for Capistrano deploy
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}
kulesa / gist:2507892
Created Apr 27, 2012 — forked from dhh/gist:2492118
nested routes for namespaces
View gist:2507892
class ActionDispatch::Routing::Mapper
def draw(routes_name)
instance_eval("config/routes", "#{@scope[:shallow_prefix]}", "#{routes_name}.rb")))
BCX::Application.routes.draw do
draw :projects # => config/routes/projects.rb
namespace :admin do
kulesa /
Created Mar 31, 2012 — forked from erikh/
OSX For Hackers
#!/usr/bin/env sh
# This is script with usefull tips taken from:
# install it:
# curl -sL | sh
kulesa / clean-merged-branches
Created Mar 10, 2012
View clean-merged-branches
#/ 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
You can’t perform that action at this time.