Check These Out
Run as root. Path may vary depending on laptop model and video card (this was tested on an Acer laptop with ATI HD3200 video).
$ cat /proc/acpi/video/VGA/LCD/brightness
to discover the possible values for your display.
Use curl and sed to shorten an URL using goo.gl without any other api
Moves the mouse 1 pixel down and to the right, then immediately back again, every 4 minutes. This keeps screensavers from turning on. I have used this extensively and I've never even noticed the mouse movement because it is so subtle.
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
stty sane resets the tty to basic usable function. The ^J is a newline -- sometimes CR/LF interpretation is broken so use the ^J explicitly.
Very useful in shell scripts because you can run a task nicely in the background using job-control and output progress until it completes.
Here's an example of how I use it in backup scripts to run gpg in the background to encrypt an archive file (which I create in this same way). $! is the process ID of the last run command, which is saved here as the variable PI, then sleeper is called with the process id of the gpg task (PI), and sleeper is also specified to output : instead of the default . every 3 seconds instead of the default 1. So a shorter version would be sleeper $!;
The wait is also used here, though it may not be needed on your system.
$ echo ">>> ENCRYPTING SQL BACKUP"
$ gpg --output archive.tgz.asc --encrypt archive.tgz 1>/dev/null &
$ PI=$!; sleeper $PI ":" 3; wait $PI && rm archive.tgz &>/dev/null
Previously to get around the $! not always being available, I would instead check for the existance of the process ID by checking if the directory /proc/$PID existed, but not everyone uses proc anymore. That version is currently the one at http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html but I plan on upgrading to this new version soon.
Installs pip packages defining a proxy