Skip to content

Instantly share code, notes, and snippets.

@ChangJoo-Park
ChangJoo-Park / gist:5443017
Last active January 29, 2019 20:55
# Ubuntu 13.04 , linux mint install RVM with Ruby 2.0.0-p353 , Rails 4.0.0
# If you meet install errors, see abid-hussain's comment
sudo apt-get --force-yes install build-essential openssl libreadline6 libreadline6-dev curl git-core \
zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev \
libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison
&&
\curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled
@JamesDullaghan
JamesDullaghan / digitalocean.md
Created July 6, 2013 20:54
Deploy rails app to digitalocean with nginx, unicorn, capistrano & postgres

Deploy Rails app to digitalocean with nginx, unicorn, capistrano & postgres

Create droplet of your liking (ubuntu 12.10 x32)

ssh to root in terminal with your server ip

ssh [email protected]

Add ssh fingerprint and enter password provided in email

@robmiller
robmiller / .gitconfig
Created July 17, 2013 07:52
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
@nextofsearch
nextofsearch / gist:6497091
Created September 9, 2013 15:20
deploy.rb for capistrano
require 'bundler/capistrano'
require 'capistrano-unicorn'
set :stages, %w(production staging)
set :default_stage, "staging"
require 'capistrano/ext/multistage'
# set :env, fetch(:env, "production")
set :application, "tp"
@XORwell
XORwell / simple_form_bootstrap.rb
Last active September 3, 2018 05:15
bootstrap 3 simple_form wrappers
# http://stackoverflow.com/a/18684021
# Bootstrap 3
inputs = %w[
CollectionSelectInput
DateTimeInput
FileInput
GroupedCollectionSelectInput
NumericInput
PasswordInput
RangeInput
@brendanstennett
brendanstennett / steps
Last active December 19, 2019 12:08 — forked from trcarden/gist:3295935
Setting up SSL with Nginx and Unicorn
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@mdeous
mdeous / color.py
Created January 5, 2014 15:45
Python Shell Output Color
COLOR_CODES = {
'green': '\033[32m',
'bgreen': '\033[1;32m',
'bgrey': '\033[1;30m',
'reset': '\033[0m'
}
def color(text, color_name):
return COLOR_CODES[color_name]+text+COLOR_CODES['reset']
@michelemina
michelemina / deploy.rb
Last active January 17, 2017 12:18
oracle client capistrano install task: useful when ruby-oci8 is required in a server
...
set :default_environment, {
'LD_LIBRARY_PATH' => "#{shared_dir}/oracle/"
}
@lemiorhan
lemiorhan / post-receive
Last active April 12, 2025 19:13
Post-receive hook to deploy the code being pushed to production branch to a specific folder
#!/bin/bash
target_branch="production"
working_tree="PATH_TO_DEPLOY"
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then
@bagf
bagf / vagrant_precise32_install_php5.5.9.sh
Last active August 29, 2015 13:57
Downloads PHP 5.5.9 and builds it from source, then processed to use PECL to install memcache, libxl, openssl and gearman extensions
#!/bin/sh
echo "Installing php5 build dependencies..."
apt-get build-dep -q=2 php5
cd /tmp
# Get PHP
echo "Downloading and extracting php5.5.9 source..."
wget -q -O php5.5.9.tar.xz http://us2.php.net/get/php-5.5.9.tar.xz/from/this/mirror
tar xf php5.5.9.tar.xz
cd php-5.5.9/