Skip to content

Instantly share code, notes, and snippets.

View dalecaru's full-sized avatar

Damián Caruso dalecaru

View GitHub Profile

Keybase proof

I hereby claim:

  • I am dalecaru on github.
  • I am dalecaru (https://keybase.io/dalecaru) on keybase.
  • I have a public key ASDt1mguX0v3jKU9bimqMSxhEwsk46bdokQoRFzFJ3c5SAo

To claim this, I am signing this object:

@dalecaru
dalecaru / config.ru
Created July 18, 2013 17:44
Run static site with rack
APP_ROOT = ::File.expand_path('public', ::File.dirname(__FILE__))
require 'rack'
require 'rack/content_length'
require 'rack/file'
module Rack
class DirectoryIndex
def initialize(app, root)
@app = app
@root = root
@dalecaru
dalecaru / god
Created February 27, 2012 05:36
God init script - Ubuntu 10.04
#!/bin/sh
### BEGIN INIT INFO
# Provides: god
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: God
### END INIT INFO
@dalecaru
dalecaru / innobackupex-restore.sh
Created April 20, 2011 13:42
Scripts to create and restore full and incremental backups (for all databases on server) using innobackupex from Percona.
#!/bin/sh
#
# Script to prepare and restore full and incremental backups created with innobackupex-runner.
#
# This script is provided as-is; no liability can be accepted for use.
#
INNOBACKUPEX=innobackupex-1.5.1
INNOBACKUPEXFULL=/usr/bin/$INNOBACKUPEX
TMPFILE="/tmp/innobackupex-restore.$$.tmp"
@dalecaru
dalecaru / gradient.css
Created March 10, 2011 14:40
Cross-Browser CSS Gradient
body {
background: #999; /* for non-css3 browsers */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#000000'); /* for IE */
background: -webkit-gradient(linear, left top, left bottom, from(#ccc), to(#000)); /* for webkit browsers */
background: -moz-linear-gradient(top, #ccc, #000); /* for firefox 3.6+ */
}
@dalecaru
dalecaru / v22_with_bundler_fix.diff
Created October 26, 2010 04:22
make integrity playing nice with bundler
From 63597ebd62b45b601643e8329f242807e384d743 Mon Sep 17 00:00:00 2001
From: Damian Caruso <damian.caruso@gmail.com>
Date: Tue, 26 Oct 2010 01:18:20 -0300
Subject: [PATCH] make integrity playing nice with bundler
---
init.rb | 2 +-
lib/integrity/builder.rb | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)