A collection of custom utility scripts that I have created in /usr/local/bin/
Note: all scripts must be executable i.e. chmod +x /usr/local/bin/<script>
Retrieves DNS and network info
dnsstuff <hostname> <"long"/"short">
# i.e. dnsstuff google.com short
# dnsstuff google.com is the same as dnstuff google.com long
Find text in all files/directories recursively from the current directory you're in
findtext <"text_to_search">
# i.e. findtext "API_KEY"
# Searching files for 'API_KEY'
# Found text in: ./.env
# Found text in: ./src/index.ts
Converts hex to decimal and vice-versa
hexdec
?> 12h
# Decimal 18
?> 18
# Hex 12
Returns current machine IP
ip
# 108.72.21.11
Creates an SSH tunnel and temporarily modifies /etc/hosts
file
tunnel <remote_hostname> <remote_port> <local_port> <ssh path>
# i.e. tunnel unreachablehostname.com 7001 7001 user@reachablehost.com
Creates a guid and copies it to clipboard via pbcopy
guid
# def27f76-ff8e-481b-8b7b-f01e75e2bff8
Prints the current temperature of your CPU to stdout
temperature
# CPU die temperature: 64.83 C