Printing in Booklet Format from the Linux Command Line
Here is a Linux command to take a PDF of half-letter-sized pages (5.5"x8.5") and arrange them, two pages per side, for booklet printing:
$ pdftops -level3 source.pdf - | psbook | psnup -2 -W5.5in -H8.5in | ps2pdf - booklet.pdf All of these utilities are standard on a Debian-based system. Several filters are tied together using pipes to produce a properly-formatted PDF.
A Closer Look Here’s a pipe-by-pipe breakdown of the command:
Strong Password Generator in Python
I wanted a CLI-based strong password generator for Linux. mkpasswd is nice, but I wanted something more flexible. I didn’t like having to provide my own character sequence. I wanted something with a built-in character sequence generator with an easy way to control the likelihood of numbers and symbols. I wanted something that could read in a character sequence from a file or standard input. And I wanted something that not only had sensible default values, but was easily configurable.
Linux Server: to Reboot or Not to Reboot?
Linux servers have a reputation as workhorses. Since very early in the development of Linux, its users have boasted in the stability of the OS. In fact, it is not uncommon to hear of Linux-based servers running for years without the need for a reboot. This raises the question: how often should you reboot your Linux server?
Months and months of server uptime can be a good thing (and for some, even cause for boasting), but is it wise to go such a long time without rebooting?
Making Bootup Music with beep and rc.local
In my house I run a headless server which I administrate via SSH. I reboot the server regularly, but because there is no monitor there is no way of knowing when the machine is finished booting (since, of course, my SSH connection is terminated during reboot). In a situation like this you can just ping the server’s IP until you get a response, then log in via SSH, check the logs, and make sure everything is running properly.