Skip to content

Instantly share code, notes, and snippets.

View davidsonfellipe's full-sized avatar
:octocat:
hey ✌🏼

Davidson Fellipe davidsonfellipe

:octocat:
hey ✌🏼
View GitHub Profile
@davidsonfellipe
davidsonfellipe / gist:4529929
Last active December 11, 2015 02:19
install capistrano
# 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
@davidsonfellipe
davidsonfellipe / gist:3923370
Created October 20, 2012 14:04
Comma Operator
(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
@davidsonfellipe
davidsonfellipe / gist:3791691
Last active October 11, 2015 02:57
setDelay Javascript
var setDelay = (function(){
var timeout = 0;
return function(callback, milliseconds){
clearTimeout (timeout);
timeout = setTimeout(callback, milliseconds);
@davidsonfellipe
davidsonfellipe / gist:3782225
Created September 25, 2012 14:21
Install SWI Prolog
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 / pagespeed.md
Last active August 31, 2015 18:01
Workaround for pagespeed on Chrome

PageSpeed Insights for Google Chrome has been deprecated. Please use the online version of PageSpeed Insights.

Workaround by @kiquenet

For Google Page Speed extension:

Maybe any partner in your company has installed the extension. Then do this::

Open chrome://version/ and look for Profile Path:

(function() {
"use strict";
function Icon($sce) {
function Link(scope, elem, attrs) {
scope.getIcon = function(name) {
@davidsonfellipe
davidsonfellipe / br-responsive
Last active August 29, 2015 14:10
Breaklines responsive
br,
br:after {
content: ' ';
}
@media only screen and (min-width: 1024px) {
br,
br:after {
content: none;
}
@davidsonfellipe
davidsonfellipe / gist:d0fe40af8be82c10cc02
Created October 2, 2014 04:08
List with some Syntax Highlighters plugins
http://craig.is/making/rainbows
https://github.com/cowlby/Lighter
http://jush.sourceforge.net/
https://github.com/aercolino/Chili
http://prismjs.com/
https://code.google.com/p/google-code-prettify/
https://highlightjs.org/
http://shjs.sourceforge.net/
http://pygments.org/
http://qbnz.com/highlighter/index.php
@davidsonfellipe
davidsonfellipe / gist:11199413
Created April 23, 2014 00:52
Get all friends who canceled facebook account
// go to https://www.facebook.com/YOURPROFILE/friends
var xx = document.querySelectorAll('.fsl.fwb.fcb a')
for (var i = 0; i<xx.length; i++){
if(xx[i].href === 'https://www.facebook.com/YOURPROFILE/friends#') {
console.log(xx[i].innerHTML);