I recently installed 10.10 on my MacBook Pro and noticed that whenever I went into battery mode, my wireless connectivity was severely crippled. A look at iwconfig confirmed that the wifi power management was being enabled every time I yanked the plug. I scoured /etc and couldn’t find any acpi or pm event that would trigger this.
Continue reading “Disabling wireless power management in Ubuntu”
By default in Vim, when you begin to :change a word or a line, the old string which you were changing is immediately cleared from the buffer. This behaviour is different from classic vi, where you can still view the old string while you overwrite it. I prefer the old vi behaviour, and this can be set in Vim using the following command:
This stupid setting took me forever to find in the docs, as I wasn’t sure quite how to search for it. A diamond-plated internet goes to the first person that can form a generic Google search that will pull this info up.
The Linux kernel has support to perform some special actions at the press of a key combination. This is known as the “Magic SysRq Key”, and you use it by typing Alt-SysRq, combined with a letter which designates what action you want the kernel to perform. What is so special about using the sysrq key is that the kernel will execute the requested action regardless of what other processes may be running. This is immensely handy if you run into a system which is under heavy load and not responding.
Continue reading “The Magic SysRq Key”
I ran across this treasure on a co-worker’s screen a few employers ago. It makes me cringe to this day:
for i in `ls access.log access.log.1 access.log.2 access.log.3`; do
cat $i | grep 184.108.40.206
I forced the sysadmin to take a screenshot of this tragedy. I keep it as a sort of memorial to the torment that shell faced.
There are two flags I find extremely useful when writing perl one-liners: -00, and -0777. Both of these flags deal with how perl will read in data from STDIN, or from a file.
Continue reading “Perlisms: Handy one-liner flags”
I’m pretty obsessive when it comes to my shell history. I always want to be able to determine “what, where, and when” for any command I run. The following snippet contains all of my shell settings pertaining to history.
Continue reading “Shellisms: Keeping your history in check”
The fateful number. Many an hour have linux sysadmins toiled under the oppression of this metric. Yet surprisingly most do not understand what “load average” means, how it is conjured, or what an “acceptable” load average is.
Continue reading “Linux Load Average”