Posts Tagged PHP

Posted on Programming

The Family Wishlist is finally mobile friendly

Ten years ago today (plus or minus two to five years) I made The Family Wishlist. And it’s been good. People have found it helpful.

But The Family Wishlist had a problem, one that I hoped – as all problems do – would go away if I ignored it long enough. Much to my surprise, it got worse. Worse and worse.

Or, if not worse, than at least less forgiveable.

The Family Wishlist, you see, wasn’t mobile friendly. Like, at all. But come on guys, it was 2008. Did smart phones even exist then?
It’s impossible to say. But what I can tell you is they exist now; moreover, people use them. Constantly and for everything.

So, after putting it off for ten years – through the power of procrastination – I finally did it. Or, redid it, as it were. I’ve rewritten it entirely, using my API framework (lull7) for the back-end, and react for the front-.

Also, no more ads. Who wants to see those, right? Especially on a phone, where space is minimal.

So if you and your family need to coordinate gifts this season (or any season), give it a try! I don’t know, maybe you’re running a Secret Santa or some such. It does that too. Also, family isn’t mandatory – orphans are welcome. »

Thanks Greg, it truly did need an update.

Oh, also, I switched the email system over to SES so they should now arrive more reliably.

The Family Wishlist, 2018

The Family Wishlist
Posted on Programming

Duplicate emails, chrome, and favicons

Switching away from Mandrill, I found Amazon SES was sending two emails from my PHP test script. This only happened when hit from the web, running the same script through the PHP-CLI sent one email, as expected.

Looking at Chromes network tab, turns out it was loading the script as well as favicon.ico. Alas, there was no favicon.ico, and in the sites-enabled config for that location the FallbackResource was set to /index.php. Turns out it was loading index.php twice, resulting in two emails.

I used Bradicon! to create a quick favicon, uploaded it, and bam!, just one email from then on.


Posted on Programming

Pulling data from Google Calendar

I track my hours on Google calendar. I know, high-tech, right?

Like a savage, at the end of every month I’d count up the hours for billing — but no more! That’s for the machines.

If getting a list of events from Google’s Calendar API between a specified date range seems useful to you — well, here, have some code:

Posted on Programming

A heavy swell in disk use

You shut the door behind you, hang your keys on the wall, and expertly slip out of your shoes. You’re home, the birthday party is over, and what else is there to do but check the status of your servers.

Oh, no, disaster has struck.

df -m reports your disk usage is at 100%. You feel the wave break over you as panic settles in.

But how?

Posted on Programming

Handling every PHP error

Or, gotta catch ’em all.

Okay, I’m just going to throw this out there: You can’t reasonably account for every possible error. That’s just unrealistic. However, you can sure make a catch-all to alert you of any you haven’t foreseen, and then, you know, update your code to handle those conditions at your leisure.