Simon Morgan

I Conjure the Spirit of the Computer with My Spells

ASUS RT-N66U IPv6

I’m using an ASUS RT-N66U and my ISP is Aquiss (an Entanet reseller). I wanted to get IPv6 working. After a little bit of fiddling, the following seeings seem to have done the trick: Connection type: Native Interface: PPP DHCP-PD: Enable Auto Configuration Setting: Stateless Connect to DNS Server automatically: Enable Enable Router Advertisement: Enable Hope this helps anybody else in the same situation.

WHMCS Smarty {include} Not Working

I’ve been using Smarty templates a bit recently while working with WHMCS and ran into an issue. When trying to do {include 'some_template.tpl'}, I was getting no output. Smarty seemed to just stop all processing at that point. The fix was maddeningly simple, especially as I’d tried a bunch of different variations of absolute and relative paths. If your template is in a file called some_template.tpl, you need to use:

WHMCS 500 Error

While working on an addon module for WHMCS I kept getting a generic 500 error code and a blank page. I was pretty sure it was a problem in my code but there was nothing in the XAMPP error.log or the WHMCS admin dashboards so I had no way of tracking down the cause. I managed to finally track down the cause by enabling the Display Errors option under Setup → General Settings → Other.

OAuth for the Confused

While working on some code recently I ended up learning far more about OAuth than I ever wanted to know and so I thought I’d share my pain with the Internet. This guide will cover OAuth 1.0a as that’s what I’ve been working with. OAuth is an open standard for access delegation, commonly used as a way for Internet users to grant websites or applications access to their information on other websites but without giving them the passwords.

JavaScript Prototypes for the Confused

Objects can have a prototype and a prototype is just another object. We can get an object’s prototype using the Object.getPrototypeOf method. Object.getPrototypeOf({}); // → {} Yes, JavaScript really loves objects. It’s objects all the way down. Actually that’s not completely true: Object.getPrototypeOf(Object.getPrototypeOf({})); // → null The first call to Object.getPrototypeOf gave us the prototypical object—the one that acts as the prototype for practically all objects—and calling Object.