Skip to content

Instantly share code, notes, and snippets.


Boris Kuznetsov achempion

Block or report user

Report or block achempion

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
leemour / carrierwave_selectel.rb
Last active Feb 28, 2019
Carrierwave integration with Selectel using fog-openstack
View carrierwave_selectel.rb
CarrierWave.configure do |config|
if Rails.env.test? || Rails.env.cucumber? = :file
config.enable_processing = false
config.asset_host = Rails.application.secrets.asset_host
config.fog_provider = 'fog/openstack'
config.fog_credentials = {
provider: 'OpenStack',
openstack_auth_url: '',
alias gs='git status '
alias ga='git add '
alias gb='git branch '
alias gc='git commit'
alias gd='git diff'
alias gco='git checkout '
alias gp='git push '
alias gpf='git push --force '
alias gpr='git pull --rebase '
rauchg /
Last active Jan 7, 2020
View screen_cheatsheet.markdown

Screen Quick Reference


Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r <session_name>
JamesMGreene /
Last active Apr 10, 2020
A comparison of using `git flow` commands versus raw `git` commands.


gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

Bugagazavr / carrierwave.rb
Created Jan 15, 2014
Carrierwave + Selectel
View carrierwave.rb
CarrierWave.configure do |config|
if Rails.env.development? || Rails.env.test? = :file
else = :fog
config.fog_credentials = {
:provider => 'OpenStack',
:openstack_auth_url => '',
:openstack_username => Rails.application.secrets.openstack_username,
:openstack_api_key => Rails.application.secrets.openstack_api_key
nghuuphuoc / gist:8282411
Last active Feb 12, 2020
Install wkhtmltopdf on Centos 6 x64
View gist:8282411
$ wget
$ tar xvjf wkhtmltopdf-0.9.9-static-amd64.tar.bz2
$ mv wkhtmltopdf-amd64 /usr/bin/wkhtmltopdf
// In case you got the issue
// wkhtmltopdf: error while loading shared libraries:
// cannot open shared object file: No such file or directory
// run the command below:
$ yum install urw-fonts libXext libXrender fontconfig
chrisbarrett / ruby-hideshow.el
Last active Oct 16, 2019
Ruby code folding using hideshow
View ruby-hideshow.el
(eval-after-load "hideshow"
'(add-to-list 'hs-special-modes-alist
,(rx (or "def" "class" "module" "{" "[")) ; Block start
,(rx (or "}" "]" "end")) ; Block end
,(rx (or "#" "=begin")) ; Comment start
ruby-forward-sexp nil)))
View Testing REST APIs with Cucumber and Rack::Test
# First attempting to use Capybara directly, you will ran into issues when trying to set HTTP header.
# Using Basic HTTP Authentication requires that we needed to set the header.
# Also we need to set the Content-Type and Accept headers to ensure that Rails handles the input and output correctly.
# When using Rack, Capybara delegates request and response handling down to Rack::Test.
# So I used Rack::Test directly in my step definitions, and it works.
# Rack::Test has a module called Rack::Test::Methods that can be mixed into a class to provide it
# with methods for get, post, put, delete as well as last_request, last_response, header and more.
# I mixed Rack::Test::Methods into the Cucumber world at the top of our API steps file like so:
liamdon / gist:2467603
Created Apr 22, 2012
CoffeeScript, Jade and Stylus syntax highlighting in Sublime Text 2
View gist:2467603

Step 1: Clone the bundles into your Sublime Text packages directory

cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
git clone git:// CoffeeScript
git clone Jade
git clone Stylus

Step 2: Restart Sublime Text 2

You can’t perform that action at this time.