Home

Awesome

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.

<!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

Table of Contents

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

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

ScriptOriginal SourceDescription
$Jordan Sissel's dotfilesA shim so that pasting a command example with a leading $ will just work instead of failing.
ansi2htmlMislav Marohnić's dotfilesConvert terminal color ANSI escape sequences to HTML.
ascii-barWookayin's dotfilesDraw an ascii bar figure from the percentage value read from STDIN
bindiffjpb@unixorn.netHexdumps two files and diffs the output
change-extension?Changes file extensions
clean-whiteboard-picturehttps://gist.github.com/lelandbatey/8677901Cleans up pictures of whiteboards and pumps up contrast
cursor-hidejpb@unixorn.netHides cursor in iTerm2
cursor-showjpb@unixorn.netEnables cursor visibility in iTerm2 if a program exits without setting it visible again
datauriAlrra's dotfilesConverts a file to a data URI
dedupe-in-orderawk onelinerUse awk to dedupe a file, outputting the lines in order. Unlike uniq, doesn't only dedupe adjacent lines.
diff-summaryGary Bernhardt's dotfilesPrints a summary of piped diff files or git diff output
dumpdns?Dump DNS records for a domain
exiftooljpb@unixorn.netShows or removes a file's exif metadata
explainshelljpb@unixorn.netUses https://explainshell.com to explain shell commands.
extractFromRPMjpb@unixorn.netExtracts files from an rpm
find-in-filesBoost Your Command Line Productivity With fzfCombines ripgrep and fzf
fix-zsh-historyjpb@unixorn.netFixes a corrupted .zsh_history file
get-distrohttps://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
gxprbrutasse's dotfiles.Uses Google and or Wolfram Alpha to evaluate expressions. Requires URI::Escape to be installed with cpan.
headersZach Holman's dotfilesGets the HTTP headers from a server
hex-to-binjpb@unixorn.netConverts a hexstring to a binary stream
html2markdownhttps://github.com/realpython/python-scripts/Convert all HTML files in a single directory to Markdown
http_debugDump debug info for a URL
http_headersDump http headers for a URL
human-pathcoffeeops slack #commandline-fu channelPrint $PATH with one entry per line to make it easier for humans to tell if something is missing
human-timeConverts integer seconds into human-understandable time. human-time 88000 will print 1d 26m 40s
ifliptwirrim/iflipTableflips a text string
ipaddressesjpb@unixorn.netDumps all the ip addresses for the host
is-remote-sessionjpb@unixorn.netExits 0 if you're in an ssh remote session, 1 otherwise
jirajpb@unixorn.netOpens a jira ticket from the command-line
jmemstatmajk1's shellrcDisplays a memory information summary for a java process
json2yaml / json-to-yamljpb@unixorn.netConverts JSON to YAML
jsondiff?Diff JSON files and cope with key-order differences by processing with json.tool
lineprofMislav Marohnić's dotfilesAnnotates 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-addressjpb@unixorn.netPrint local IP v4 address
local-ipv6-addressjpb@unixorn.netPrint local IP v6 address
ls-open-portsjpb@unixorn.netList open ports
ls-socketsjpb@unixorn.netList open sockets
ls-tcp-socketsjpb@unixorn.netList open tcp sockets
ls-udp-socketsjpb@unixorn.netList open udp sockets
lsof-unlinkedludios/ubuntils/List all open files (but not mapped files) that have been unlinked.
memcached-toolBrad Fitzpatrick brad@danga.comstats/management tool for memcached
memcached-tophttp://code.google.com/p/memcache-top/Dumps basic memcached stats similarly to top
middle@HefeweizenSnips 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.
murderAnonymous GistTakes a list of PIDs and ends the processes through increasingly rude means.
name-windowjpb@unixorn.netNames a terminal window/tab by sending escape codes.
nanotimejpb@unixorn.netTimes a process and gives you results in milliseconds
newscriptjpb@unixorn.netCreates a new script from a template and does chmod 755 on it.
openportsjpb@unixorn.netWraps ss and makes a prettier list of open ports.
pidpwdjpb@unixorn.netFind the pwd of a given pid. Only works on linux since it requires /proc
pjsonhttps://coderwall.com/Prettify json files
plotkatef's gistDraw a graph in the terminal
port-listeners-ipv{4,6}jpb@unixorn.netShow what programs are listening to a given port
pydocHangops SlackLook something up on docs.python.org and opens it in your default browser
random-passwordjpb@unixorn.netGenerate a random password. If no argument, assume 32 character length
randsleepjpb@unixorn.netSleep a random number of seconds
relocate-virtualenvGary Josack's scripts repositoryThis is a simple script to clean up links and references in a python virtualenv that has been relocated.
remote-packet-capturejpb@unixorn.netRun tcpdump on a remote host and pipe it to local wireshark
retryjpb@unixorn.netRe-run a command until it exits successfully. Waits $DELAY seconds between attempts.
seqDave Taylor's blogGenerates 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
soloTimothy Kay's solo scriptPrevents a program from running more than one copy at a time.
ssh-remove-known-hostjpb@unixorn.netHelper 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.
stealjpb@unixorn.netHelper for quickly resetting ownership of files you created with the wrong userid
strip-ansi-codesjpb@unixorn.netStrips the ANSI codes from STDIN. Makes grepping through things like jenkins logs considerably less painful
tablefliphangops slackPrints a tableflip animation.
title-textjpb@unixorn.netSet the terminal title in any application (like iTerm 2 or Terminal on macOS) that supports VT100 escape sequences.
urldecodejpb@unixorn.netDecode an url string
urlencodejpb@unixorn.netEncode a string to an url parameter
vboxjpb@unixorn.netOpens VirtualBox
wtfisjpb@unixorn.netLooks something up on cheat.sh
yaml2json / yaml-to-jsonjpb@unixorn.netConverts yaml to json
yqjpb@unixorn.netRun 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.