This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ ! -d "spacejam" ]; then | |
git clone https://github.com/practicalmeteor/spacejam.git --depth=1 | |
fi | |
cd spacejam/ | |
npm link | |
cd ../ | |
spacejam test-packages ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function now(){ | |
return ( new Date ).getTime(); | |
} | |
function animate( time, fn, fps ){ | |
var start = now(), | |
intrval = fps ? 1000/fps : 20, | |
id = setInterval(function(){ | |
var diff = now() - start, p = diff/time; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Show and enumerate the most frequently words in a file | |
# Use: | |
# $ chmod a+x frequently_words.sh | |
# $ ./frequently_words file_path | |
cat $1 | tr -cs A-Za-z '\n' | tr A-Z a-z | sort | uniq -c | sort -rn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function analyse( text ){ | |
var words = {}, | |
text = text.toLowerCase() | |
.replace(/[.,]+/g, '') | |
.replace(/[^\w\s\t\n]+/, '') | |
.split(' '); | |
for( var i in text ){ | |
if( words[ text[i] ] == undefined ) | |
words[ text[i] ] = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function( ytplayer ){ | |
var url = ytplayer.config.args["url_encoded_fmt_stream_map"], | |
videoFormats = url.split(','), | |
videos = [], | |
props = ['quality', 'type']; | |
setFormats(); | |
askToUser(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"estados": [ | |
{ | |
"sigla": "AC", | |
"nome": "Acre", | |
"cidades": [ | |
"Acrelândia", | |
"Assis Brasil", | |
"Brasiléia", | |
"Bujari", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var key = 'heuehueheubrbrbrprasswithlasers333'; | |
/* | |
* Simple Encrypt-Decrypt Algorithm | |
* mode = 1 or -1 | |
* 1 -> Encrypt mode | |
* -1 -> Decrypt mode | |
*/ | |
function simpleED( str, mode ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Analiser | |
extend self | |
def parse(text) | |
originalArray = text.split(/\s/).reject {|x| x.empty?} | |
repeatedWords = {} | |
originalArray.each do |word| | |
word.downcase! | |
if repeatedWords.has_key?(word.to_sym) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ZSH=/home/gabriel/.oh-my-zsh | |
ZSH_THEME="bureau" | |
plugins=(git bower common-aliases meteor npm node nyan sudo wd) | |
# User configuration | |
alias gfd="g flow feature diff" | |
export PATH="/home/gabriel/.nvm/versions/node/v4.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" | |
# export MANPATH="/usr/local/man:$MANPATH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# { fn:function(args){} } => { fn(args){} } | |
find . -name \*.js -exec perl -p -i -e 's/:\s?function\s?\((.+)?\)\s?/(\1)/' {} \; |