Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| #!/usr/bin/env bash | |
| # Update brew repo. | |
| printf "%s" "Updating brew repo..." | |
| brew update &> /dev/null | |
| echo "✅" | |
| # Get the currently installed and new version of nghttp2. | |
| printf "%s" "Fetch installed and stable nghttp2 versions..." | |
| VERSION_INSTALLED="$(brew list --versions | grep nghttp2 | awk '{print $2}')" |
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
| //phantomjs | |
| var page = require('webpage').create(); | |
| var url = 'http://instagram.com/'; | |
| page.open(url, function (status) { | |
| var js = page.evaluate(function () { | |
| return document; | |
| }); | |
| console.log(js.all[0].outerHTML); | |
| phantom.exit(); |
| urlencode() { | |
| # urlencode <string> | |
| old_lc_collate=$LC_COLLATE | |
| LC_COLLATE=C | |
| local length="${#1}" | |
| for (( i = 0; i < length; i++ )); do | |
| local c="${1:i:1}" | |
| case $c in | |
| [a-zA-Z0-9.~_-]) printf "$c" ;; |
| #!/bin/bash | |
| # Author: Maxwel Leite | |
| # Changes: Gustavo Neves | |
| # Website: http://needforbits.wordpress.com/ | |
| # Description: Script to install Microsoft Vista TrueType Fonts (TTF) aka Microsoft’s ClearType fonts on Ubuntu distros | |
| # Microsoft added a group of new "ClearType Fonts" to Windows with Windows Vista and Office 2007. | |
| # These fonts are named Constantia, Corbel, Calibri, Cambria (and Cambria Math), Candara, and Consolas. | |
| # Calibri became the default font on Microsoft Word 2007, and it’s still the default font on Word 2016 today. | |
| # Dependencies: wget, fontforge and cabextract | |
| # Tested: Ubuntu Saucy/Trusty/Xenial |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| # With this I was able to successfuly install everything | |
| # on a x86 (32-bit) instance of Amazon Linux. | |
| # | |
| # You should probably not run this script | |
| # It is a much better idea to use this as an Install guide | |
| # Just follow it down, use your tab and be happy | |
| export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/lib/pkgconfig | |
| export PATH=/usr/bin:$PATH | |
| export LDFLAGS=-L/usr/lib64:/usr/lib |