Archive for the 'Howto' Category

Learning Regular Expressions for Beginners: The Basics

If you consider yourself a programmer and you have not learned regular expressions yet now is the time! At some point in your development you will need to manipulate strings in more complicated ways that simple string functions can’t provide. Regular expressions are used in almost all programming languages and are considered the de facto standard for string manipulation. Regular expressions can also be used in searches and many other utilities.

The problem with regular expressions is that nobody wants to learn them because they look very intimidating. Don’t worry though, we will try to make it as painless as possible.

When I first looked at regular expressions I have to admit they looked absolutely foriegn. You can’t really look at a example snippets and learn a whole lot as you can with some languages.

For example a regular expression might look like this:

((?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,15})

If you are new to regular expressions this will look like absolute gibberish or some encrypted code. With regular expressions you have to start with absolutely nothing and build up. Examples snippets simply wont do. Read more »

Mastering the UPS Shipping API: Getting Started

This article is here to help you get a jump start on using the UPS Shipping API. This article is part 1 of the series that will help you get all the required tools to get you up and running. Later the series will expand upon each service the API has to offer as well as go into detail on how to create your custom programs using various languages and show you examples with both PHP and Perl programming languages.

What is the UPS API?

 
The UPS API is a tool to allow you to communicate with the UPS servers using pretty much any programming language you want. This allows us to send our information, like addresses and weight and receive shipping rates and other information form UPS. UPS provides access to this API for free so developers can interact with their services to provide UPS information through their own custom apps. Whether it be through your web based ecommerce system to accurately determine shipping costs or display tracking information through your website. Read more »

Retrieve IMDB Cover Images with Perl

In response to David’s post on PHP IMDB Information Grabber, I thought I would extend his idea and grab the cover image for the movie and save it. Read more »

Update Twitter From your Blog If you are Logged In

I don’t want to have to login to Twitter all the time to do updates. So what I made was a script that displays a small text box near my twitter updates on my blog when I am logged in. This is handy because not only does is display your tweets it also gives you an opportunity to update them while you are working on a blog post or just browsing around checking your own blog. Read more »

Adding Shell to Vim Using Screen

When programming in Perl or any language that requires you to run it from shell it is often helpful to have two screens open at once. One screen for your editor and one screen for running the program. This is how most IDEs (Integrated Development Environment) are structured; however, since I love Vim and the Linux command line I use a program called screen to make my own IDE type setup. Read more »

How Do I Find Open Ports on FreeBSD?

Sometimes it is helpful to know which ports are currently open on your server. On my FreeBSD servers I like to use the sockstat command. It is very similar to the netstat command for Windows or Linux. You can configure it to show IPv4 ports, IPv6 or both. Read more »

Getting Your Twitter Updates with Curl

I have had some serious issues integrating Twitter into my site using the javascript method. Firefox seems to load the twitter updates every time without a problem; however, Internet Explorer and Opera both have issues.

Opera for example will load the twitter updates on the first load of the page or if the twitter feed has been updated but will not load the second time the page is loaded. You can see this on a number of sites that use the javascript method of gathering twitter updates. Just go to their site and hit refresh and the twitter updates will disapear. Even sites that use twitterjs script from code.google.com don’t load properly after a refresh. Read more »

Introduction to AutoIt

Ever dream about automating mundane tasks? Or wish you could train you computer to do your work for you? I think we would all love to have the power of automation in our lives. With AutoIt we can easily take a boring repetitive task and automate it. AutoIt can send key strokes and mouse movements to your computer. But what makes AutoIt most useful is that it is actually a scripting language allowing If/then logic, flow control, variables and has support for PCRE (Pearl Compatible Regular Expressions). Once you create your script you can even compile it into a single .exe file. Read more »

« Previous PageNext Page »