/jpb.zshplugin

ZSH plugin to load some of my tools.

Primary LanguageShellApache License 2.0Apache-2.0

License Build Status Awesomebot Mega-Linter

jpb.zshplugin

This is a ZSH plugin usable with zgenom and other oh-my-zsh-compatible frameworks to easily load some of my tool scripts.

This contains miscellaneous tool scripts and aliases that are not specific enough for one of my more targeted ZSH plugins.

Table of Contents

Installing

Antigen

add antigen bundle unixorn/jpb.zshplugin to your .zshrc

Zgenom

add zgenom load unixorn/jpb.zshplugin to your .zshrc with your other zgenom load commands.

Without using a framework

  1. git clone this repository, then add its bin directory to your $PATH.
  2. Add source /path/to/here/jpb.plugin.zsh to your .zshrc file.

The scripts in this collection don't actually require you to be using ZSH as your login shell, they're being distributed as an oh-my-zsh-compatible plugin because it's convenient for me.

Credits

Script Original Source Description
$ Jordan Sissel's dotfiles A shim so that pasting a command example with a leading $ will just work instead of failing.
ansi2html Mislav Marohnić's dotfiles Convert terminal color ANSI escape sequences to HTML.
ascii-bar Wookayin's dotfiles Draw an ascii bar figure from the percentage value read from STDIN
bindiff jpb@unixorn.net Hexdumps two files and diffs the output
change-extension ? Changes file extensions
clean-whiteboard-picture https://gist.github.com/lelandbatey/8677901 Cleans up pictures of whiteboards and pumps up contrast
cursor-hide jpb@unixorn.net Hides cursor in iTerm2
cursor-show jpb@unixorn.net Enables cursor visibility in iTerm2 if a program exits without setting it visible again
datauri Alrra's dotfiles Converts a file to a data URI
dedupe-in-order awk oneliner Use awk to dedupe a file, outputting the lines in order. Unlike uniq, doesn't only dedupe adjacent lines.
diff-summary Gary Bernhardt's dotfiles Prints a summary of piped diff files or git diff output
dumpdns ? Dump DNS records for a domain
exiftool jpb@unixorn.net Shows or removes a file's exif metadata
explainshell jpb@unixorn.net Uses https://explainshell.com to explain shell commands.
extractFromRPM jpb@unixorn.net Extracts files from an rpm
find-in-files Boost Your Command Line Productivity With fzf Combines ripgrep and fzf
fix-zsh-history jpb@unixorn.net Fixes a corrupted .zsh_history file
get-distro https://github.com/blueyed/dotfiles/ Dumps info about the distro of the linux system you're on
get-site-cert ? Download the SSL cert from a site
gxpr brutasse's dotfiles. Uses Google and or Wolfram Alpha to evaluate expressions. Requires URI::Escape to be installed with cpan.
headers Zach Holman's dotfiles Gets the HTTP headers from a server
hex-to-bin jpb@unixorn.net Converts a hexstring to a binary stream
html2markdown https://github.com/realpython/python-scripts/ Convert all HTML files in a single directory to Markdown
http_debug Dump debug info for a URL
http_headers Dump http headers for a URL
human-path coffeeops slack #commandline-fu channel Print $PATH with one entry per line to make it easier for humans to tell if something is missing
human-time Converts integer seconds into human-understandable time. human-time 88000 will print 1d 26m 40s
iflip twirrim/iflip Tableflips a text string
ipaddresses jpb@unixorn.net Dumps all the ip addresses for the host
is-remote-session jpb@unixorn.net Exits 0 if you're in an ssh remote session, 1 otherwise
jira jpb@unixorn.net Opens a jira ticket from the command-line
jmemstat majk1's shellrc Displays a memory information summary for a java process
json2yaml / json-to-yaml jpb@unixorn.net Converts JSON to YAML
jsondiff ? Diff JSON files and cope with key-order differences by processing with json.tool
lineprof Mislav Marohnić's dotfiles Annotates each line of input with the number of milliseconds elapsed since the last line. Useful for figuring out slow points of output-producing programs.
local-ip-address jpb@unixorn.net Print local IP v4 address
local-ipv6-address jpb@unixorn.net Print local IP v6 address
ls-open-ports jpb@unixorn.net List open ports
ls-sockets jpb@unixorn.net List open sockets
ls-tcp-sockets jpb@unixorn.net List open tcp sockets
ls-udp-sockets jpb@unixorn.net List open udp sockets
lsof-unlinked ludios/ubuntils/ List all open files (but not mapped files) that have been unlinked.
memcached-tool Brad Fitzpatrick brad@danga.com stats/management tool for memcached
memcached-top http://code.google.com/p/memcache-top/ Dumps basic memcached stats similarly to top
middle @Hefeweizen Snips lines out of the the middle of a file and dumps them to stdout
mtr-url ? Parses hostname from a URL, then does a mtr to it.
murder Anonymous Gist Takes a list of PIDs and ends the processes through increasingly rude means.
name-window jpb@unixorn.net Names a terminal window/tab by sending escape codes.
nanotime jpb@unixorn.net Times a process and gives you results in milliseconds
newscript jpb@unixorn.net Creates a new script from a template and does chmod 755 on it.
openports jpb@unixorn.net Wraps ss and makes a prettier list of open ports.
pidpwd jpb@unixorn.net Find the pwd of a given pid. Only works on linux since it requires /proc
pjson https://coderwall.com/ Prettify json files
plot katef's gist Draw a graph in the terminal
port-listeners-ipv{4,6} jpb@unixorn.net Show what programs are listening to a given port
pydoc Hangops Slack Look something up on docs.python.org and opens it in your default browser
random-password jpb@unixorn.net Generate a random password. If no argument, assume 32 character length
randsleep jpb@unixorn.net Sleep a random number of seconds
relocate-virtualenv Gary Josack's scripts repository This is a simple script to clean up links and references in a python virtualenv that has been relocated.
remote-packet-capture jpb@unixorn.net Run tcpdump on a remote host and pipe it to local wireshark
retry jpb@unixorn.net Re-run a command until it exits successfully. Waits $DELAY seconds between attempts.
seq Dave Taylor's blog Generates integer values from low...high similar to range in better programming languages
snag-dl ? Moves the most recent file in ~/Downloads into the current directory
solo Timothy Kay's solo script Prevents a program from running more than one copy at a time.
ssh-remove-known-host jpb@unixorn.net Helper script to remove a known hosts entry. I can never remember the command for removing a known_hosts entry, and the new format makes it more pain in the ass than just editing and searching for the ip/hostname.
steal jpb@unixorn.net Helper for quickly resetting ownership of files you created with the wrong userid
strip-ansi-codes jpb@unixorn.net Strips the ANSI codes from STDIN. Makes grepping through things like jenkins logs considerably less painful
tableflip hangops slack Prints a tableflip animation.
title-text jpb@unixorn.net Set the terminal title in any application (like iTerm 2 or Terminal on macOS) that supports VT100 escape sequences.
urldecode jpb@unixorn.net Decode an url string
urlencode jpb@unixorn.net Encode a string to an url parameter
vbox jpb@unixorn.net Opens VirtualBox
wtfis jpb@unixorn.net Looks something up on cheat.sh
yaml2json / yaml-to-json jpb@unixorn.net Converts yaml to json
yq jpb@unixorn.net Run yq in a container to minimize the things directly installed locally

Other useful ZSH plugins

I also maintain the awesome-zsh-plugins list of ZSH frameworks, plugins and themes.