Home
Sunday, 20 May 2012

Search

Subscribe

Subscribe to KeithsCode.com
 

Get Stuff

CafePress Store
 
Windows Gadgets

Recently, I decided to write myself a couple Windows Desktop Gadgets for Windows 7. I wanted to be able to see the load averages on all my servers without opening an SSH connection and I wanted to be able to quickly generate a random password without opening a web page.

The graphic on these aren't spectacular ... I'm a more of a programmer and less of a designer. They've been tested with Windows 7 Professional, but I assume that they will also work as Windows Vista Sidebar gadgets.

Take a look at my gadgets and let me know what you think. If you have any comments or suggestions, let me know.

Keith's Windows Gadgets

 
WAN IP from a bash script

Today I was, once again, faced with a problem where a bash shell script was the best solution. Seeing that I spend most of my time writing php code, the shell script was a welcome break.

A few minutes into my coding of the shell script, I realized that I needed the WAN IP address of the server I was working on. My first thought was to write some sort of fancy shell interface into the router where I could query the information I needed and use it in my shell script, but that would have been a bit of overkill. So what I did was put a nice little php script at http://ip.keithscode.com that simply prints the remote IP address that is accessing the script.  Now I can easily get the IP using the following line in my script:

IP=`wget -q -O - http://ip.keithscode.com`

I thought this bit of information my be helpful to someone, so I decided to put a quick note about it here. I've included examples and a bit more explanation after the break. 

Enjoy ...

Read more...
 
Dell Mini 10 with GMA500 (Poulsbo) at 1366x768 under Ubuntu 9.04
I recently acquired my new Dell Mini 10 with the beautiful and bright 1366 x 768 HD 10.1" screen. However, to get the nice HD screen, I had to order the laptop with Windows XP Home pre-installed.

My first order of business was to get the netbook running a dual boot configuration with Ubuntu and Windows. Once I determine that all the hardware works as expected under Ubuntu, I'll be removing windows completely. 

This tutorial assumes that you have a working, fully updated install of Ubuntu 9.04 (Jaunty Jackalope) running on your Dell Mini 10 (not the Mini 10v) and just need to get the Poulsbo driver working for the Intel GMA500. 

Read more...
 
Swoopo and Faith in Humanity

I’m sure you’ve seen the ads, a $1500 TV selling for $86.00, an $800 digital SLR selling for $50. After ignoring the ads for some time, I had to check-out Swoopo .

Upon visiting the site, I had 2 thoughts:

1.    Why didn’t I think of that?
2.    Wow, there are some stupid people out there!

I’ve read a lot recently about people thinking that Swoopo is a scam or a rip-off or something untoward and should be shut down. After looking into the site a bit, I whole-heartedly disagree. Swoopo is another means of entertainment and you do have to have a measure of intelligence to use the site.

To illustrate, I’d like to use two examples from the site ...

Read more...
 
Installing Dell OpenManage Server Administrator on Ubuntu

Dell's OpenManage Server Administrator is a powerful tool for keeping track of your server's health and making sure everything is running as it should. Unfortunately, Dell only released packages for RedHat and SuSE, so installing the software on Ubuntu can be tricky, at best.

There is some information on the Internet about getting the package to install on exotic distributions, but I never found anything definitive. This tutorial will guide you through installing the software and getting the web access up and running. 

My setup is: Dell 2950 with 1 Intel 2.2GHz Processor, 2GB RAM, PERC 5/i SCSI Raid Controller with 2 73GB 15K RPM SAS disks running Ubuntu 8.04.2 LTS 64-bit.

Read more...
 
Keep Apache Running!

I recently encountered a problem on one of my servers with logrotate and the Apache web server. Logrotate is configured to run daily and help me keep all the log files at a manageable size. In the configuration, I have it set to rotate my Apache2 log files on a weekly basis.

The problem was, on one server, apache was not properly restarting after the log files were rotated. The script would run on Sunday morning, my logs would show that apache shutdown gracefully, but it would never come back up. The only log entry that gave me any indication of an issue was simply:
[notice] caught SIGWINCH, shutting down gracefully

In doing some research, I found that there were others with a similar issue, but no one had a solution. The best I could do was come up with a work-around. I created the following script and added it to my /etc/cron.hourly folder:
#!/bin/bash
if [ `pgrep apache2 -c` -le "0" ]; then /etc/init.d/apache2 start; fi

Now, every hour, this little script will count the number of apache processes that are running and, if it doesn't find any, start apache. 

Seems easy enough to me and, hopefully, this will help someone else out there, too.

Ciao!

 
Changing the Windows Vista Default Logon Account

vistabutton.jpgIt appears that changing the Windows Vista default logon account or removing the auto-login completely is a tricky thing to do.

In this tutorial, you will learn how to enable auto-logon, select a default account for auto-logon, or turn off the auto-logon feature. 

Read more...
 
The KVM Manual

In my quest for a rackmount KVM that would not break the bank, I came across a number of older Compaq KVMs that would exactly suit my needs. While I was looking at the KVM trying to figure out how much I wanted to pay for it, I realized that there were no buttons or any hardware means of selecting the computer that you were viewing. It all had to be done from OSD.

Read more...
 
Installing Subversion on a Home Ubuntu Server

This tutorial will describe how to install Subversion with SSL web access onto a home server. Subversion is a great way to keep track of a number of projects and have widespread access to all of your files. It doesn't matter if you are the only person that will be accessing the repository and don't need all of the version control features, it is still a great way to keep an eye on your projects and make sure you have your information wherever and whenever you need it.

This tutorial uses Ubuntu Server 8.04 with Apache2, OpenSSL, and WebDAV. It assumes that you have a properly setup server including Apache and OpenSSL, at least a little Linux knowledge, and access to the Linux command prompt with sudo access. This tutorial is geared toward the home Linux server and assumes that your ISP blocks all incoming ports below 1024.

Read more...
 
Community Builder User Redirection
CB User Redirect BoxThere are a number of reasons why you would want to redirect a user upon login. Maybe you want to have a different starting page for different classes of members, or you have just updated your terms of service and you want all the users of the site to view them on their next login, or you have a special message for all moderators that needs to be read and confirmed on their next login. That's where the Community Builder User Redirection component comes into play, a custom Joomla! component that works with a Community Builder plugin to redirect users upon logging into the site.
Read more...