Skip to content

unixorn/jpb.zshplugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 [email protected] 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 [email protected] Hides cursor in iTerm2
cursor-show [email protected] 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 [email protected] Shows or removes a file's exif metadata
explainshell [email protected] Uses https://explainshell.com to explain shell commands.
extractFromRPM [email protected] Extracts files from an rpm
find-in-files Boost Your Command Line Productivity With fzf Combines ripgrep and fzf
fix-zsh-history [email protected] 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 [email protected] 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 [email protected] Dumps all the ip addresses for the host
is-remote-session [email protected] Exits 0 if you're in an ssh remote session, 1 otherwise
jira [email protected] 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 [email protected] 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 [email protected] Print local IP v4 address
local-ipv6-address [email protected] Print local IP v6 address
ls-open-ports [email protected] List open ports
ls-sockets [email protected] List open sockets
ls-tcp-sockets [email protected] List open tcp sockets
ls-udp-sockets [email protected] List open udp sockets
lsof-unlinked ludios/ubuntils/ List all open files (but not mapped files) that have been unlinked.
memcached-tool Brad Fitzpatrick [email protected] 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 [email protected] Names a terminal window/tab by sending escape codes.
nanotime [email protected] Times a process and gives you results in milliseconds
newscript [email protected] Creates a new script from a template and does chmod 755 on it.
openports [email protected] Wraps ss and makes a prettier list of open ports.
pidpwd [email protected] 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} [email protected] 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 [email protected] Generate a random password. If no argument, assume 32 character length
randsleep [email protected] 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 [email protected] Run tcpdump on a remote host and pipe it to local wireshark
retry [email protected] 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 [email protected] 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 [email protected] Helper for quickly resetting ownership of files you created with the wrong userid
strip-ansi-codes [email protected] 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 [email protected] Set the terminal title in any application (like iTerm 2 or Terminal on macOS) that supports VT100 escape sequences.
urldecode [email protected] Decode an url string
urlencode [email protected] Encode a string to an url parameter
vbox [email protected] Opens VirtualBox
wtfis [email protected] Looks something up on cheat.sh
yaml2json / yaml-to-json [email protected] Converts yaml to json
yq [email protected] 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.