Use a cookie to iterate between visits with PHP.

Here's a small code snippet that I use to increment a value between visits using a PHP cookie.I use it, for example, when I have 3 different images that could go on a page, and I want to serve up the next one in the sequence on subsequent visits to the page. I just use the "$num" where appropriate.You can edit the '2' in line 14 to change the wrap around value to suit your needs. Happy... + read on

Making Round Ice Cubes: Round 3

Feature image

My quest for round ice “cubes” continues!First of all, I will state the obvious. “Cubes” is the wrong word to use when it comes to a spherical-shaped objects, but you know what I mean when I say “round ice cubes.” Enough with the semantics of the situation. I find round ice cubes interesting, as I’ve mentioned on this site before in the previous posts A Geeky Spin Chilling a Cocktail - Round Ice Cubes and Round Ice Cubes: The SequelThis... + read on

Good Gadgets of 2012

Feature image

As I look back on my gadgets of 2012, I think I had a very good year. There’s not a total dud in the bunch. Perhaps I’m just getting a better sense at what technology I’ll like and will use before I take the plunge. (Let’s not talk about the XBOX Kinect I bought in 2011. At least it has a new good home.)What’s been on my 2012 list? It’s not necessarily an ordered list, but I’ll get to the best at the end.FitbitI loved my Fitbit Ultra while... + read on

Making MAMP Pro domain names resolve in VMWare Fusion

I use MAMP Pro quite often to develop locally on my Mac. Getting VMWare Fusion to recognize my host names require jumping through a few hoops, but getting it working is key to getting my work done.Here’s how I do it.Set up MAMP ProUnder Server, I set up my MAMP server to run on the default ports: Apache 80 and MySQL: 3306. Running Apache/MySQL as user can be set to either setting.Under Hosts, I make my Server Name be whatever I’m... + read on

MAMP and Navicat and Character Set Hell.

I’ve used Navicat for years. I’ve used MAMP Pro for years. Both tools are must haves as far as I’m concerned, but I had been having problems with special characters being corrupted for nearly 6 months. Every curly quote, m-dash or umlaut was torturous.Briefly, the problem was that those special characters (like curly quotes) would be changed to question marks in my database after I had migrated it to or from my local development environment.... + read on

ExpressionEngine Add-on: SuperGeekery DayPhrase

Feature image

Eight Days a Week?

During a recent update to this site, I made a small ExpressionEngine add-on, SuperGeekery DayPhrase, to deal with a blurb of text that changes based on the day of the week in the footer. “Earth-shattering, it is not,” as Yoda might say, but since I built the previous version of SuperGeekery I’ve become aware of the benefit of not having any PHP in your templates. Speed. Because of the way PHP is rendered in the ExpressionEngine parsing process,... + read on

Facebook’s unimpressive opening day bodes well for the Facebook Platform.

Feature image

Yesterday, Facebook’s IPO could be seen as a face plant for the kid full of hubris during his first time in the spotlight. As a developer, I see this as a potentially great set of circumstances for Facebook.My hope is that yesterday’s anticlimax of an IPO may lead to a more stable platform to build upon. I like the API and the more I work with it that admiration only grows. I just want evolution in the API, not revolution.Facebook is... + read on

Lessons learned in ExpressionEngine add-on development

Feature image

In January I released the first commercial add-on I’d developed for ExpressionEngine. It’s called Pic Puller and it helps an ExpressionEngine developer create and integrate an Instagram application into his or her site.This post isn’t meant to get you to go buy a copy of the Pic Puller add-on. (Granted, I won’t stop you either.) Rather, it’s a personal journal of my process of making it and what I’ve learned along the way. It may be a bit... + read on

Expression Engine 2 Plugin: Empty P Stripper

Feature image

I’ve got a small little Expression Engine add on., but it might be helpful if you use Pixel and Tonic’s WYGWAM to give your client’s text entry into an Expression Engine textfield a little UX love.WYGWAM’s a good tool that I’ve used several times on sites. Clients find it an easy thing to pick up. For a recent build though, I kept noticing some strange spacing when my client was using it to create copy. There were empty P tag pairs scattered... + read on

Expression Engine Addon: Conditional TrunchHTML

Feature image

I've been working on an Expression Engine site recently where I needed to truncate some HTML to fit within a certain sized space.I've done similar truncations tasks before, right here on the SuperGeekery home page, with Oliver Heine's handy TruncHTML. I use it in combination with my own SuperGeekery Tagstripper to selectively strip out some of the HTML tags. (On a side note, it looks like Hacksaw has now combined these functions to some extent... + read on

Twitter Feed

John Morton talking on Twitter




Meanwhile on Instagram… //

My latest shot from Instagram.