Archive for the ‘Programming’ Category
HTML5 form inputs in CakePHP 1.2
At work, we’re building out a mobile version of our replicated sites. As anyone who’s used an iPhone or Android browser to fill out a web form knows… using an iPhone or Android browser to fill out a web form is really annoying, and it’s best to make things as user-friendly as possible. That’s why [...]
Creating on-the-fly MP3 playlists on the NMT
All I wanted was a way to quickly and easily get some music going on my nice home theater through my Popcorn Hour, preferably with a “shuffle” option — start it up and let it run. I built a custom PHP script to do just that.
CSS woes at eBay
I don’t generally pay a ton of attention to web typography, but I must have it on my mind after building a new backend for our replicated sites. I spotted this on an eBay order confirmation screen this morning: Yes, that’s three different fonts for three different headers… on the same page. The first is [...]
Different tab colors for different contexts
As a web developer, I may have ten tabs open, each of which could be from any of my environments, and each of which may look identical until you click into it to see the actual URL. So I spent a lot of time clicking back and forth between them trying to find the other page I’d been working on, until I found out how to change the tab color based on which domain it was on.
Syncing Stylish userstyles with Dropbox
The one gripe I had with Stylish is that it doesn’t automatically let you sync your styles across computers. But then I came up with the idea of keeping userstyles synced up via Dropbox, and now it works great! I’ll show you how to do it here.
Maximizing font size in FPDF
At work, I use the excellent FPDF library to write PDF files. But I couldn’t find any way to automatically make the text as large as possible to fit into a given space. So I wrote the following function to stick into the FPDF class. It’ll take a given text string and a width, incrementally [...]
My reaction to Google Font Directory: “Meh.”
I’ve been interested in web fonts for a while now, so I was rather excited when the Google Font Directory was released last month. Am I the only one who’s not really impressed with it?
Let Us All Press On
Since I built this web site, I’ve taken it as a source of pride that I created all of the major functionality from scratch: blog, pictures, links, and so forth. I learned that I could do it on my own. But since I’ve started using WordPress in other applications, I knew that I wanted to [...]
CakePHP containable order
I’m developing in CakePHP at work, and I was trying to do a sort on a contained model. As in, for all of the Foos, get all the related Bars, but order the Bars by Bar.publish_date (or whatever). I kept getting conflicting information about whether that was even possible and how to go about [...]