Use a specific CentOS mirror

I want my server to get updates from the CentOS package mirror mirror.nus.edu.sg, here we disable the fastestmirror plugin; e.g., $ cat /etc/yum/pluginconf.d/fastestmirror.conf [main] enabled=0 verbose=0 socket_timeout=3 hostfilepath=/var/cache/yum/timedhosts.txt maxhostfileage=10 maxthreads=15 #exclude=.gov, facebook Now set the mirrorlist, baseurl and failovermethod values for CentOS-Base.repo for the various sections (base, updates, addons, extras, centosplus, contrib). The baseurl value is configured on a per-section basis, so edit carefully. Here’s mine, reproduced in full: $ cat /etc/yum.

Missing battery icon in Vista taskbar

With reference to this post, I encountered this same problem last night, on a Vista install. Right-clicking the taskbar, then selecting Properties -> Taskbar and Start Menu Properties -> Notification Area -> System Icons -> Battery does not work, as the check boxes are greyed out. The easiest solution is to hit Ctrl+Alt+Del, bring up the Task Manager, and then restart explorer.exe. Here’s the solution that I’ve directly taken from Akshit’s reply to that thread:

TrueHoop's Stat Geek Smackdown 2010

So it’s time for the NBA’s second season, once again. I’ll do my own predictions here, since I’m no NBA expert. 5 points are awarded for correctly picking the winner, with an additional 2 for correctly picking the number of games played. First Round (39) CHI-CLE (CLE in 4) (5, CLE won in 5) CHA-ORL (ORL in 5) (5, ORL won in 4) MIL-ALT (ATL in 5) (5, ATL won in 7) MIA-BOS (BOS in 6) (5, BOS won in 5) OKC-LAL (LAL in 6) (7, LAL won in 6) SAS-DAL (SAS in 5) (5, SAS won in 6) POR-PHO (PHO in 6) (7, PHO won in 6) UTH-DEN (DEN in 5) (0, UTH won in 6) Conference Semi-Finals (10) SAS-PHO (SAS in 6) (0, PHO won in 4) UTH-LAL (LAL in 5) (5, LAL won in 4) BOS-CLE (CLE in 6) (0, BOS won in 6) ATL-ORL (ORL in 6) (5, ORL won in 4) Conference Finals (7) PHO-LAL (LAL in 6) (7, LAL won in 6) BOS-ORL (ORL in 6) (0, BOS won in 5) Finals (0) BOS-LAL (BOS in 6) I received a total of 56 points, good for 5th overall.

Check what services are accepting network connections

This network statistics command is your friend; e.g., $ netstat -tnlp (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:1521 0.0.0.0:* LISTEN - tcp 0 0 0.

OCIEnvNlsCreate() failed again

I encountered OCIEnvNlsCreate() failed again, this time on Fedora 12. I was looking for that same file to export environment variables – Apache’s SetEnv directive does not work – and there is no equivalent of /etc/apache2/envvars as far as I can tell. Many others seem to have encountered this same problem before, but never found the solution. Eventually I did, in an Oracle-hosted article about Oracle, PHP and Linux. It’s not called out explicitly, so here’s my go at it: insert the call to oracle_env.

Using grep with Subversion

I use grep alot, but it false positives when searching in a Subversion working copy. So I’m using the -r flag to recursively search for the phrase quick brown fox: $ grep -r 'quick brown fox' * app/controllers/users_controller.php: quick brown fox app/controllers/.svn/text-base/users_controller.php.svn-base: quick brown fox I don’t really want a hit on anything in .svn, so exclude it like --exclude-dir=.svn.