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
#!/usr/bin/env bash
#
# Automatically sets the wrappers for textmate's use
# Based on article posted: http://www.christopherirish.com/2010/06/28/how-to-setup-textmate-to-use-rvm/
# Set up the TM_RUBY shell variable as described and remove the Builder as described and restart TextMate
#
# Make this script executable and you should be good to go! TextMate will stay in sync with rvm, which
# generally means the last project folder you switched into from terminal shell.
#
if [[ $TM_WRAPPING != "1" ]]; then
require "rvm/with"
Bundler.with_clean_env do
RVM.with "in ." do |r|
puts r.execute "bundle install"
puts r.execute "rake db:create db:migrate db:setup"
end
end
@mpapis
mpapis / sudoers
Last active December 26, 2015 20:09 — forked from anonymous/output
nick ALL=NOPASSWD:/sbin/start foo,/sbin/stop foo,/sbin restart foo,/sbin/service foo start,/sbin/service foo stop,/sbin/service foo restart,/home/nick/.rvm/wrappers/foo/foreman
@mpapis
mpapis / deploy.rb
Last active December 26, 2015 17:29 — forked from anonymous/deploy.rb
require "rvm1/capistrano3"
after 'deploy:updating', 'deploy:bundle_install'
namespace :deploy do
task :bundle_install do
on roles(:app) do
within release_path do
execute :bundle, "install --quiet --system --without [:test, :development]"
end
end
@mpapis
mpapis / gist:6845898
Last active December 24, 2015 18:49 — forked from headius/gist:6837592
[2013-10-05 01:53:57] env
current path: /Users/headius/.rvm/src/rbx-2.0.0
command(8): env /Users/headius/.rvm/wrappers/ruby-2.0.0-p247@rubinius/ruby ./configure --prefix=/Users/headius/.rvm/rubies/rbx-2.0.0 --with-opt-dir=/usr/local/opt/libyaml --with-opt-dir=/usr/local/opt/readline --with-opt-dir=/usr/local/opt/libksba --with-opt-dir=/usr/local/opt/openssl
Checking gcc: found
Checking g++: found
Checking bison: found
Configuring LLVM...
Checking for existing LLVM library tree: not found.
Checking for 'llvm-config': not found
Checking for prebuilt LLVM package...
#!/bin/sh
OSX_VERS=$(sw_vers -productVersion | awk -F "." '{print $2}')
# Get Xcode CLI tools
# https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/index-3905972D-B609-49CE-8D06-51ADC78E07BC.dvtdownloadableindex
TOOLS=clitools.dmg
if [ "$OSX_VERS" -eq 7 ]; then
DMGURL=http://devimages.apple.com/downloads/xcode/command_line_tools_for_xcode_os_x_lion_april_2013.dmg
elif [ "$OSX_VERS" -eq 8 ]; then
DMGURL=http://devimages.apple.com/downloads/xcode/command_line_tools_for_xcode_os_x_mountain_lion_april_2013.dmg
@mpapis
mpapis / config.ru
Last active December 23, 2015 13:39
require 'rubygems'
require 'bundler'
require 'bundler-unload'
ALL_GEMS = Bundler.rubygems.plain_specs
Bundler.require :default
require 'sinatra'
require 'yaml'
require 'multi_json'
RAILS_ROOT=/home/deployer/apps/arcsite/current
UNICORN=/home/deployer/.rvm/wrappers/arcsite/unicorn
@mpapis
mpapis / gist:6391211
Last active December 22, 2015 00:39 — forked from Ch00k/gist:6391153
if
__system_and_version_is SunOS 5.10
then
if __rvm_which sudo >/dev/null 2>&1
then sudo_path=""
else sudo_path=/opt/csw/bin/
fi
else
sudo_path=""
fi