I’ve used Firefox’s Stylish plugin for years to get rid of stuff that I don’t want to see on all kinds of web sites. Once you know how CSS works, the plugin makes it easy to tweak the look of any page by adding a quick {width:100%;} or {display:none;} to your own personalized CSS userstyle for each site. Read the rest of this entry »
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 set the font size higher and higher until it over-runs the space, then gives you the right size to just fit into the width. Read the rest of this entry »
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? Read the rest of this entry »
Last week, we were content with the two cars we had, planning to put all three of our kids in the back of Sarah’s Matrix when the baby was born. We knew we liked Toyota Siennas in general, since Sarah’s mom has one that we’ve driven around a lot, and they’re the most popular minivan among all our soccer-mom friends. But Sarah was afraid that the Sienna was too big — so she wanted to check out the Mazda MPV, which was smaller than most minivans and she’d read good reviews about it. So we thought that the MPV might be a minivan that we’d consider purchasing down the road, but we had decided that we could wait. Read the rest of this entry »
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 use it for my blog here too. Read the rest of this entry »
This week we rented the fun “The Simpsons Game” for the Wii. (I say “we”, but really I rented it. Sarah never had anything to do with this one, either in the renting or the playing.)
You get to play with the four main Simpsons family members, who each have their own fun special super-hero abilities: Bart becomes Bart-Man with a grappling hook, glider cape and slingshot; Lisa has mystical Buddhist powers that include levitating large objects and striking enemies down with lightning; Homer can turn into a ball and roll around slamming into stuff; and Marge has a megaphone with the ability to make ordinary citizens become her very own mob, ready to do her bidding. Read the rest of this entry »
Our Wii game this month was Marble Saga Kororinpa, which Sarah thought would be an interesting puzzle game. The gameplay is like one of those old wooden games where you’re trying to get a marble to a specific point without letting it fall into the holes along the way. Here, you’re trying to guide your ball through the course, collecting gems without falling off the edge.
We got it home and played for a while with the Wii Balance Board, which was a nice little addition. Sarah would finish a course, then I’d try to do the same one in a better time than she did, and vice versa. (This was the only pseudo-multiplayer action we found, even though the game claims that you can “Play with three other people on the same map as you race to the finish line”.) Read the rest of this entry »
Our game rental this month was Toy Story Mania! — a carnival-derived bunch of mini-games where you throw darts, shoot wooden animals, and roll marbles along with Woody, Buzz and other fun Toy Story characters.
The kids liked watching me play, and Audrey was even able to do some of the games in multi-player mode. High scores give you tickets, which you use to purchase new games to play. My first run-through the game seemed rather repetitive and took less than an hour, but then I realized that there were more mini-games to unlock and have fun with. Read the rest of this entry »
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 it. I also got the following error several times: Model “Foo” is not associated with model “order” — it thought I was trying to sub-contain “order” into Foo->Bar. I eventually figured out that I had one too many parenthesis on the contain conditions (i.e. which Bars to get). This is what I ended up with that worked correctly.
$this->Foo->contain(array(
'Bar' => array(
'conditions' => 'Bar.publish_date <= "'.date("Y-m-d H:i:s",time()).'"', // only get the bars that have been published
'order' => 'Bar.publish_date asc' // sort bars by pubdate
),
));
$foo = $this->Foo->findbyId($foo_id); // or whatever other kind of find you need
Hope this helps someone in the future!
In my almost-30 years on this planet, my father has worked for two companies: Browning Arms all while I was growing up, then the LDS Church since about the time I went on my mission. I’d call that a commendable track record, especially in today’s labor marketplace.
I mention this because, this morning, I am about to start a job with my fourth company since Audrey was born four years ago. (Heck, since Nathan was born two years ago!) Read the rest of this entry »