UnfamiliarTerritory.net

Programming Posts

Hacking and building apps

Search for Addresses by Proximity to ZIP Code Using Free GPS Data

Tuesday, July 1st, 2008 Posted in Programming | Comments Off

[singlepic=734,320,240,web20,right] The "Pro MySQL" book from apress has some really really valuable information in it. Amongst some of the other gems available within its pages is some information on how to query for ZIP code information within a specified radius given a fixed starting point. The geographic coordinate data you'll need to perform the calculations is available for free at the census.gov web site. The information I extracted from their site went into a table that holds all US ZIP codes ...

Using Icalendar Formatting to Create Outlook Calendar Events with Rails

Monday, June 30th, 2008 Posted in Programming | Comments Off

[singlepic=733,320,240,web20,right]I'm not a Microsoft fan but you have to admin that Outlook is the standard when it comes to office calendars. Whether or not you have an Exchange server setup it's helpful to be able to create and send appointment/event invitations for Outlook. I had to offer this functionality recently and my usual Googling for solutions turned up few results. There were a few results for php and a few results for the other usual suspects. Looking at the solutions ...

Some Rails Resources

Thursday, June 19th, 2008 Posted in Programming | No Comments »

For my reference: Official Documentation Rails Official API - Awesome for Rails specific functions - lots of examples Great for general Ruby questions (Time/Date syntax, Array functions, etc - not too many examples Rails Wiki - only slightly useful - not up to date Rails Blog - interesting examples and news Plugin Repository - Why code it when it's already been done by an expert Webcast Archives http://railscasts.com/episodes;archive http://peepcode.com/ (paid site) Rails Books Advanced Rails Recipes Agile Web Development with Rails - The ...

Group Email Addresses by Domain Using SQL

Thursday, June 19th, 2008 Posted in Programming | Comments Off

[singlepic=734,320,240,web20,right] This sql excerpt isolates the domain name and provides a frequency account for each domain name from a MySQL table storing customer information. Great for knowing how many users you have at each company. Using domain name can sometimes be more accurate then a freeform 'Firm name' field. It's easy to do! select count(distinct(p.email)) as total, substring(p.email,LOCATE('@',p.email)+ 1) as domain FROM mycustomertable p GROUP BY domain ORDER BY total DESC

Using Photoshop to Create a Cartoon Effect

Tuesday, May 20th, 2008 Posted in Programming | No Comments »

[singlepic=732,320,240,web20,right] One of the things I have always loved is seeing how some of the different filters in Photoshop can be used to actually make something look better/cooler instead of just takeing a great picture and f'ing it up. For the most part, the filters in Photoshop are great for making some sort of background for a web page or abstract art (why you would use Photoshop to create abstract art is beyond me). Otherwise, I have really struggled to see ...

Using Windows Batch Files to Backup MySQL using mysqldump

Tuesday, May 20th, 2008 Posted in Programming | Comments Off

[singlepic=735,320,240,web20,right]Backing up your database can be a drag/pain in the ass. You want to make sure you're getting all of the data and you don't want to have to remember to run your scripts at certain times throughout the week. And, if you're like me you don't have any super cool tape library/backup software to do the job for you. I ended up creating several .bat file pieced together from various snippets on the web. The process works like this...there's a ...