Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
hey ✌🏼

Davidson Fellipe davidsonfellipe

:octocat:
hey ✌🏼
View GitHub Profile
View gist:3355961
View gist:3782225
stable release:
$ git clone git://www.swi-prolog.org/home/pl/git/pl.git
or
development version:
git://www.swi-prolog.org/home/pl/git/pl-devel.git
$ cd pl-devel
@davidsonfellipe
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
else
@davidsonfellipe
davidsonfellipe / gist:4529929
Last active Dec 11, 2015
install capistrano
View gist:4529929
# capistrano
if which cap &> /dev/null; then
echo "==> Checking capistrano... OK"
else
echo "==> Installing capistrano (gem install capistrano)..."
sudo gem install capistrano
echo "==> OK"
fi
View gist:4601852

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

##General

  • 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.

##Tools

View Install PIL in virtualenv on Mac OSX
$ workon default
$ brew install jpeg
$ pip install --upgrade --no-install PIL
$ vim $VIRTUAL_ENV/build/PIL/setup.py
-> 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) {
return;
You can’t perform that action at this time.