Skip to content

Instantly share code, notes, and snippets.

View kulesa's full-sized avatar

Alexey Kuleshov kulesa

  • Limassol, Cyprus
View GitHub Profile

Keybase proof

I hereby claim:

  • I am kulesa on github.
  • I am kulesa (https://keybase.io/kulesa) on keybase.
  • I have a public key ASDM_x0AoGoam_1agRPuFanXb5YDfsa78f6LKlZwDFsl2wo

To claim this, I am signing this object:

@kulesa
kulesa / .eslintrc.js
Created July 24, 2015 13:20
ESLint config
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true
},
"settings": {
"ecmascript": 6,
"jsx": true
},
@kulesa
kulesa / application.js
Created February 2, 2015 18:45
Webpack config for Rails
//= require main.bundle
@kulesa
kulesa / gist:4024626
Created November 6, 2012 13:06
Librato stack trace
/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
kulesa / gist:3898499
Created October 16, 2012 10:15
vim: promote variable to rspec let
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" PROMOTE VARIABLE TO RSPEC LET
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! PromoteToLet()
:normal! dd
" :exec '?^\s*it\>'
:normal! P
:.s/\(\w\+\) = \(.*\)$/let(:\1) { \2 }/
:normal ==
endfunction
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
kulesa / deploy.rb
Created May 18, 2012 12:01 — forked from uhlenbrock/deploy.rb
Precompile assets locally for Capistrano deploy
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
@kulesa
kulesa / gist:2507892
Created April 27, 2012 09:44 — forked from dhh/gist:2492118
nested routes for namespaces
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
@kulesa
kulesa / hack.sh
Created March 31, 2012 12:06 — forked from erikh/hack.sh
OSX For Hackers
#!/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
#
@kulesa
kulesa / clean-merged-branches
Created March 10, 2012 14:45
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