Skip to content

Instantly share code, notes, and snippets.

@fgarcia
fgarcia / git.cap
Created March 10, 2014 16:04 — forked from corny/git.cap
# Save this file as lib/capistrano/tasks/git.cap
namespace :git do
desc 'Copy repo to releases'
task create_release: :'git:update' do
on roles(:all) do
with fetch(:git_environmental_variables) do
within repo_path do
execute :git, :clone, '-b', fetch(:branch), '--recursive', '.', release_path
end
# unicorn
description "unicorn ruby app server"
start on (local-filesystems and net-device-up IFACE=lo and runlevel [2345])
stop on runlevel [!2345]
env WORKDIR=/data
env PIDFILE=/data/tmp/pids/unicorn.pid
env CFGFILE=/data/config/unicorn.rb
@fgarcia
fgarcia / 0_reuse_code.js
Created January 14, 2014 07:51
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@fgarcia
fgarcia / dir2dmg.sh
Created December 10, 2013 13:01 — forked from aisrael/dir2dmg.sh
#!/bin/bash
if [ "$#" -eq 0 ]; then
echo "Usage:"
echo " dir2dmg <path/to/directory>"
exit 1
fi
PWD=`pwd`
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential git-core curl libssl-dev \
libreadline5 libreadline5-dev \
zlib1g zlib1g-dev \
libmysqlclient-dev \
libcurl4-openssl-dev \
libxslt-dev libxml2-dev
@fgarcia
fgarcia / pythonbrew_dep.sh
Created August 17, 2012 20:17 — forked from cristianrasch/pythonbrew_dep.sh
pythonbrew dev dependencies on Debian Squeeze
aptitude install build-essential make
aptitude install tk-dev tix-dev libsqlite3-dev