Skip to content

Instantly share code, notes, and snippets.

View zeevallin's full-sized avatar

Zee Vieira zeevallin

View GitHub Profile
@v1nc3ntlaw
v1nc3ntlaw / rbenv-install-system-wide.sh
Last active July 26, 2022 01:08
rbenv install ruby 1.9.3-p448 on Debian 6 Squeeze
# 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
@shapeshed
shapeshed / unicorn
Created September 16, 2011 10:12
Unicorn / Monit setup
#!/bin/sh
set -e
# Example init script, this can be used with nginx, too,
# since nginx and unicorn accept the same signals
# Feel free to change any of the following variables for your app:
TIMEOUT=${TIMEOUT-60}
APP_ROOT=/path/to/your/app/current
PID=$APP_ROOT/tmp/pids/unicorn.pid
ENVIRONMENT=production
@solotimes
solotimes / mongoid_cached_document.rb
Created May 12, 2011 03:01
Some Mongoid extensions I made, to be moved to a repository soon (with tests etc..)
module Mongoid
# Caches the entire document in a Marshall and Redis.
# Defines Document#get(id), adds methods to recache document after a save.
# Add `include Mongoid::CachedDocument` in your model to enable the feature.
module CachedDocument
def self.included(base)
base.class_eval do
include InstanceMethods
extend ClassMethods
before_save :refresh_cache