Skip to content

Instantly share code, notes, and snippets.

Alexey Kuleshov kulesa

  • Moscow, Russia
Block or report user

Report or block kulesa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kulesa
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}
end
@kulesa
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(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 Mar 31, 2012 — forked from erikh/hack.sh
OSX For Hackers
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
#
@kulesa
kulesa / clean-merged-branches
Created Mar 10, 2012
clean-merged-branches
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
You can’t perform that action at this time.