Upload file FTP via curl

curl -T my-local-file.txt ftp://ftp.example.com --user user:secre
From here

Advertisements

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

Lightweight browser: small footprint but opening GMail

When in a need for a responsive browser I thought to be limited in my choice among fully featured browsers (Chromium) that nicely support javascript and HTML5, or stripped down crashing things (Arora, Midori?)…

Found a couple of alternatives:

  • QupZilla: it is fully featured… but in my hands still too crashy
  • uzbl (http://www.uzbl.org/): blazing fast, fully featured browsing, zero features browser (type the address with a sort of vi-like console!)

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