Skip to content

Instantly share code, notes, and snippets.

View box-shadow.html
<!DOCTYPE html>
<title>Box Shadow</title>
.box {
height: 150px;
width: 300px;
margin: 20px;
dre1080 / gist:988488
Created May 24, 2011
Simple ini parser
View gist:988488
$debug = function($var, $exit = true) {
echo '<pre>';
(is_array($var) || is_object($var)) ? print_r($var) : var_dump($var);
echo '</pre>';
if ($exit)
$parse = function($file, $show_debug = false) use ($debug) {
View Twitter User Object MySQL Schema.sql
`twitter_id` int(10) unsigned NOT NULL,
`name` varchar(140) NOT NULL,
`screen_name` varchar(30) NOT NULL,
`location` varchar(180) default NULL,
`description` varchar(300) default NULL,
`profile_image_url` varchar(400) NOT NULL,
`url` varchar(400) default NULL,
`protected` varchar(5) default NULL,
`followers_count` int(10) unsigned NOT NULL,
dre1080 / csrf.php
Created Oct 26, 2011 — forked from dhrrgn/csrf.php
Simple, yet effective CSRF class for FuelPHP.
View csrf.php
* Simple, yet effective CSRF class for FuelPHP.
* @author Dan Horrigan
* @license MIT License
* @copyright 2011 Dan Horrigan
dre1080 / util.go
Last active Sep 30, 2015
Print Echo registered routes
View util.go
package util
import (
// DebugPrintRoutes prints all registered routes of e.
dre1080 / async_iteration.js
Created Feb 20, 2012
Everything in node happens at the same time, which means, unless you're doing your processing inside your callbacks, you cannot guarantee asynchronous functions have completed yet.
View async_iteration.js
* Source:
var fs = require('fs'),
EventEmitter = require('events').EventEmitter,
filesEmitter = new EventEmitter(),
files = [];
// this event will be called when all files have been added to the files array
dre1080 / gist:2267982
Created Mar 31, 2012 — forked from jrochkind/gist:2161449
A Capistrano Rails Guide
View gist:2267982

A Capistrano Rails Guide

by Jonathan Rochkind,

why cap?

Capistrano automates pushing out a new version of your application to a deployment location.

I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".

dre1080 / haproxy.cnf
Created Apr 4, 2012 — forked from asabirov/haproxy.cnf
Nginx, Faye, Node.js on 80 port
View haproxy.cnf
log local0
log local1 notice
maxconn 4096
nbproc 1
pidfile /var/run/
user haproxy
group haproxy
dre1080 / haproxy.cnf
Created Apr 14, 2012 — forked from xeron/haproxy.cnf
View haproxy.cnf
log local0
log local0 notice
maxconn 4096
nbproc 1
pidfile /var/run/
user haproxy
group haproxy
You can’t perform that action at this time.