Skip to content

Instantly share code, notes, and snippets.

View svlasov's full-sized avatar

Sergey Vlasov svlasov

  • Israel
View GitHub Profile
@svlasov
svlasov / rbenv-howto.md
Created September 17, 2012 09:27 — forked from MicahElliott/rbenv-howto.md
Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.

TL;DR Demo

# Ensure system is in ship-shape.

aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev

@svlasov
svlasov / Gemfile
Created September 26, 2012 14:41
Minitest Rails setup
group :test, :development do
gem 'minitest-rails'
end
group :test do
gem "minitest-rails-capybara"
end
@svlasov
svlasov / gist:3788513
Created September 26, 2012 14:55 — forked from prepor/gist:1758845
let for minitest
require 'minitest/spec'
require 'minitest/autorun'
module Helpers
module Let
def let(name, &blk)
define_method name do
@let_assigments ||= {}
@let_assigments[name] ||= send(:"original_#{name}")
@svlasov
svlasov / Gemfile
Created September 27, 2012 05:40
Back to MiniTest+Capybara from RSpec setup
group :test do
gem 'minitest-spec-rails'
gem 'capybara'
gem 'capybara_minitest_spec'
gem 'turn'
end
@svlasov
svlasov / method_logger.rb
Created September 29, 2012 10:58 — forked from nhance/method_logger.rb
Rails compatible method logging. Use this to log all calls to instance methods of a class to the log.
Model.new.foo
@svlasov
svlasov / rmagick.sh
Created November 16, 2012 11:19 — forked from zoras/rmagick.sh
Install RMagick on Ubuntu 11.04
sudo apt-get install libdjvulibre-dev libjpeg-dev libtiff-dev libwmf-dev libmagickcore-dev libmagickwand-dev libmagick++-dev rvm
sudo gem install rmagick
ok!
Fetching: rmagick-2.13.1.gem (100%) Building native extensions. This could take a while ... Successfully installed rmagick-2.13.1 1 gem installed
require 'RMagick' #=> true
@svlasov
svlasov / rmagick.sh
Created December 6, 2012 13:08 — forked from zoras/rmagick.sh
Install RMagick on Ubuntu 11.04
sudo aptitude -y install libdjvulibre-dev libjpeg-dev libtiff-dev libwmf-dev libmagickcore-dev libmagickwand-dev libmagick++-dev rvm
gem install rmagick
ok!
Fetching: rmagick-2.13.1.gem (100%) Building native extensions. This could take a while ... Successfully installed rmagick-2.13.1 1 gem installed
require 'RMagick' #=> true
@svlasov
svlasov / dabblet.css
Created December 10, 2012 17:21
custom style checkboxes
.list {
list-style: none;
border: 1px solid blue;
width: 110px;
}
.elem {
display: inline-block;
border: 1px solid black;
width: 100px;
}
@svlasov
svlasov / index.html
Created December 10, 2012 19:07
A CodePen by svlasov. BERG Cloud Buttons - From [here](http://bergcloud.com/)
<a href="#" class="button blue">
Find Out<br>More
</a>
<a href="#" class="button yellow">
Pre-Order<br>Now
</a>
@svlasov
svlasov / index.html
Created December 10, 2012 19:07
Nice CSS3 Buttons
<a href="#" class="button blue">
Find Out<br>More
</a>
<a href="#" class="button yellow">
Pre-Order<br>Now
</a>