- Create dedicated domain on an Apache server that supports .htaccess
- ssh to root directory there
- Use random.org to create 200 random strings. (Five characters long, with digits, uppercase letters and lowercase letters).
- Save to short-strings.txt
- echo "RewriteRules On" > .htaccess
- cat short-strings.txt | awk '{print "RewriteRule ^"$1"$ TO [R,L]"}' >> .htaccess
- rm short-strings.txt
- When you want to shorten a URL, edit .htaccess. Replace any TO with the long URL.
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
# finds all *.js files that have either `</` or `/>` tags in them and renames them to *.jsx | |
find ./src -type f -name '*.js' -not -name '*.jsx' -not -name '*.ejs' -exec bash -c 'grep -l -E "</|/>" "$0"' {} \; -exec bash -c 'mv "$0" "${0%.js}.jsx"' {} \; |
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
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^b w | |
New new -s <session> Create ^b c | |
Attach att -t <session> Rename ^b , <name> | |
Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
Kill kill-session -t <session> Close ^b & |