Wednesday, April 11, 2012

Oracle SQL dynamic order by clause

I never had a dire need for this before today, but it is something I could have used many times in the past to simplify queries and/or use a query instead of a function.


SELECT *
  FROM table alias

ORDER BY DECODE(:bindVariable, 'option1', alias.column0, 'option2', (alias.column1 * alias.column2)) DESC NULLS LAST,
         alias.column3 ASC);

It has been around for at least a decade so, although I don't write a ton of SQL or PL/SQL, I'm surprised I haven't seen it before today.

Restoring "lost" windows on Windows 7

I'm not sure why but Firefox always seems to disappear on me.  If I maximize it from the Task bar I can see it but when I click to resize it disappears.


This post helped me to get it back on screen in less-than-maximized mode.

Wednesday, March 28, 2012

Linux process information: STIME date and time

I've been using "ps -ef | grep <some_string>" for several years.


But I found this post today and it helped me solve a problem that required more specific STIME information.


Here's the command
ls -ld /proc/<pid>
where <pid> is your, um, PID.

Sunday, March 11, 2012

Installing Linksys PCI wireless firmware on Ubuntu 11.10

Wireless card on vintage Gateway (2003) spotty after moving from XP to Ubuntu, but I dug through the old hardware bin, found a WPC54G PCI card and was able to get it up and running.

https://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx

Saturday, March 10, 2012

Installing Git on Centos 5.8

http://kb.liquidweb.com/install-git-on-centos-5/
http://thebuildengineer.com/index.php?itemid=11


> yum install gcc
> yum install zlib-devel
> wget http://git-core.googlecode.com/files/git-1.7.10.rc0.tar.gz
> tar xvsf git-*.gz
> cd git-*  
> ./configure
> make
> make install