Andrew's Blfog

A while back, Reddit made some controversial changes to their API pricing scheme (going from "free" to "outrageously expensive and clearly meant to just kill competition") resulting in almost all third-party Reddit browsers to have to close up shop. This included Apollo, my personal favorite.

The fallout from this change blew fresh wind into the sails of the maintainers of Lemmy, and brought a surge of users to all federated platforms. (Elon's acquisition of Twitter and subsequent rename to X also had this same effect, but for Mastodon and other micro-blog software). The promise of a decentralized and federated system that otherwise feels the same as the walled garden of Reddit is tantalizing, after all.

"decentralization" and "federation"

I'm not going to waste much time on explaining these - I'm definitely not the right person to explain it correctly so take these definitions with a grain of salt.

Decentralization: where a service isn't hosted by one person or corporation, but instead hosted by many. Torrents, for example, are decentralized.

Read More...

Nginx vs Caddy

I recently migrated my blog from a small server hosted by a friend to a large server with 2TB of space. This was a technical necessity, I assure you.

While doing so, I decided to try migrating everything I ran to use Caddy, a reasonably performant nginx-like webserver written in Go. What do I mean by nginx-like? It's fast and sometimes very cryptic.

I use Caddy on my home network to proxy internal services to be world-accessible. It works pretty well for that! Turns out, probably 99% of what I use nginx for can also be done with Caddy.

Roadblocks

I extensively use Cloudflare as a reverse-proxy and CDN for my services. This is great, but has the downside of obscuring your visitor's IPs unless you take special care to correct it. Cloudflare provides the canonical client IP in the Cf-Connecting-Ip header, and also provides a list of ipv4 and ipv6 addresses that you can trust (their endpoints) - which is fantastic.

Read More...

Javascript generator functions

It has been a while since my last blog post!

I learned recently about generator functions, having successfully avoided them for over a decade. The basic idea in Javascript is that they are a function that returns a special iterable object. Iterable in this case meaning you can loop over it.


function* generatorFunctionOne () {
    yield "a";
    yield "b";
    yield "c";
    yield "d";
}

const g = generatorFunctionOne();

for (const yieldedItem of g) {
    console.log(yieldedItem);
}

/* 
 * Logs, in order:
 * - a
 * - b
 * - c
 * - d
*/

That's a rather contrived example, but more-or-less shows the base concept - each next call (or each iteration) will continue up to the next yield, and whatever that yield is will be provided as the iterable element, and can be repeated ad nauseum via a loop. So, for example, if you wanted to generate n random numbers...

Read More...

Tug Boat: Then vs Now

Tuggathan hasn't changed a bit, personality-wise, but the glow up from kitten to cat is real.

[Image: Tug boat in September of 2021]

[Image: Tug boat in October of 2022, same spot]

They grow up so fast 😿

Read More...

A cool trick I learned when starting work on my blog is that you can do tooltips entirely with CSS and attributes inside your HTML.

For the uninitiated, when I write "tooltip" I mean the little black dialog box that provides additional information about something on hover. For example, the "discord" and "twitter" buttons on this website use tooltips.

[Image: A "tooltip" in action.]

Typically, these are done in Javascript. However, thanks to the CSS attr() function and wide support for psuedo-elements (::before and specifically) you can fairly trivially do it all with clever CSS.

Read More...

Starfox Adventures

Once again, it's been a while, but I've completed yet another game. This time, a game I started over a decade ago and then proceeded to lose interest in after the first 2 areas.

[Image: Oh yeah, there it is...]

Widely lauded as one of the games of all time, Starfox Adventures is a very... "ok"... game.

It's a decent Zelda-like story + linear-ish dungeon game. It's the finished version of "Dinosaur Planet" for the N64, which never saw the light of day- loads of animations came straight from that original game and are very clearly rough around the edges.

The plot

The game starts off with a blue fox named Crystal riding a pterodactyl, shooting fireballs at a giant floating pirate ship being manned by General Scales and crew. No Fox McCloud in sight. After the flying pirate ship bit, you get dumped into a tutorial area that plays more like a Zelda game, with melee combat and puzzles. This tutorial area has a few frustratingly long puzzles that are sure to bore you if you mess up even once (this is a recurring theme through the whole game, super simple puzzles that aren't particularly hard, but if you mess them up you have to sit through the whole thing again).

Then Fox gets a transmission to help Dinosaur Planet, and his segment starts off with the standard Star Fox gameplay, in a spaceship heading through a field of enemies and powerups.

Read More...

Oh snap!

🧄🧄🧄
🧅🧅🧅

My blog is going to smell so nice now :o

     🧄🧅🧈
 \                       /----------------|
  \---------------------/
     🔥🔥🔥🔥🔥🔥🔥🔥
Read More...

Teardown

Teardown recently came out of early access, so it seems like a good time to write a review

[Image: minecwaft with gauns]

Teardown is a semi-sandbox first-person shooter game where you have to complete a variety of tasks in missions with sets of limitations. Most props within a level are destructable, though some may require the use of guns or explosives to break, and you acquire more weapons the more mission "points" you get.

The "hub world" is a building used as your character's home and their company HQ, Lockelle Teardown Services. You get missions via simulated email on the computer within this building, and you can also view the map where missions can be re-played, as well as the tools screen where you can upgrade most of your tools for money, on this computer.

[Image: like thus]

Graphics

Read More...

Good Time

After seeing so many screencaps of the amazing colors within, I caved and watched Good Time, a 2017 crime-thriller movie.

[Image: It's not a very good time (for twilight boy)]

The movie focuses on the misadventures of the main character, Edward Cullen Connie Nikas, played by Batman Robert Pattinson, and his developmentally-delayed brother. In the first act, he take his handicapped brother with him on a bank robbery that ends up going wrong, and for the rest of the movie is trying to find a way to get enough money to bail him out or otherwise free his brother.

He doesn't have a very Good Time.

But enough about sparkle-boy, let's talk details!

Read More...

Grand Theft Auto V

I beat another game! This time, GTA5. The only game that comes close to Skyrim's legacy of being ported to everything.

[Image: THERE IT IS!]

It's a pretty good game.

Graphics

The graphics, especially for the 2013-2015 era, are really nice. They rival games released in the last 2 years.

One nice touch I really like is when you walk into water and your character's model appears wet up to where the water got to. The sunsets in the game are also quite nice on PC.

Overall the game is much more colorful, not just in terms of art direction but also in terms of actual post-processing saturation, than , which had an awful desaturation filter over all of the already quite bland textures.

Read More...

Photoshop in 2021/2022

Adobe not my main ho. That means this shit wasn't sponsored by them. Thanks.

The cost of Photoshop has long been a huge meme, and piracy of the Adobe suite is (and always has been) rampant. After all, do you really expect that 15 year old making graphics for his Minecraft server to have ponied up $700 for the latest Photoshop?

Then along came Creative Cloud. Who would want to pay monthly for Photoshop, when they could pay once and use that version forever?

As with any software, you lose out on new features if you don't update. And you can't update if you don't pay more. With fairly frequent major releases, keeping up-to-date with Photoshop (and other Adobe suite applications) quickly becomes a costly endeavor.

But remember the question I posed 2.5 sentences ago? Who would want to pay monthly for Photoshop? Well, it turns out (as of the time of writing) you can pay $10 per month and get the latest version of Photoshop...

Read More...

This is some wacky stuff, but I needed it for this blog so I didn't have to work super duper hard to reduce the front page size.

Basically, I have images in blog posts, and removing them so you don't have to load 30MB of images when you go to the main page is imperative. I was accomplishing this using an ugly regex, but it was buggy and didn't let me to arbitrary processing on each image node.

So I did what any sane person does, and wrote a processing function to traverse the post DOM. I author all of my posts in markdown and the upside is that it's easy to read the source, and it gets turned into super clean HTML. The blog software does the heavy lifting of normalizing each post into pure HTML for me, and I can run code on the output.

For this, I used the PHP DOMDocument stuff which is horrible, don't get me wrong, but it's significantly better than any other path I found.

Read More...

CSS mask-image Property

I was doing some hacky stuff with a psuedo-element to make posts "fade" into the background, but that had the downside of requiring a solid background color to fade it into, and didn't let you highlight text on the post body when faded.

With the mask-image property, I can cleanly fade out posts on the front page with whatever kind of background I want. To demonstrate, I made the background kinda wacky.

The downside here is that it doesn't work on IE, but since I use CSS vars anyway, I don't really care. IE is dead.

Read More...

I got an email from Steam telling me that ClassiCube is now Steam Deck Verified.

[Image: nice]

That means a human at Valve played ClassiCube on a Steam Deck and checked all the boxes.

I find this interesting because the game doesn't have controller support or anything, but I guess the out-of-box Mouse/Keyboard Steam Input bindings did the trick.

Read More...

Grand Theft Auto IV

Last month I beat GTA 4 for the first time ever.

[Image: NIKO CAUSIN LET US GO BOOOWLING]

In the past (around 2009-2010) I probably played a few hundred hours of GTA 4 with my old Intel Q6600 + ATI Radeon 4550 (Or maybe I had my Nvidia Geforce 8800 GTS at that point) but never completed it. I mostly focused on playing multiplayer with friends, and cheating in singleplayer using a trainer - with my favorite activity being to hop onto a motorcycle and use the trainer I used to push me forward, allowing me to fly pretty freely.

So, basically, the same backstory that I had for GTA:SA and GTA 5 (the latter of which I'm playing right now and will, of course, blog about once I've beaten it...)

All that said, let's get into it.

The Story

GTA 4 puts you in the shoes of Niko Bellic, a serbian guy with a penchant for killing people.

Read More...

Steam Deck

I'm pretty excited for Valve's upcoming Steam Deck hardware.

[Image: The thicc boy itself]

For those not in-the-know, the Steam Deck is a handheld PC designed and (soon) sold by Valve/Steam. More info here.

On paper, the hardware itself is cool but not anything too exotic - we already have handheld PCs that can run Windows, and they have pretty decent specs usually.

What sets the Steam Deck apart is a short set of very compelling features

Read More...

Lilo And Stitch

[Image: the titular characters]

I re-watched Lilo and Stitch. It's aged pretty well, there's a lot of little moments that are even better as an adult.

That's all.

I rate it 2.76 out of 2.995.

Read More...

Version control is a rare tool that I would say is absolutely required, even if you are only using it as a solo developer. Some people say that it's a tool that you live and die by, I agree with that assertion.

~ Robert Venables, September 2009

Version Control is a dummy useful class of software that has helped me out countless times. Atlassian has a pretty good overview of what it is and how it generally works.

For the uninitiated, it's basically where you use a software to semi-manually keep track of changes you make to code, text, or anything really. It will see that a file has changed, you type in a comment to help you remember what you changed, then you save it to a "repository" where you can recall every single change you've recorded. Usually, this repository will be hosted on a server, like or or whatever, but it's not a hard requirement.

Read More...

Finding Large Files (on Linux)

If you've ever needed to figure out what files are taking up all the space on your Linux system, you can use this snippet to do so!

sudo find / -type f -printf "%s\t%p\n" 2>/dev/null | sort -nr | head -n 20

This lists the 20 largest files on your system. You can increase the 20 at the end to increase the amount of results.

For a (probably) more useful view, you'd probably want to use something akin to WinDirStat. My utility of choice is WizTree which is SUPER fast because it will scan the file table instead of asking the OS to tell it what's in a directory and recursing. The results are clear, though you do miss out on this extreme speed when using it on a non-NTFS drive.

Read More...

I am a huge fan of the original Xbox; the controller design, console design, and games are, IMO, some of the best of all time. The Halo series (not counting Marathon) started here, the best versions of many cross-platform releases were released on the objectively faster Xbox hardware, and it was the only console of its generation to actually contain a hard drive.

But it's not without its flaws. Inside every Xbox (even, to an extent, the 1.6 revision) are three ticking timebombs:

  1. The hard drive. All of them are past their manufacturer's suggested lifespan.
  2. The disc drive. The belts and plastic gears are wearing out and breaking, and the lasers are getting weaker every time they're used.
  3. The clock capacitor. This one is a killer - it's a capacitor that's placed near vital traces on the motherboard, it is guaranteed to leak (even the 1.6's eventually) because it's a cheap electrolytic cap, and the effects are catastrophic.

The clock capacitor

The clock capacitor is easy enough to fix. On all revisions except 1.6, you can simply (carefully) snap it off the board. Its only purpose is to keep time . Use gloves when removing it or handling it, as the acid it leaks is pretty aggressive on human skin.

Read More...

Tony Hawk's Underground (1 and 2)

I played through Tony Hawk's Underground 1 and 2 on the original Xbox, so here's some words:

THUG 1

This game follows you and Eric Sparrow, two friends who skateboard from Jersey, as you both try to go pro. There's some plot twists and turns where Eric betrays you, but overall the plot definitely just exists to get you from level to level and to naturally unlock parts of levels as you progress. It's a good system! The cutscenes have some funny dialogue, really good animations, and pretty good voice acting that makes watching them a pleasant experience.

Very nice graphics for the time, runs at 720p on the OG Xbox which looks pretty good! Almost always a solid 60fps except when there's particle effects taking up most of the screen.

Controls pretty well, althought wallplanting is significantly harder to do in-the-moment than sticker slaps from THUG 2, so I found myself failing some combos due to hitting a wall.

I really enjoyed the story, though the last mission where you have to ride Eric's line is disproportionately harder than all the other missions before it. But I definitely felt compelled to actually complete the story.

The locations, while they mostly felt same-y, were all great, pretty large, and had plenty of secrets to find. Looks like each level has at least a secret tape, and possibly an unlock for a retro level from previous games (though I'm bad at video game and only found 1)

One oddity is that there's a pretty decent amount of "driving" you have to do in the story. I found it a little clunky for a game about skateboarding, but it's limited to like one forced segment per level, so it's not annoying.

Read More...

Neat New Tags

I added a nifty little style to the tags on every post. Now they're all cool looking.

I did this with a little bit of CSS wizardry. Here's how you can achieve the same results!

The theory of this trick is to use a psuedo-element, fit it to the tag element's size, style the psuedo-element instead of the tag itself, and drop it behind the tag.

Assuming the tags have a class of "articleTag"...

.articleTag {
  position:relative;
  color:#000;
}

.articleTag::before {
  content: '';
  position:absolute;
  background:#f00;
  z-index:-1;
  top:0;
  right:0;
  bottom:0;
  left:0;
  transform:skew(25deg);
}
Read More...

Jade Empire

After 15 years (since I last played the game), I've finally completed Jade Empire.

[Image: Xbox "limited" edition]

The game drops you into a "mythologic chinese" setting, where chi is a real force and spirits and gods directly affect the world. It's made by Bioware, known for creating the Mass Effect games. Just like Mass Effect (and KOTOR), Jade Empire features a good/evil choice system.

That said, it doesn't have a whole lot of meaning on the overall story of the game, with most of the "evil" choices having the same result as the good choices, just with extra bonuses like more money given or slightly faster route through a mission. In fact, I'm pretty sure the final good/evil choice can be made regardless of your alignment.

Difficulty

The difficulty curve is pretty fair through the entire game, with fairly rewarding combat. There are two points in the game that I believe are unfairly difficult, especially compared to the fights directly leading up to them:

Read More...

I dug out my original Xbox, and realized that many of my games lacked cases. While I didn't have any spare full-size Xbox-style cases handy, and my local game store doesn't yet have a shipment of Xbox-like cases in, I do have a lot of cheap jewel cases. A ton with front artwork spots, so that was the main focus, but also some with a spot for rear artwork.

So I created a Photoshop template to help make it all consistent. The end result...

[Image: The front cover for Republic Commando] [Image: ...and the back!]

The templates include all of the ESRB ratings already in the correct spot, so you can just show/hide the layer for the rating you want.

The fit of the back template is snug, some trimming may be required. It ends up looking a little something like this:

Read More...

Panic! At The PetCo

This is the story of a young kitty cat who scared his owners into thinking something was seriously wrong, when in reality he was just being a drama queen.

[Image: Panic! At The PetCo - coming soon to Apple Music and Google Play]

December 26th, 2021

We arrive home and begin re-arranging the furniture in the house. Tug Boat does not seem to mind.

December 27th, 2021

In the evening, Tug Boat begins vomiting up bile. Large pools of bile. Things do not look good, but we wait to worry because he is still eating and drinking - it's possibly just stress from all the re-arranging we did. We leave him be.

December 28th, 2021

Read More...

NPM sucks

I always find frontend devs way of thinking to optimization interesting. Shaving few KBs of JavaScript but load dozens of MBs images. Then talking about avoiding dependencies but using node packages that indirectly pull in hundreds of other dependencies. Loading scripts from dozens of HTTP connections, etc.

~ some guy on the internet, July 2020

having to wrangle npm is a nightmare of dependencies that is never-ending with some packages.

it's ridiculously easy to upload npm packages, which leads to people creating dependencies for things like checking if a number is odd. Compartmentalizing things into reusable bits isn't really all that bad, but for some reason npm takes it to the extreme.

Read More...

Grand Theft Auto: San Andreas

I just beat San Andreas for the first time in my life

[Image: ]

I don't know why I never beat it before. I played probably hundreds of hours of it just mucking around when I was younger, and I wasn't far from the end of the game it turns out.

It's really quite a short game. I'm working on GTA 4 right now and I've put a lot more time into it so far than I had doing missions in San Andreas - it's a little surprising.

Also, the latest PC versions of San Andreas are pretty buggy and suboptimal, so I downgraded to 1.0 and applied a bunch of mods that fix various issues that aren't present in the PS2 version.

All in all I rate it a 9/10, the crack fortress sequence was hilarious and the writing was pretty good throughout.

Read More...

The Matrix: Resurrections

I watched the new Matrix movie. I heard a lot about the cgi and plot being bad, but I thought it was alright. Maybe people are just trying to get worked up over nothing.

[Image: woah, I'm Keanu Reeves]

My favorite part was when all the people started jumping through their windows and divebombing the ground towards the end. It's so visceral, it's a nice touch.

I disliked the exposition dumps that take place throughout the movie, but I dislike that of any movie, so it's no big surprise.

Overall I rate this movie 8 big bananas out of 11. Pretty good!

Read More...

You Don't Need 45KB of Tracking Code

Web Analytics are helpful, but not helpful enough for me to warrant quadrupling my blog's bandwidth costs.

I like having a general idea of how people are interacting with my sites, and how many people see them. Until I made this blog (and had a slight focus on low page size), I didn't really care to check how bulky Google Analytics was. Now I know.

Adding GA to a website will cost you around 45KB of network bandwidth if you use the recommended Google Tag Manager way.

On the extreme other end of the spectrum, Plausible Analytics weighs in at under 1KB, and offers a lot (most?) of the same information, with slight stat skewing; allegedly Plausible reports slightly higher (15%-ish) unique viewers, probably because it's a little more privacy-oriented and not nearly as aggressive in its session/user tracking.

Plasubile sounds great, but I'm garbage at using Docker and didn't want to pay for the SaaS version, so I installed Umami, which is almost as lightweight (I think the analytics script ends up being around 2KB) and can use MySQL. The rest of those analytics softwares seem to use Postgres, which I don't have installed and configured (and didn't feel like doing so)

Read More...

Back up your shit!

It's really important to back your files up. Most people don't think about it that much, but it really matters. On top of that, backups must be partially recoverable. A backup is of no use if you have to load the entire (possibly massive) backup onto existing hardware just to pull one file out.

It's almost kicked me in the butt several times that I hadn't backed up my data reliably. ClassiCube probably wouldn't still be around (at least not in the same capacity as it is now) if I didn't get lucky with a backup made shortly before a huge unrecoverable disk failure.

At home, I have a NAS with a nice chunky hard drive that runs a python script every night at 11pm, which rsync's data from all of my linux servers on the internet. It's really helpful for me, so maybe you'll find it useful too:

import os,sys
os.chdir(os.path.dirname(sys.argv[0]))

DEBUG_RUN = False

BACKUP = {
    "example_name": {
        "host": "root@192.168.0.44", # must be reachable with current server's ssh key
        "source": [
            "/etc/nginx", # nginx configs
            "/etc/mysql", # mariadb configs
            "/var/lib/mysql", # mysql data (won't be perfect but should be recoverable)
            "/home" # home directory (why not?)
        ]
    },
}

def main():
    for server in BACKUP:
        s = BACKUP[server]
        save_dir = server
        args = ['rsync', '-trvz', '--links']
        if DEBUG_RUN:
            args.append("--dry-run")
        if type(s['source']) is str:
            sources = [s['source']]
        else:
            sources = s['source']

        for source in sources:
            if source.startswith('/'):
                source = source[1:]

            levels = source.split('/')

            if levels > 1:
                curlvl = ''
                for level in levels[:-1]:
                    curlvl = "{}{}".format(curlvl,level)
                    args.append('--include="{}"'.format(curlvl))
                    curlvl = "{}/".format(curlvl)

            if not source.endswith('/'):
                source = '{}/'.format(source)

            source = '{}***'.format(source)
            args.append('--include="{}"'.format(source))

        args.append('--exclude="***"')
        args.append('-e')
        args.append('"ssh"')
        args.append("{}:/".format(s['host']))
        args.append("share/backups/{}".format(server))

        run(args)

    run(['chmod', '777', 'share/backups/', '-R']) # clobber the permissions so I can view them on smb

def run(args):
    print(" ".join(args))
    su = os.system(" ".join(args))

if __name__ == '__main__':
    main()

Thanks to this, I rest easy knowing that my data is at least somewhat safe

what if I have a housefire or the drives in my NAS die?

I haven't gotten that far ahead yet - recurring payment solutions for more than random bits haven't really been in my budget until the last year, so I've just barely scratched the surface of the research I need to do.

Read More...

Tug Boat and Biscuits

I got some kitties a while back, rescued them from the beach. Now they're everybody's favorite mascots.

[Image: Biscuits on the left, Tug Boat on the right]

Their names are Chef Biscuits and Tuggathan Boatthew.

They hate their lives and are very neglected. See proof below.

[Image: tug boat being seriously blurry] [Image: lounging around]

Read More...

Discord Sucks for Information Sharing

Long ago, people used these things called "forums" (or "bulletin boards") to speak to other people online, in a way that was publicly accessible and crawlable in most cases.

That was great, it was the golden age of information sharing. It allowed search engines such as Google to not only rise to glory, but also to help people find the information they need. So much information was just out in the open for search engines to crawl, and then subsequently viewed without the need for a third-party application.

This also meant that searching that information could be performed by more than just the search functionality built-in; Say there's a certain search engine that is able to search Russian language in a more natural way, but the search function built-into the site is more oriented towards the English grammatical structure- no problem! just use that other search engine.

Now we have Discord, a chat application being used in place of forums almost entirely in many cases. Sure, it's convenient and the features between "servers" (really more akin to guilds, as they're called in the backend) are consistent-ish, but it's got a lot of serious problems.

ok boomer

What problems does Discord have, exactly?

Read More...

big stupid test

I made a discord notification plugin for this thing and this is a post designed to test if it works.

what do you mean

cheese isn't

a food group

anymore

Read More...

The Fastest Website in the West

Have you ever wanted to make a super fast website, that can download and execute faster than a neuron in your brain can fire? Have you ever wanted to brag to your friends about how your website, on a fresh load, only downloads 12KB of data?

You're in luck. Here are my top 3 ways to not make a bloated crap website.

Be willing to be inflexible; skip the frameworks (if you can)

It sure is nice to have bootstrap included for everything, but unless you're making something complex, it's really not worth including at all. In this case, I've made a customized bootstrap grid + reboot css file that only contains what I think I'll need, and has everything I'll never use stripped out completely.

Frameworks are a massive help, especially when you're newer to the web. If you don't have a clear vision for what you're designing, or want the flexibility a framework gives you, there's no harm in doing what makes sense.

That's not the point of this post though.

Don't use big ol' javascript libraries

Read More...

enter: bludit

In the ever-increasing urge to become a blogging mother, finding a blog software that does what you want while not being too bloated can be an insurmountable task.

For example, if you want to use Wordpress, you have to choose between hosting it yourself (much more control over it, but requires you to have some knowledge of installing web software and requires that you have hosting already) or using wordpress's managed hosting @ https://wordpress.com/ .

Then, once you have figured out how to get a blog set up, you have to deal with the fact that there's only a handful of good themes, and that your blog will look the same as everybody else's that uses that theme, and that it's pretty difficult to modify the themes in any meaningful way.

To make matters worse, theming is much harder in Wordpress because of how complex and old it is. Sure, it's got pretty good documentation - but who wants to spend 10-20 extra hours implementing a design into a wordpress theme?

The second best alternative seems to be static site generators - they are usually super simple to theme, but they have the limitation that you can't usually author their content on the web in an accessible way, and there's absolutely no true dynamic content you can put on it (eg a proper search, though you should probably defer to google anyway for that).

Read More...