grep --only-matching
Classified in : Homepage, Debian, Command line, To remember
grep is designed to print lines matching a given pattern, but I often need to print only the matching part, discarding the remaining.
I used to do that with sed, but it involves several actions: match, replace the line by only the matching pattern and print. Fortunately, GNU grep has an option to do just that:
-o
,--only-matching
- Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line.
Unfortunately it is not a standard option, so it may be missing on non-GNU systems.
Encryption without a certification layer is (partly) useless
With the PRISM scandal, there has been some talk about encrypted communication systems. For instance, BitMessage is often introduced as an easy and secure message system, that would allow you to communicate with no possible eavesdropping. Apple is also making similar claims about their systems iMessage and FaceTime.
This is a good time to remind this: without direct contact or a certification layer, encryption systems are not secure! Or at least, not as secure as you would expect, as they do allow some kind of eavesdropping.
Read more Encryption without a certification layer is (partly) useless
Looking for an SPF milter
For email extensions such as SPF, DKIM and DMARC, I think the most flexible and portable system is the milter protocol. Originally developed for Sendmail, it is now also supported by Postfix, and it allows to “plug” specific filters in the mail server without the hassle of the previous systems like SMTP proxies.
Suspend your computer from a non-mainstream desktop environment
Classified in : Homepage, Debian, Command line, To remember
UPower for regular users
Major desktop environments usually provide a user-friendly menu to suspend your computer. Internally, if seems to use something called UPower, which uses something called PolicyKit, which in turn may or may not use another piece called ConsoleKit (do not ask me what all these pieces are and how they relate to each other, I do not know and I do not want to know). For the regular user, the result is the following: when they click on that button, it suspends their computer.
Read more Suspend your computer from a non-mainstream desktop environment
One archiver to rule them all: bsdtar
Classified in : Homepage, Debian, Command line