https://github.com/jpalardy/warp ᔥ
Tag: command-line
Spark: Shell script for converting any list of numbers into a sparkline (a small chart with no axes or coordinates)
Example 1:
spark 0 30 55 80 33 150
▁▂▃▅▂▇
Example 2:
› curl http://earthquake.usgs.gov/earthquakes/catalogs/eqs1day-M1.txt --silent |
sed '1d' |
cut -d, -f9 |
spark
▅▆▂▃▂▂▂▅▂▂▅▇▂▂▂▃▆▆▆▅▃▂▂▂▁▂▂▆▁▃▂▂▂▂▃▂▆▂▂▂▁▂▂▃▂▂▃▂▂
Link: Command-line tools can be 235x faster than your Hadoop cluster
http://aadrake.com/command-line-tools-can-be-235x-faster-than-your-hadoop-cluster.html
What I find funny is how he goes from this intermediate step:
cat *.pgn | grep "Result" | sort | uniq -c
To this intermediate step in one shot.
cat *.pgn | grep "Result" | awk '{ split($0, a, "-"); res = substr(a[1], length(a[1]), 1); \
if (res == 1) white++; if (res == 0) black++; if (res == 2) draw++;} \
END { print white+black+draw, white, black, draw }'
This is what I refer to as “knowing your business”.
Node Version Manager: Manage multiple active node.js versions
https://github.com/creationix/nvm ᔥ
Commands
$ nvm [tab][tab]
alias deactivate install ls run unload
clear-cache exec list ls-remote unalias use
current help list-remote reinstall-packages uninstall version
Two Microsoft Windows alternatives:
- nvmw – Requires Python and Git
- nvm-windows – Written in Go. Installer available.
Tee: Unix command to store & view (both at the same time) the output of any other command
Pipe Viewer: Unix terminal-based tool for monitoring the progress of data through a pipeline
http://www.ivarch.com/programs/pv.shtml ᔥ
pv – Pipe Viewer – is a terminal-based tool for monitoring the progress of data through a pipeline.
It can be inserted into any normal pipeline between two processes to give a visual indication of
how quickly data is passing through, how long it has taken, how near to completion it is, and an
estimate of how long it will be until completion.
Example from this blog post:
$ pv access.log | gzip > access.log.gz
611MB 0:00:11 [58.3MB/s] [=> ] 15% ETA 0:00:59
icdiff (improved colored diff): Side-by-side highlighted command line diffs
http://www.jefftk.com/icdiff ᔥ
On Github: https://github.com/jeffkaufman/icdiff
Your terminal can display color, but most diff tools don’t make good use of it. By highlighting changes, icdiff can show you the differences between similar files without getting in the way. This is especially helpful for identifying and understanding small changes within existing lines.
Instead of trying to be a diff replacement for all circumstances, the goal of icdiff is to be a tool you can reach for to get a better picture of what changed when it’s not immediately obvious from diff.
Installation
curl -s https://raw.githubusercontent.com/jeffkaufman/icdiff/release-1.6.0/icdiff \
| sudo tee /usr/local/bin/icdiff > /dev/null \
&& sudo chmod ugo+rx /usr/local/bin/icdiff
# The install-with-curl command should also work on other unixes.
# Or (mac only, depends on homebrew):
brew update && brew install icdiff
posh-git: Windows Powershell extension providing git command completion and prompt formatting
http://dahlbyk.github.io/posh-git/
Trust me, it’s cooler than it seems. It changes the prompt to visually indicate the state of the repository you are browsing.
Link: Useful Unix commands for exploring data
http://datavu.blogspot.com/2014/08/useful-unix-commands-for-exploring-data.html ᔥ
Make sure to check out the comments for more useful commands and techniques.