Check These Out
Installs pip packages defining a proxy
If the file content is :
-
Blah blah blah
ABC
hello blah blah blah
bloh bloh bloh
DEF
Bah bah bah
-
You'll get:
-
ABC
hello blah blah blah
bloh bloh bloh
DEF
Often I need to edit a bash or perl script I've written. I know it's in my path but I don't feel like typing the whole path (or I don't remember the path).
Using this command you can track a moment when usb device was attached.
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.
Sometimes my /var/cache/pacman/pkg directory gets quite big in size. If that happens I run this command to remove old package files. Packages that we're upgraded in last N days are kept in case you are forced to downgrade a specific package. The command is obviously Arch Linux related.
Since Bash doesn't support two-dimensional arrays, you can limit your columns length by some big enough constant value ( in this example 100 ) and then index the array with i and j, or maybe write your own get() and set() methods to index the array properly like I implemented for example ( see Sample output ).
For example for i=0 and j=0...99 you'll pick up one of 100 elements in the range [0,99] in the one-dimensional array.
For i=1 and j=0...99 you'll pick up one of 100 elements in the range [100,199].
And so on.
Be careful when using this, and remember that in fact you are always using one-dimensional array.
With a full installation of Solaris 10, the graphical login and desktop will start by default. This command will disable that feature. To enable it again use: /usr/dt/bin/dtconfig -e
Adds the time in 12hr AM/PM format to the beginning of a prompt. Change \@ to \t for 24-hour time or \T for 12hr without AM/PM.
To keep the time the next time you open a terminal, edit ~/.bashrc and stick the command at the bottom.
I know its not much but is very useful in time consuming scripts (cron, rc.d, etc).