This file contains hidden or 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
#!/usr/bin/env bash | |
# All my gist code is licensed under the MIT license. | |
# Add this to your PATH | |
# if calling without arguments or with -h or --help, print usage | |
if [[ $# -eq 0 ]] || [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then | |
echo "Usage: get-terminal-cwd <terminal-pid>" | |
echo " - return the CWD of the terminal with the given PID" |
This file contains hidden or 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
# Tree structure of glibc character sets and their aliases. | |
# | |
# - Generated with: print-glibc-charset-aliases.bash | |
# - For glibc 2.38 | |
# | |
# - Format: | |
# TARGET | |
# \_ ALIAS | |
# \_ ALIAS | |
# ... |
This file contains hidden or 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
#!/usr/bin/env bash | |
# All my gist code is licensed under the MIT license. | |
# Video demo: https://www.youtube.com/watch?v=kNKuRdoaNII | |
# runasm - Assemble, link, and run multiple assembly files, then delete them. | |
if [[ $# -eq 0 ]]; then | |
echo "Usage: runasm <file1.s> [<file2.s> ...]" | |
echo " - Assemble, link, and run multiple assembly files, then delete them." |
This file contains hidden or 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
#!/usr/bin/env bash | |
# All my gist code is licensed under the MIT license. | |
# Video demo: https://www.youtube.com/watch?v=2tRyBQqJdrc | |
# Note: In some browsers you need to type "g/" instead of just "g" so it gets | |
# recognized as a URL and not as a term for the default search engine. | |
# source of truth for URL aliases |
This file contains hidden or 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
#!/usr/bin/env bash | |
# All my gist code is licensed under the MIT license. | |
# Video demo: https://www.youtube.com/watch?v=y542zPAPeG4 | |
# colorcat | |
# - cats a file, but if any line contains N hex colors, it appends the colors | |
# (rendered as ansi escape sequences) to the end of the line. | |
# - input can be stdin, a file, or a hex color in plain text |
This file contains hidden or 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
#!/usr/bin/env bash | |
# All my gist code is licensed under the MIT license. | |
# Video demo: https://www.youtube.com/watch?v=Ypqf2IFc62I | |
# rfc | |
# - fetches and renders an RFC into less | |
# - from www.rfc-editor.org | |
# - if called with -l/--list, lists all RFCs in descending order |
This file contains hidden or 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
#!/usr/bin/env bash | |
# Video demo: N/A (This script is so dank that YouTube took down my video without explanation) | |
# Add this to your ~/.bashrc | |
# custom fc-list | |
# - sort list | |
# - add color | |
# - format table output |
This file contains hidden or 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
#!/usr/bin/env bash | |
# All my gist code is licensed under the terms of the MIT license. | |
# Video demo: https://www.youtube.com/watch?v=ISKzBlzXRWE | |
# Add this to your .bashrc: | |
# get the texinfo node for a command | |
# - takes a command name, like 'cat' |
This file contains hidden or 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
#!/usr/bin/env bash | |
# All my gist code is licensed under the terms of the MIT license. | |
# Video demo: https://www.youtube.com/watch?v=nf3ddQniw-o | |
# diffc - diff commands | |
# - allows to call as: diffc 'command one' 'command two' | |
# instead of: diff <(command one) <(command two) | |
# (Just to save typing a few characters. Lol I'm a lazy programmer) |
This file contains hidden or 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
#!/usr/bin/env bash | |
# All my gist code is licensed under the terms of the MIT license. | |
### Make sure this file is visible from your $PATH and called 'useradd' | |
# Video demo: https://www.youtube.com/watch?v=Nzl2YzYDFlI | |
### Sample output: | |
# |