PHP script to add WordPress admin user

I recently needed to add a new administrator username to a Wordpress install.

Doing this manually via SQL is not the most difficult task in the world, but it can be quite a challenge as it requires special access (either to mysqladmin or something like phpMyAdmin) and SQL knowledge.

Plus there’s a always room for error when messing around with SQL data.

Prevent SSH from disconnecting idle sessions

If you leave PuTTY connected for long periods of time on tail -f /some/log/file you may have noticed the SSH server disconnects you after a while if there is no new input on that log file.

You could configure PuTTY to enable connection keepalive functionality, but you’d need to either do that for every session or every saved server in the list. The easier way is to enable this functionality on the servers themselves…

Configure Munin to graph MySQL on CentOS 5/6 with Virtualmin

If you’re running a CentOS 5/6 VPS/Server with Virtualmin and installed Munin to graph the system stats, you’ll mostly likely notice that the generated graphs do not include MySQL.

This is expected behaviour since Virtualmin asks you to define a root password for your MySQL server (so it isn’t left unsecured out in the open), while Munin tries to read MySQL data using the root account and no password and fails.

But there’s an easy way to fix this…

Language matters: Defeating copyright monopoly “newspeak”

One central theme to the “1984” book by George Orwell is Newspeak – a simple concept. By taking away the expressions for free thinking and challenging authority from the language, those in power would remove the crowd’s ability to conceptualize those thoughts, and thus ensure obedience.

Every time you repeat a term of the adversary’s worldview, you help them take away your rights. Every time you use one of the terms that define our worldview, you help the net generation retain their civil liberties.

Mod osTicket 1.7 to accept HTML in tickets

After updating osTicket to its latest stable release, I had to redo the mod to make it accept HTML messages (too bad this hasn’t already been added, at least as an option, to the core).

After digging around quite a bit around the completely re-arranged codebase, I eventually found that it’s actually even simpler than in 1.6.

We need to change one line in include/class.thread.php…

Service management on the PI – chkconfig equivalent for Debian

Using the Debian based Rasbian (on my Raspberry PI), I recently need to turn some services off and then others on for startup. I knew how to do this on Redhat based distributions, but Debian does things differently.

Instead of chkconfig, Debian provides the update-rc.d utility to turn services on/off at specific runlevels…