User:Zucca/tricks

This article contains some of the tricks I use have found interesting or useful. Most of them are command line tricks.

Portage/Emerge
List packages that are installed from a certain overlay. List installed packages and add the overlay after the atom (from the topic above).

Another method that is about as twice as fast in processing the data:

Or by simply using (which is interestingly slower, by a fraction, than previous method):

How to re-emerge all of a package's dependencies? - forum topic. Many interesting answers there.

Kernel related
Read config variable description. ... and replace KVARIABLE with the one you're looking for. Just do not include the CONFIG_ at the beginning. I bet there's much room for improvement --Zucca (talk) 18:24, 16 April 2017 (UTC)

Uptime
The percentage CPU has been idling since last boot.

systemd tricks
How many times the computer has been put to sleep since last boot.

wiki tricks
Convert clipboard content to "wiki formatted". Basically escapes = and |.

awk tricks
Very hacky shebang for awk scripts:

This shebang allows awk script to use switches that would normally be grabbed by the awk interpreter, like --help for example. It maybe debatable if this is really needed.

misc tricks
... To find out what does this do, you need a PC-speaker support of some kind.

Another one, but compressed: