Data, Maps, Usability, and Performance

API canvas d3 data geo GeoJSON html5 image JavaScript json maps mysql PHP WordPress

Grep, Awk, and Sed in bash on OSX

linux bash scripting osx

In the last couple days I have been messing around with huge log files on OSX bash (or command-line). I have used grep, awk, and sed to manipulate and rewrites these log files. Here are some commands that I found useful to document for the future. If you have never used these bash tools, this might be useful, especially if you are trying to mess around with files that are really big. I’m going to consider sample log file and explain a couple different things you can do with these tools. I am using these tools on OSX and these commands or one-line scripts will work with any Linux flavor.
Read more

Typos Script to Generate Misspellings

SEO Typos Script

I was thinking about misspellings recently and wanted to put together a small PHP script that will generate typos from a given word. The idea is based around typos being generated based on proximity of other letters or numbers next to the correct character on a keyboard. There are other ways to think about misspellings, but it makes sense that most typos occur as a result of a user accidentally pressing the wrong key. So, we just create an array for each key, which has all the surrounding keys, and then use these arrays in a loop which replaces characters in a string with other characters that are close in proximity on the keyboard.
Read more

A-Z Category Index WordPress Plugin

Category WordPress Plugin

If you have a lot of categories on your WordPress website, you might want to organize these categories by each alphabetical letter. In other words, build an A-Z index that allows an end user to click on any letter, which then loads a page that lists all the categories that start with that letter. This is often the design or interaction in music websites which deal with many artists and albums.

I noticed that some people have been looking for this type of WordPress plugin but most of the plugins I have found for such organization have been developed around posts not categories. So, I decided to build this plugin, but more importantly, document the process, as this WP plugin will make a new table in the database, runs queries, hook into WordPress actions, leverage a page template, and much more.

My first thought is that you could manually create this A-Z index, create all the pages for each letter, create a template file for these pages where you would grab all the categories and loop through them to retrieve the correct categories per letter. The small problem with that approach is that it is manual work and the big problem is that it is not going to perform very well when you have 100s if not 1000s of categories.
Read more

Instagram Web Viewer using the Instagram API

Instagram Web Viewer API
Here is the Instagram Web Viewer


Want to search Instagram pictures and see them sorted by likes? Here is Instagram Search with Sorting

I was reading recently about the crazy growth of Instagram and decided to take a look at their API. I don’t really use Instagram but I love photography and have often wanted to explore some Instagram tags. I know that there are a bunch of websites out there like Webstagram, Populagram, and Statigram which let you browse Instagram on the web, but I wanted to build my own simple Instagram web viewer. My idea is to make it simple, fast, and easy to anonymously browse Instagram using only HTML5.
Read more

Online Shapefile to GeoJSON Converter

JavaScript Map Converter
Online Shapefile to GeoJSON converter

I have recently been thinking about some standard format for representing geographical data that can be used to create maps with JavaScript. Looking at Kartograph, RaphaelJS, and D3 I came to the conclusion that GeoJSON should really be the standard. I hate how jVectorMap and JQVMap, two similar jQuery mapping plugins, are using separate custom JavaScript object formats. They should use GeoJSON (or TopoJSON).
Read more

Starter Themes and Frameworks for WordPress

Best WordPress Starter Themes

Do you use any frameworks or starter themes when creating a new WordPress theme? In the past, I would usually start with Twenty Ten or Twenty Eleven and slowly strip things out before adding my own HTML and CSS. Recently, however, there has been a lot of development into frameworks and starter themes which are designed to put you in a better starting point in theme development. Many of these frameworks are based on HTML5, better SEO, and blank structure which lets you just focus on the essentials. Here are the best 5 of these free WordPress frameworks:
Read more