Skip to content

Instantly share code, notes, and snippets.

hey ✌🏼

Davidson Fellipe davidsonfellipe

hey ✌🏼
View GitHub Profile
View gist:3355961
View gist:3782225
stable release:
$ git clone git://
development version:
$ cd pl-devel
davidsonfellipe / gist:3791691
Last active Oct 11, 2015
setDelay Javascript
View gist:3791691
var setDelay = (function(){
var timeout = 0;
return function(callback, milliseconds){
clearTimeout (timeout);
timeout = setTimeout(callback, milliseconds);
View gist:3923370
(A && B)
//Always evaluate A
//If A is true, evaluate B
(A || B)
//Always evaluate A
//If A is false, evaluate B
(A, B)
//Always evaluate A
View gist:4529914
if ! which mongod >/dev/null 2>&1 ; then
if which brew >/dev/null 2>&1 ; then
echo "==> Installing brew (brew update)..."
brew update
echo "==> Installing mongodb (brew install mongodb)..."
brew install mongodb
elif which port >/dev/null 2>&1 ; then
echo "==> Installing mongodb (port install mongodb)..."
port install mongodb
davidsonfellipe / gist:4529929
Last active Dec 11, 2015
install capistrano
View gist:4529929
# capistrano
if which cap &> /dev/null; then
echo "==> Checking capistrano... OK"
echo "==> Installing capistrano (gem install capistrano)..."
sudo gem install capistrano
echo "==> OK"
View gist:4601852

#CSS FTW My way to face the challenge: Maintainable + Efficient + Optimized


  • YSlow + Page Speed (Performance Rules)…
  • CSSLint Rules…
  • Don’t use too many web fonts talk to your designer, and explain the impact of loading many sources.


View Install PIL in virtualenv on Mac OSX
$ workon default
$ brew install jpeg
$ pip install --upgrade --no-install PIL
$ vim $VIRTUAL_ENV/build/PIL/
-> JPEG_ROOT = '/usr/local/Cellar/jpeg/8d/'
-> FREETYPE_ROOT = libinclude('/usr/X11')
View gist:5165482
function load(url, callback) {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = onReady;
function onReady() {
if(xhr.readyState < 4 || xhr.status !== 200) {