Skip to content

Instantly share code, notes, and snippets.

View fdaciuk's full-sized avatar
🔥

Fernando Daciuk fdaciuk

🔥
View GitHub Profile
'instanceof' tests results on the objects returned from the method/property below.
IE 8
NodeList HTMLCollection StaticNodeList
all X
children X
childNodes X
getElementsByName X
getElementsByTagName X
getElementsByClassName X
@thomasd
thomasd / gd_watermark.inc.php
Created December 4, 2009 10:33
Overlays an image with a watermark image (phpThumb-Plugin for GD-lib)
<?php
/**
* GD Watermark Lib Plugin Definition File
*
* This file contains the plugin definition for GD Watermark
* Usage:
* <?php
* require_once 'path/to/ThumbLib.inc.php';
* $pic = PhpThumbFactory::create('path/to/pic/destination');
* $watermark = PhpThumbFactory::create('path/to/watermark/destination');
@gf3
gf3 / gist:306785
Created February 17, 2010 16:38
Sexy bash prompt
Moved to: http://github.com/gf3/dotfiles/blob/master/bash_prompt
@chriseppstein
chriseppstein / _icons.scss
Created December 5, 2010 21:48
This is an example of the generated stylesheet by compass for a set of sprites
@import "compass/utilities/sprites/base";
// General Sprite Defaults
// You can override them before you import this file.
$icon-sprite-base-class: ".icon-sprite" !default;
$icon-sprite-dimensions: false !default;
$icon-position: 0% !default;
$icon-spacing: 0 !default;
$icon-repeat: no-repeat !default;
@chriseppstein
chriseppstein / 1_slower_sprite_file.scss
Created December 20, 2010 03:11
This gist demonstrates how a generated sprite file can be optimized to shave some time off your compile.
@import "compass/utilities/sprites/base";
// General Sprite Defaults
// You can override them before you import this file.
$emblem-sprite-base-class: ".emblem-sprite" !default;
$emblem-sprite-dimensions: false !default;
$emblem-position: 0% !default;
$emblem-spacing: 0 !default;
$emblem-repeat: no-repeat !default;
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@blude
blude / gist:996352
Created May 27, 2011 22:52
Terminal bonitinho :)
[[ -s "/Users/saulo/.rvm/scripts/rvm" ]] && source "/Users/saulo/.rvm/scripts/rvm" # This loads RVM into a shell session.
PATH=$PATH:/usr/local/mysql/bin/
DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# Make bash check its window size after a process completes
shopt -s checkwinsize
@zeuxisoo
zeuxisoo / gist:998404
Created May 30, 2011 03:13
git-ftp.sh install and usage note
@20after4
20after4 / iterm-bash_profile.sh
Created August 27, 2011 22:45
.bash_profile for iTerm2 tabs colored by tty
if [ "iTerm.app" == "$TERM_PROGRAM" ] ; then
# set up an array of RGB values
tabcolors[0]="244,0,200"
tabcolors[1]="0,200,244"
tabcolors[2]="68,250,132"
tabcolors[3]="250,68,132"
tabcolors[4]="250,132,68"
tabcolors[5]="220,200,100"
TTYNUM=`ps -p $$ -o tty= | cut -c 5,6,7`
@christopherdebeer
christopherdebeer / snippet.js
Created September 7, 2011 09:22
Node.js Express - Mobile detection
app.get('/', function(req, res){
var ua = req.header('user-agent');
if(/mobile/i.test(ua)) {
res.render('mobile.html');
} else {
res.render('desktop.html');
}
});