Kartones Blog

Be the change you want to see in this world

My Favourite Firefox, Chrome and VSCode Extensions

I sometimes forget that, in most blog engines or at least on the one powering this site (pelican), exists the concept of page and post, where a post appears on the homepage (sorted by newer publish date) and in the RSS feed, but a page doesn't (simply exists at a given URL). It is a nice distinction that allows me to maintain atemporal content that I often maintain from time to time, but discoverability is not perfect (again, at least via this blog engine). What I maintain as pages are either special lists, gathered at the Archives section, or certain special sections like the Contact link at the footer of the site.

What I really meant to say with the previous paragraph is that I forgot to write a post mentioning that I actively maintain pages with lists of my favourite extensions for web browsers and tools:

  • Firefox add-ons/extensions: I use FFox for personal browsing, so extensions are mostly focused on privacy.
  • Chromium/Edge extensions: I use Chromium-based browsers for work and hobby development, but also like to try disabling javascript, blocking content and the like.
  • Visual Studio Code extensions: My all-the-things-IDE for the last years. I use it both for work and personal stuff, and decided to not remove old extensions I no longer use (like the Java Pack, or VS Live Share), so it is rich and varied in content 😄. I also have an almost "copy+paste ready" dump of my settings.json to not have to be doing online syncs. Oh, and tiny hints, and my preferred themes for day and night development... Varied things, as anyone can see 😉

So here it is, a post mentioning some the existing pages that I probably hadn't explicitly mentioned before. I plan to add a few more pages soon (at least one or two related with operating systems), so from now on I will make sure to always write a companion post "announcing" them.


Vampire Survivors Cheats

I am enjoying so much the now very popular indie game Vampire Survivors that on each new patch released I hurry to check all the new content. Today, after finishing unlocking all characters and items, and obtaining all current achievements, I decided to try to kill the grim reaper.

Why? Because in one of my early runs in the library level, reaching the 30 min mark Death appeared, but got stuck in a scenery library block. Around 90 seconds later another Death came (also got stuck), and another 90 more seconds past a third one came from a different direction and finally killed me. In the process, I noticed that I was damaging them, so I thought that somehow, should be possible to kill him/they.

After many failed attempts and different strategies tested, I decided to go the game hacking way, and along the way found two other small easter eggs.

UPDATE: Savegame editor (changes coins)

I created a small proof of concept of a savegame editor for the game. You need to deactivate Cloud saving before copying the contents of the .sav file and then reactivate, but it worked for me using Linux. It sets your coints to 300000 and adds that amount to the total coins "ever had", so if you don't see updated the available coins value, try reseting your power-ups and you should see the total amount increased by +300000 coins.

Using the Konami Code

In the main menu, type using the keyboard (directions meaning the corresponding cursor keys): up, up, down, down, left, right, left, right, ESC, ENTER.

You will receive a small amount of gold, and unlock the skeleton character if you didn't already had unlocked him.

Unlocking Exdash

In the main menu, type: x-x1viiq

And you will unlock a secret extra character.

Unlocking Red Death

I had read that the game is a Javascript application bundled with Electron (and using the great Phaser game framework), but the Webpack bundles are not inside the binaries, so checking and modifying the contents is quite easy.

First, navigate to your Steam folder, and inside to steamapps/common/Vampire Survivors/resources/app/.webpack/renderer. Once there, open the file main.bundle.js. I use Visual Studio Code and then right click -> "Format Document" because the file is minimized and otherwise quite hard to manipulate.

Now, search for XLReaper_0 (make sure that has nearby the line textureName: "enemies"). You should find 4 occurrences, so for each one change the following values to 0x1: level, maxHp, speed, power. This will make Death (and its "siblings") die instantly whenever appears and comes near you.

Finally, save the file (you can save it "formatted" to ease future editions, anyway any new patch will override it).

Now you're ready to open the game, do a normal playthrough and reach any level "end". Once Death appears and you kill it nothing will happen, you'll be left alone in the level, so just bring the menu and "Quit". You will now have it available to purchase for a small amount in the character selection screen.

Vampire Survivors Red Death character

PS: After my game editing session, I learned you can also glitch-kill it, but looks harder to accomplish.


Multi-Language Wordle clone fork

I don't touch much React code at work, but I feel I should have a minimal proficiency. While I've read some articles and watched a course about it, in the end nothing beats practice by trying.

In the near future, I plan to do a small personal project built from scratch, although I might go with Preact instead of React.But more recently, a colleague built a Swedish Wordle clone, appropriately called Swordle, and I decided to practice a bit by forking it and making it multi-language.

I won't dig into the details of the changes I implemented, they're really not much.

What I'll show is a small screenshot of how it looks with different languages:

Swordle fork screenshot

I added Spanish, British English and American English, switchable via the header flags. The game state and guesses are also now separated by language so you can actually play one word per language per day, although both English word dictionaries are very very similar.

If you're interested, my fork lives at github.com/kartones-forks/swordle.


Learning the basics of Memcached

Quick post to write down some resources to learn a bit about Memcached. I've used it from time to time but never got into learning how it works under the hood (at least an overall view).

Useful links

The protocol description is the first and foremost resource you should read. To complement it, I highly encourage reading also LZone's Memcached Cheat Sheet.

Regarding how to scale it, Skyscanner post regarding scaling was a simple but good introduction, also useful to learn about consistent hashing.

Journey to the centre of Memcached summarizes how the slabs, pages, chunks, and items work. It also helps you to begin using the stats command and interpreting the data it returns.

Oracle's page about memcached general statistics also has some useful tidbits.

Memcached Command-Line Options Explains precisely that, the CLI options just in case you can/need to tweak them.

Memcached Exporter for Prometheus is quite self-descriptive, a way to obtain all metrics from the stats command for consumption by Prometheus.

And finally, regarding tooling I'm still checking what's out there, so don't have much to mention. The default memcached-tool script is useful, but I like the efficiency metrics that memcached-tool-ng provides.

Side-Notes

  • Docker's official memcached container doesn't contains any configuration file (runs with all the defaults), don't search for one.
  • maximum connections (-c) controls the bandwidth, meanwhile backlog queue limit (-b) is a single queue for that bandwidth that allows to not have client connection errors when the connections limit is reached.
  • evictions are bad; expirations, reclaims, etc. are fine.

Course Review: Learning Kubernetes (LinkedIn Learning)

Review

Continuing with my broadening of topics, now it's time to learn some Kubernetes basics, to at least know what it is capable of, so I picked up Learning Kubernetes, a 2.5 hours Linkedin Learning course that looked nice. Touching topics from building blocks to deployments, jobs, services, labels, data management and logging, while not in depth, it is a good overview, with many hands-on examples.

But the course also has two negative points I wanted to point out. The smaller one is the fact that there are no Linux setup instructions! Mac and Windows yes, and for sure if you're like me will probably use a cloud provider rather than setup my own k8s cluster, but still 😒. The second one is also not critical, but more annoying, because relates with the pacing of the course. Sometimes, examples are really long, slowly going step by step, and repeating the previous command just adding a --show-labels flag, or reading trivial details; Other times, and despite watching it at 1x speed, the author rushes over non-trivial yaml files, executes a command and "voila, that's done!", or does a kubectl describe deployment and mentions so fast the relevant output sections (not even the content) that I had to pause the video, go back and check it. It also happens with the slides presented, he advances slides at times so quickly that you can't even read the latest bullet point or sentence when appears.

Overall, I felt satisfied with the contents. Just be prepared to pause from time to time.

Notes

The author recommends reading Kelsey Hightower's Kubernetes The Hard Way so probably that will be my next step.


Previous entries