Skip to content

Instantly share code, notes, and snippets.

View humbertodias's full-sized avatar

Humberto Dias humbertodias

View GitHub Profile
ffmpeg -i movie.mov -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=1 > animated.gif
/**
* huffman.cpp
* Huffman Encoding (Data Compression)
*
* How to compile
* g++ huffman.cpp -o huffman
*
* Compressing
* ./huffman -i in.txt -o out.huff
*
echo '{"id": 1,"enabled": true, "name": "A green door","price": 12.50,"tags": ["home", "green"]}' | python -mjson.tool
@humbertodias
humbertodias / gist:2275ff0a622c1bc37dd9ebe19c4ddbe6
Created July 8, 2016 02:50
ADB Logcat Web Console for Phonegap Debugging
adb logcat | grep 'Web Console'
# or
adb logcat | grep "CONSOLE"
@humbertodias
humbertodias / gist:aa0c01e367bae34ed2cd277edb7425dc
Created July 8, 2016 15:18
Measuring your speed connection
https://fast.com/
@humbertodias
humbertodias / gist:f07ebbe9c21e4501a795b5ae96eb5b9f
Created July 8, 2016 15:18
Find out how well your site works across mobile and desktop devices
https://testmysite.thinkwithgoogle.com/
pbpaste | highlight --syntax=js -O rtf | pbcopy
pbpaste | highlight --syntax=css -O rtf | pbcopy
pbpaste | highlight --syntax=java -O rtf | pbcopy
etc
# Start PostFix
sudo launchctl start org.postfix.master
# Send
mail -s testing your_local_user@gmail.com
# Check email
mail
@humbertodias
humbertodias / gist:e09f16f1599489a3ea4bc274b8a34ed7
Last active February 9, 2017 02:30
Maven Archetype:generate
# WebApp
mvn archetype:generate \
-DgroupId=meugrupo \
-DartifactId=meuprojeto \
-DarchetypeArtifactId=maven-archetype-webapp \
-DinteractiveMode=false
# Console App - Java 7
mvn archetype:generate \
-DgroupId=com.mycompany.app \
# clean brew cache
brew cleanup -s