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/
http://flukeout.github.io/
#01 plate
#02 bento
#03 #fancy
#04 plate > apple
#05 #fancy pickle
#06 .small
#07 orange.small
#08 bento > orange.small
pbpaste | highlight --syntax=js -O rtf | pbcopy
pbpaste | highlight --syntax=css -O rtf | pbcopy
pbpaste | highlight --syntax=java -O rtf | pbcopy
etc
@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 \
@humbertodias
humbertodias / WildFly
Last active November 26, 2017 20:04
Deploy/Undeploy for WildFly
# connect
./jboss-cli.sh --connect controller=localhost:9990
# deploy
deploy /tmp/meuprojeto/target/meuprojeto.war --force
# undeploy
undeploy meuprojeto.war