split PDFs from the Linux command line

My scanner allows me to scan multiple pages to PDF with a single process. It's a great feature--especially for capturing multi-page documents as a single file. It can also be a time-saver for scanning multiple single-page documents—with only a bit of command line: pdftk multi-page-input-file.pdf burst And…

reset user password in self-hosted Ghost Blog

A little tip from the file ghost_dir/core/server/models/user.js: Hash the provided password with bcrypt return nodefn.call(bcrypt.hash, _user.password, null, null); Generate bcrypt hash and updated it in content/data/. Or just use this hash which is for “password”: $2a$10$f29LDrB8S1JMfdF40Vmf1.h2OyhtlcefaMrFQVpHeX9XQ7Xiq17KC…

save Linux terminal history to a file

  If you want to save the terminal history in another file, use the following command: history > history_file.txt This new file will contain also and the commands used in your currently opened terminal session. A new file called history_file.txt will be created in your currently…

rotate PDFs from the Linux command line

ImageMagick's mogrify tool can be used to rotate PDF documents. The commands work the same as with any image file: mogrify -rotate 270 document.pdf Note, however, that manipulating a PDF in this way will result in loss of image quality. To get around this, specify a particular output density,…

rotate images from the Linux command line

Two tools for rotating images from the command line are jpegtran and exiftran. jpegtran jpegtran transforms JPEG files. It can translate the coded representation from one variant of JPEG to another, for example from baseline JPEG to progressive JPEG or vice versa. It can also perform some rearrangements of the…

re-size images from the Linux command line

I keep a repository of photographs connected to my server, and from it will copy images over into websites I am drafting. In their original format, these images are sized far in excess of what is necessary for high-definition (HD) viewing on the web, and page loading speeds are incredibly…