Skip to content

Instantly share code, notes, and snippets.

View mpapis's full-sized avatar
🙃
I am slow to respond, ping me when it's crucial.

Michal Papis mpapis

🙃
I am slow to respond, ping me when it's crucial.
View GitHub Profile
@mpapis
mpapis / powrc.sh
Last active June 10, 2020 21:31 — forked from nbibler/gist:5307941
if
[ -f "$rvm_path/scripts/rvm" ]
then
__env="$( "$rvm_path/bin/rvm" . do env --path )"
if
[ -n "$__env" ] &&
[ -s "$__env" ]
then
source "$__env"
fi
@mpapis
mpapis / gist:5334353
Last active December 15, 2015 22:39 — forked from iewnait/gist:5332536
set :stages, %w(production sandbox)
set :default_stage, "sandbox"
require 'capistrano/ext/multistage'
set :application, "blogtest"
set :repository, "git@github.com:iewnait/blogtest.git"
default_run_options[:pty] = true
set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names
@mpapis
mpapis / README.md
Last active December 15, 2015 10:29
An open letter to Github

As GitHub does not include a message when answering my questions I decided to keep track of them myself, this is container gist for my questions and all the answers I get.

Most of the issues are for RVM to make my life easier.

@mpapis
mpapis / bla.md
Last active December 15, 2015 08:39
transform options to or string #bash
$ ./bla.sh 'y[es], n[o], v[iew], c[ancel], [al]l'
all|c|cancel|l|n|no|v|view|y|yes
module PythonishDecorator
def method_added(name)
return unless @decorations
decorations = @decorations.dup
@decorations = nil
alias_method "undecorated_#{name}", name
define_method(name) do |*args|
@mpapis
mpapis / rvm-rvmrc-warning.md
Created March 16, 2013 16:41
A new #RVM warning when automatically loading #Gemfile

$ cd rvm-site

RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too, you can ignore these warnings with 'rvm rvmrc warning ignore /home/mpapis/projects/rvm/rvm-site/Gemfile'. To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'.

@mpapis
mpapis / log.sh
Last active December 14, 2015 22:09 — forked from wcleveland/gist:5156412
Output of rvm reinstall 1.9.3 --debug
Using ScientificLinux 6.3 and installed rvm with `curl -L https://get.rvm.io | sudo bash -s head`
[user@Scientific ~]$ rvm install 1.9.3 --debug
Already installed ruby-1.9.3-p392.
To reinstall use:
rvm reinstall 1.9.3
__rvm_rm_rf already gone: /usr/local/rvm/tmp/28625*
@mpapis
mpapis / gist:5143919
Last active December 14, 2015 20:28 — forked from FooBarWidget/gist:5143568

When RVM is installed as single-user

Your RVM wrapper scripts are too old, or some wrapper scripts are missing. Please update/regenerate them first by running:

rvm get stable && rvm reload && rvm repair all

If that doesn't seem to work, please run:

rvm wrapper #{rvm_ruby_string} --no-prefix --all

You have your Rails Apps with specific Gemsets in RVM.

The following commands creates a wrapped unicorn_rails bin. Be sure to replace the variables and that you have unicorn in your bundle.

rvmsudo rvm wrapper [RUBY VERSION]@[GEMSET] [GEMSET] unicorn_rails

Now you have a /usr/local/rvm/bin/[GEMSET]_unicorn_rails I will refer to [GEMSET]_unicorn_rails as [WRAPPED_NAME]