Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus| /** | |
| * Converts an RGB color value to HSL. Conversion formula | |
| * adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
| * Assumes r, g, and b are contained in the set [0, 255] and | |
| * returns h, s, and l in the set [0, 1]. | |
| * | |
| * @param Number r The red color value | |
| * @param Number g The green color value | |
| * @param Number b The blue color value | |
| * @return Array The HSL representation |
| # Undo latest commit | |
| git reset --soft HEAD^ | |
| # Undo the changes of a commit (creating a new commit) | |
| git revert <commit> | |
| # Undo latest merge (before push) | |
| git reset --merge ORIG_HEAD | |
| # Merge a branch using the version of the current branch in case of conflicts |
| #!/bin/bash | |
| # ------------------------------------- | |
| # Databases backup with X days storage history | |
| # | |
| # User executing this script must have FULL permissions | |
| # to mysql and mysqldump | |
| # | |
| # Use $HOME/.my.cnf to store MySQL auth | |
| # |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <!-- | |
| ███████ | |
| ██████▌ | |
| ▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄ ▄▄▄▄▄ ▄▄▄▄ ██████ | |
| ▄███████████▄ ▄███████████▄ ▐█████▄███████▄▄███████▌ █████▌ | |
| ▄██████▀ ▀████████████▀ ▀████████████▀▀███████▀▀███████ █████ |
This is a ServiceWorker template to turn small github pages into offline ready app.
Whenever I make small tools & toys, I create github repo and make a demo page using github pages (like this one).
Often these "apps" are just an index.html file with all the nessesary CSS and JavaScript in it (or maybe 2-3 html/css/js files). I wanted to cache these files so that I can access my tools offline as well.
Make sure your github pages have HTTPS enforced, you can check Settings > GitHub Pages > Enforce HTTPS of your repository.
Desbloquear gmail para enviar correos dende unha web:
| #!/bin/bash | |
| # ------------------------------------- | |
| # Script to do incremental rsync backups | |
| # into a local computer | |
| # | |
| # This script is freely distributed under the GPL | |
| # ------------------------------------- |
rebase vs merge).rebase vs merge)reset vs checkout vs revert)git rev-parse)pull vs fetch)stash vs branch)reset vs checkout vs revert)