Things you might find useful

Archive for the ‘Code’ Category

CSS Flip-Counter Experiment

Monday, December 5th, 2011

The biggest shortcoming of my flip-counter script is the difficulty in modifying the appearance of the counter—any styling changes require altering 70 different sprite states. I am constantly asked for a nice layered template that would make updating the counter easier, but unfortunately none exists. The best way to make the counter’s appearance easily customizable is to get rid of the images entirely, and that was the goal of this experiment. Read the rest of this entry »

Tags: , ,
Posted in Code | View Comments

Logging Disqus Comments with Clicky

Tuesday, April 5th, 2011

When someone makes a comment on my site, I like to see it in the visitor’s action list on Clicky. If you’re using Disqus with WordPress, here’s an easy way to log comments.

Read the rest of this entry »

Tags: ,
Posted in Code | View Comments

Scrolling Content with jQueryUI Slider

Saturday, February 5th, 2011

My first step when thinking of ways to create scrollable content was a Google search that lead me to a good post outlining how to use jQueryUI Slider to scroll a div. This solution required altering the jQueryUI source, which I felt was unnecessary, so I came up with a simple solution.

Read the rest of this entry »

Tags: ,
Posted in Code | View Comments

Creating Apple’s New Slide Menu with jQuery

Sunday, January 30th, 2011

I don’t know how long it’s been there, but I noticed yesterday that Apple has a new product nav menu that replaced their old horizontal scroller with some new animated candy. I was impressed to see that all transitions and animations are CSS-based. Unfortunately, it will take some time before all major browsers even support this cool new CSS wizardry. Never fear—you can create a similar menu with jQuery that works in every browser, even IE6.

Read the rest of this entry »

Tags: , ,
Posted in Code | View Comments

Apple-Style Counter Revisited

Monday, November 15th, 2010

My original post detailing how I recreated Apple’s flip-style counter is a popular one, and I get many questions about how to properly implement it. It didn’t take long before I saw some shortcomings to the original technique I used, so I thought it was time to revisit my Apple-style counter and make some improvements.

Read the rest of this entry »

Tags: , ,
Posted in Code | View Comments

Filtering Out the Noise with Regex

Tuesday, July 13th, 2010

I rely heavily on regular expressions when processing old data. Like my post about cleaning phone numbers, I’ll demonstrate another example of how useful regex can be when dealing with unruly data.

Read the rest of this entry »

Tags: ,
Posted in Code | View Comments

YouTube Event Logging

Sunday, April 25th, 2010

A few months ago, a project bid had me looking at YouTube’s JavaScript API for ways to manage a video library through a custom interface. Most of the videos were over 30 minutes, and I thought it would be great if I could provide some analytics on how users were interacting with the videos. Were people getting bored and leaving at a certain spot, rewinding interesting parts, or maybe randomly scrubbing through it?

Read the rest of this entry »

Tags:
Posted in Code, Utilities | View Comments

Apple-Style Counter

Friday, February 12th, 2010

When I saw the 10 billion song counter on Apple’s website yesterday, I immediately right-clicked on it to see if it was flash. No big surprise to see that it wasn’t, this being Apple, and when I saw it was done using JavaScript I knew how I’d be wasting the next few hours.

Read the rest of this entry »

Tags: , ,
Posted in Code | View Comments

IMDB Episode Scraper

Sunday, October 18th, 2009

I like to keep my TV rips well-organized, and labeled with the correct episode title. I’ve been using the excellent Bulk Rename Utility to quickly rename with proper series title, season and episode numbers—but the individual episode titles were always a pain. Begrudgingly, I’d just copy-paste the titles from Wikipedia, always wanting a way to automate that process.

Read the rest of this entry »

Tags: ,
Posted in Code | View Comments

Cleaning Phone Numbers with Regular Expressions

Sunday, August 30th, 2009

I’ve been in the position of having to take an unnormalized database that had virtually no data validation or standardization in place, and migrating it to a completely different, normalized schema. I wielded the power of regular expressions (regex) to help me through the process.

Read the rest of this entry »

Tags: ,
Posted in Code | View Comments