Archive for December, 2011

Perl – Using Pattern-sequence Memory with Regular Expressions

Thursday, December 29th, 2011

Pattern-sequence memory is very useful when you want to match the same character in several places but don’t care which character you match as long as all occurrences are the same character. For example, the below code matches the date format “dd-mm-yy” where the dashes can be any two of the same non-word characters (in regex notation the range would be [^_0-9a-zA-Z]). Pattern sequences are stored in memory from left to right, so “\1″ would represent the first match. (more…)

Twitt

Setting-up DHCP with IP Helper-Address on Cisco Routers

Thursday, December 29th, 2011

In a prior lab, Setting-up DHCP on Cisco Routers, I discussed how to setup a Cisco router as a DHCP server. In this lab, I use a DHCP server setup on one subnet to provide DHCP services to two different subnets. For this lab I use a Cisco 2126XM router [IOS Version 12.2(28)] as the layer 3 device and two Cisco WS-C2950-24 switches [IOS Version 12.1(22)EA4X] as the layer 2 devices. The network diagram and DHCP server configuration for this lab is shown below. (more…)

Twitt

HumairAhmed.com: Top 500,000 Websites in US – Not Bad for a Blog!

Wednesday, December 28th, 2011

BloggingWell, it looks like I’ve finally broken into the top 500,000 websites in the US in terms of traffic according to Alexa. Not bad for a semi-periodically updated blog I suppose. Most sites, especially personal blogs, don’t even make the ranking let alone break the 1,000,000 barrier. My global ranking is still around 4,000,000 to 5,000,000, which is still good for a blog. (more…)

Twitt

Setting-up DHCP on Cisco Routers

Sunday, December 11th, 2011

The Dynamic Host Configuration Protocol (DHCP) provides the capability to automatically allocate reusable network addresses and configuration options to hosts. (more…)

Twitt

Perl – Obtain the File Size

Friday, December 9th, 2011

Here is a cool one line Perl script you can use to quickly obtain the file size of a file. The syntax to run the script is “perl [scriptname] [filename]“; in the below example I use the script itself as the file. (more…)

Twitt

Perl – Writing the Linux ‘cat’ Utility

Friday, December 9th, 2011

The below Perl code will give you similar results compared to the Linux ‘cat’ utility. At the command prompt, just enter “perl [scriptname] [filename1] [filename2] etc … (more…)

Twitt

Perl – File-Test Operators

Friday, December 9th, 2011

In Perl, file-test operators are useful for determining the status of a file. Some of the operators below refer to the “real user” which is the User ID specified at login rather than “effectve User ID” which refers to the User ID you are currently working under. The general syntax is -[file-test operator] [operand being tested]. (more…)

Twitt

W3C Feed Validation Service and Markup Validation Service

Thursday, December 8th, 2011

W3CThe W3C Feed Validation Service is a very useful tool to validate the syntax of Atom or RSS feeds. I just used it to determine why my LinkedIn WordPress application could no longer connect to my WordPress RSS feed. (more…)

Twitt

University of Berkeley Astronomers Discover Largest Known Black Holes

Wednesday, December 7th, 2011

Black HoleUniversity of California, Berkeley Astronomers have discovered the largest black holes known to date. The black holes are estimated to be have masses equivalent to about 10 billion suns each (one black hole being slightly bigger than the other). The two black holes are in clusters of elliptical galaxies greater than 300 million light years away (1 light year is approximately 5.8 trillion miles). (more…)

Twitt

Tech Tips – Check if your E-mail Server is Running [Video]

Wednesday, December 7th, 2011

I created and uploaded this video to youtube back in 2009, but I thought it might be helpful for others if I post the link here. It’s just a simple video that shows you how you can use telnet to determine if your e-mail server is running. Telnet can be a great tool for troubleshooting connectivity and server issues. (more…)

Twitt