Extract text from PDF, from the command line

pdfs-512pdftotext is a command line tool for converting PDF files to plain text. Included by default with many Linux distributions.

$ pdftotext file.pdf

The gs (Ghostscript) program can also handle the process:
$ gs -sDEVICE=txtwrite -o extractedText.txt input.pdf

Advertisement

Evernote from command line

As mentioned before, you get a productivity boost when you link your mobile life with the terminal, with a program you can pipe, parse, grep…

Geeknote (www.geeknote.me) is a command line interface for your Ever Note account.

Installation is as easy as:
git clone git://github.com/VitaliyRodnenko/geeknote.git
cd geeknote
sudo python setup.py install
geeknote login

The latter will ask you to provide login credentials (press enter when asked for Two-Factor auth code, if you didn’t enable it) from the shell. While this is a good thing, unfortunately the authorization is not permanent, but “per session”.

How to open .daa disk images from Linux/Ubuntu

DAA files are images of CD or DVDs stored in a proprietary format, so there’s no “out-of-the-box” solution from your favourite Linux shell.

You have to download PowerISO, a software famous for its Windows incarnation but available also for Linux from their website. Download the package into a suitable directory, expand it and run the program contained as described in third line:

wget http://poweriso.com/poweriso-1.3.tar.gz
tar xfz poweriso-1.3.tar.gz
./poweriso convert "yourfile.daa" -o outputfile.iso -ot iso

Then to mount .iso file, Linux can do it for you:

mount -o loop yourfile.iso /your/folder

Tab complete for SSH

This snippet from .bashrc/.bash_profile was gifted from Marcel Molina, but I thought I would share because it’s life changing. Put this in your .bashrc or .bash_profile:

SSH_COMPLETE=( $(cat ~/.ssh/known_hosts | \
cut -f 1 -d ‘ ’ | \
sed -e s/,.*//g | \
uniq | \
egrep -v [0123456789]) )
 complete -o default -W ”${SSH_COMPLETE[*]}” ssh