This is a simple Javascript function to format a phone number.

Date posted: April 22, 2010 | Author: | No Comments »

Categories: Programming Web

Tags: , ,

If your hard drive fails on your linux server it can always be stressful, but that is why you should always have some kind of raid setup and backups available. If you do not have a hardware raid card in your server you can use software based raid. I always set my servers up with RAID 1 (mirrored disk) and backups to an external server. Remember RAID is not a backup solution since deleting a file on your mirror will remove it from both disks. Below are the basic steps for replacing a mirrored disk in software raid using mdadm.

Remove all raid partitions on the failed disk

Continue reading Replacing a Mirrored Disk Using mdadm

Date posted: March 10, 2010 | Author: | No Comments »

Categories: Linux

Tags: , ,

You can use TCL/Expect to automate SSH logins to a remote server to execute a command on that server.
This automated login script can be modified to work with any command line program that prompts for passwords or user input. I have used similar scripts to automate CVS logins and updates, and I have automated many other tasks in linux. The following example will SSH into a server and restart apache.

Continue reading Automated Login Script Using Expect

Date posted: April 16, 2008 | Author: | No Comments »

Categories: Linux Programming

Tags: , ,

This is a simple function that validates a given phone number and if it is valid it returns it in the form xxxxxxxxxx.

Date posted: February 2, 2008 | Author: | No Comments »

Categories: Programming Web

This is a shell script that I wrote that checks the Qmail mail queue size and if it is above a given number it will send an email alert. With this handy script you can be notified of when your mail queue is filling up before you run into problems. This can easily be added to a cron job. You may have to change some of the script to make work on your system.

Continue reading Plesk mail queue notifier script for qmail

Date posted: December 24, 2007 | Author: | No Comments »

Categories: Linux Programming Web

A poem about candy

Sweet chalkful bliss fills my mouth
And teeth grind each one to powder.
Momentarily dry, but quickly fills
With wet, craving even more.
Take another, light blue like faded paint
Trying to disguise itself
As something different. Burst!
Same disintegrating demise, the taste
Is different, but only lingers shortly
Until it is consumed into oblivion.
A yellow one with a chipped corner
Begging to be let go,
Suffering enough from imperfection.
Ending the pain, quickly
Like the first two. Sickly red
Taken from the dwindling row
And ended with a dissimilar taste.
Another blue, followed by a white,
Taken together to form a cloudy sky
Of sweet paradise’s sun-light.
One by one they fell into darkness,
Voices, I can still hear every time
I stroll past their friends, lined up,
Tight in plastic, where life is just fine.

Date posted: July 1, 2007 | Author: | No Comments »

Categories: Poetry

It’s that time of year again and watching those Christmas themed TV shows and movies is inevitable. But here are some suggestions to make your holiday a little more enjoyable.

I suggest:

  1. A Christmas Story – This movie has so many funny scenes. I particularly like scene where Ralph’s father gets the leg lamp(I want one of those!). The narration by the “Adult” Ralph is also very hilarious.

    Mother: All right. Now, are you ready to tell me where you heard that word?
    Adult Ralph narrating: Now, I had heard that word at least ten times a day from my old man. He worked in profanity the way other artists might work in oils or clay. It was his true medium; a master. But, I chickened out and said the first name that came to mind.
    Ralph: Schwartz!

  2. National Lampoon’s Christmas Vacation – One of my favorite Chevey Chase movies. One of the funniest scenes in the movie is where Clark Griswald goes into a rant after not receiving an expected bonus from his boss. Here is that wonderful rant:

    Hey! If any of you are looking for any last-minute gift ideas for me. I have one. I’d like Frank Shirley, my boss, right here tonight.

    I want him brought from his happy holiday slumber over there on Melody Lane with all the other rich people and I want him brought right here, with a big ribbon on his head, and I want to look him straight in the eye and I want to tell him what a

    cheap, lying,
    no-good, rotten,
    four-flushing, low-life,
    snake-licking, dirt-eating,
    inbred, overstuffed,
    ignorant, blood-sucking,
    dog-kissing, brainless,
    dickless, hopeless,
    heartless, fat-ass,
    bug-eyed, stiff-legged, spotty-lipped,
    worm-headed sack of monkey shit he is!

    Hallelujah! Holy shit! Where’s the Tylenol?

  3. Nightmare Before Christmas – A very fun animated movie by Tim Burton. I really enjoyed the style of animation and the original and interesting story. The movie is about the mayor of Halloween, Jack, taking over Christmas from Santa.

    Jack Skellington: Sally! I need your help most of all.
    Sally: You certainly do, Jack. I’ve had the most horrible vision!
    Jack Skellington: That’s wonderful!

Yeah, I know it is only a list of 3 movies, but I need to get some sleep.

Date posted: December 25, 2006 | Author: | No Comments »

Categories: Movies

Who needs IPv6 for more IP addresses when you can just arbitrarily increase the ranges. When we enter the wonderful world of syndicated television anything is possible. I was watching an episode of Smallville from season 3 titled “Delete”, and in this episode the characters are being hypnotized to kill Chloe by mysterious email messages. During one of the scenes they try to find out where the emails are coming from by tracing the IP. When the computer screen is shown you can see the IP address and netmask, and both are invalid. The IP address is 134.541.168.170 and the netmask is I think it is interesting that they choose that particular subnet mask because the pattern is similar to the common netmask. At first glance most people wouldn’t notice this, but the geekiness in me made me rewind and pause. So now that I am done rambling and after providing not a single ounce of useful information, I present the screen captures:

Computer Screen
A graphical front-end for whois

Bogus IP Addresses
IP address and subnet-mask

Date posted: December 11, 2006 | Author: | No Comments »

Categories: Computers Linux

Copyright © 2013, Neil Bittner. All Rights Reserved.