Chrome at the Command-Line to Dump Website Structure

You can use Chrome to dump the DOM, PDF, or screenshot of a webpage, or do a number of other cool things:

Open a website in a Chrome process headless-mode, which you can then query from a client process or another browser:

$ chrome --headless --disable-gpu --remote-debugging-port=9222

Print the site HTML:

$ chrome --headless --disable-gpu --dump-dom

Capture a PDF:

$ chrome --headless --disable-gpu --print-to-pdf

Capture a PNG screenshot:

$ chrome --headless --disable-gpu --screenshot

Open a REPL console in which to run JavaScript expressions against the DOM:

$ chrome --headless --disable-gpu --repl

Printing Progress for DD

PV does everything.

root@mlll2664:~# pv -tpreb /dev/sdc | dd of=/dev/sdd bs=512M
27.5GB 0:03:28 [ 130MB/s] [========>                          ] 12% ETA 0:24:39

You can also funnel this into the dialog tool and make it visual:

HowTo: Check The Status of dd Command In Progress under Unix like operating systems

See here for more details.


Use GPG to Quickly Encrypt at the Command-Line

$ echo "cleartext" | gpg --passphrase "some-passphrase" -c --no-use-agent > text.encrypted
$ cat text.encrypted | gpg --passphrase "passphrase" --no-use-agent 2>/dev/null
$ cat text.encrypted | gpg --passphrase "some-passphrase" --no-use-agent 2>/dev/null

Without “–no-use-agent”, you might very well be prompted by some system keyring/agent every time.