Posts

Pleroma for Dummies

With the recent surge in popularity of Twitter alternatives, I found myself giving Mastodon a shot -- I'm hardly at risk of being censored on Twitter, but I fancied a place that didn't fuck with my timeline.

In doing so, I discovered that Mastodon is simply one facet of a greater Fediverse -- and while it seems to be one of the more polished facets, there's an awful lot of mastotooting going on (Mastotooting; verb: to post ("toot") about how great the Mastodon social network is, from inside the Mastodon network itself) and, according to some technically-minded souls, not the most efficient facet. (And if you want to get into community politics, some criticize the lead developer's approach, that he just wants to be @jack 2.0.)

And so, I was introduced exposed to Pleroma. Like Mastodon, it integrates with the Fediverse, but unlike Mastodon, it consumes a lot less resources and is generally more suited to running on a smaller private server for one person who li…

Fun with Database / Wordpress Migrations

There's websites that like to be moved, and then there's Wordpress. Wordpress both does, and does not like being moved.

While you can transplant it to a new hosting platform, and put it in the same folder so it would be visible at the same place, the data may not migrate so easily. The guts of Wordpress is the database, which is not in the web files themselves.

If you're exporting and re-importing manually, you might run into errors when importing on the new platform; one of them is below.

If you are trying to import a database and getting an error like “#1273 - Unknown collation: 'utf8mb4_unicode_520_ci'”, this may be related to trying to import from a system running MySQL v5.6+, and your new platform uses a version of MySQL less than v5.6.

You could upgrade the server to MySQL v5.6, but if Mohammad can't go to that particular mountain, then we'll bring the mountain to Mohammad, and convert the database.



First, please try exporting the database from the cu…

"I DON'T KNOW YOU": A Windows 10 tale

So, in the name of vanity, I did something rather dumb.

I changed my Windows 10 account's username.

Not just changing the user's name -- that's cosmetic. I mean, I fully changed the actual username; the goal was to change my root folder path, but as it turned out, this did not work as expected, and all I did was break my Windows 10 login.


I started by running the command netplwiz. This let me get my grubby little mitts on my own user account, for which I edited the properties and promptly changed, swapping the username (Which is ancient, from when I first built the computer and went by a different handle on the internet) to a more current one. I saved it, and thought nothing of it.

Start Menu then did not work; I tried opening my account settings, and it locked up. I thought a reboot would fix the problem.

It made it worse -- Windows 10 home edition tries to sign you in with the last username you used. Which was my old username. So no matter how hard I tried, my password w…

Rolling Health Meter

Something I struggled to find on the internet was a decent working example of a rolling health meter, a'la Earthbound.

For those not familiar, you have a HP value, and when you take damage, it isn't applied automatically -- instead, your HP instead ticks down to that value, like an odometer in a car. In Earthbound, this is not just a cosmetic effect, and as long as your HP is still ticking down, you're not dead yet, which then leads to other clever mechanics not usually seen in RPGs.

What I had trouble finding was how to a) reduce and b) display the "rolling" effect -- what examples I found were cheap, and simply reduced HP by a fixed amount until the target HP was hit. What I wanted was one where the meter is quicker the more health you're gaining / losing, and slows to a crawl when nearing it's target.

I figured it out, so here it is. It was done in Gamemaker's GML, but should translate relatively well to other languages.


Calculating the numbers was…

Gamemaker: Quirks

In working with Gamemaker Studio, while it's built-in language, GML, is very much like C# with training wheels on, it just does some things differently from other programming languages.


An obvious example is that it doesn't need type declarations, and couldn't give less of a shit about line endings. The following would be required in C# and most programming languages:

string name = "Joel";
int age = 32;

In GML, you can get away with:

name = "Joel"
age = 32

While this is great and makes things quicker, it does kind of foster bad habits.


A less obvious example is that Gamemaker Studio treats strings as non-0 indexed char arrays, which is surprising in itself, but also that index 0 will return the data for index 1, rather than an error.

This was an infuriating quirk that messed with a text rendering script for like, ages. If I had the string "Peter Piper Picks Peppers" and tried to copy it out one character at a time from index 0, I'd get:

PP…

PowerDVD

Gods, I hate PowerDVD. It's best summarized as "Hot garbage that someone was paid to make", and it is quite literally one of the worst media playback programs I've ever had to use. I think I'd have to deliberately hunt for a broken media player to find worse.

But if I want to play Blu-Ray DVDs, it's one of the only options I've got, as it's sadly one of the few programs capable of doing so, due to security encryption and such, and it's either use Powershite, or swap disks in my PS4 all the time.

But I digress.


The problem is that once installed in Windows 10, no matter what defaults I set or how I set up auto-play, double-clicking the icon for a DVD just opens it in PowerDVD.

The solution was in a forum thread; the subject of editing registry keys to remove references to PowerDVD was mentioned.

A Cyberlink rep in the thread said to remove:


HKEY_CURRENT_USER\\Software\\Classes\\SystemFileAssociations\\Audio\\Shell\\PowerDVD13CommandVerb
HKEY_CURRE…

Fun with OTRS: Generic Agent

We use OTRS in a professional capacity, and over time, the database of tickets has gotten rather unruly.
To reduce this, we'd have to a) corral "junk" tickets better, and b) remove them from the database more permanently.
Both can be achieved with the "Generic Agent" in OTRS. As a test, I was hunting for bounce-back notices that were older than 30 days so they could be moved to a spam queue and safely deleted there.

To delete tickets permanently, the solution was easily found; under "Execute Ticket Commands" in the Generic Agent, "Delete Tickets" can be enabled, which will drop all affected tickets from the database.
For safety's sake, I configured a Generic Agent that only targeted tickets in the spam queue older than 30 days.

Targeting the correct tickets was a little harder, and searching on google yielded no swift results as apparently I was the only person who would dare try to do such a thing.
I could find tickets older than 30 day…