My stats sparkline script has been updated to v1.2.0! I noticed that I no longer had a sparkline because removed something the script was relying on, so I reworked it to rely on something else instead. I hope I didn’t break custom domains; let me know in the comments if I did.

If you have auto-update enabled for the script, you should receive the update soon. Otherwise, you can force an update check for the script in your extension or head over to Greasy Fork and install it manually.

For the technical folks out there, you can view the diff to see the actual changes. previously had a sliding drawer that came out when you clicked the “My Sites” button in the WP Admin Bar, but that no longer seems to exist. The script had been relying on the sparkline that was present in that drawer, but since it no longer exists, the script failed. I changed it to build the URL manually; thankfully I had an example saved.

Happy blogging!

Whenever I play Rock Paper Scissors for fun, I like to play a more strategic variant. I can’t have been the first one to have thought of this, but I can’t seem to find it described online, so allow me to describe it.

I developed this variant almost ten years ago as a simplification of Club Penguin’s Card-Jitsu game. Card-Jitsu required a special deck of cards; each card had a number, a colour, and an element. There were three elements—water, fire and snow—and each would “beat” another: water puts out fire, fire melts snow, and snow freezes water; yes, it was inspired by rock-paper-scissors. Each round, both players would choose a card to play, and the player whose card trumped the other card either by element or by number if the suit was the same would win the round. To win the game, one would have to have won three rounds with either a single element or one of each element (e.g. three waters, or a fire, water and snow), and each of the cards that are counted towards the win must be different colours.

The rules of Card-Jitsu showing what beats what and how to win

The basic rules of Card-Jitsu.

I simplified this to work with rock-paper-scissors. Each round is a regular throw of rock-paper-scissors and uses the same winning rules. Winning the game uses the three-of-one or one-of-each rule. It’s basically Card-Jitsu with the numbers and colours taken out, and the elements replaced with rock, paper and scissors.

See an example →

I just had a great idea: why not make a game like Notpron, but use Git as the medium instead?

I haven’t given this that much thought and I don’t have any ideas for puzzles yet, but here’s what I’m thinking:

  • The master branch would be the entry point for the whole puzzle. It will contain a README file with instructions on how to play and a pointer to the first level.
  • Each level will be represented by a branch whose name is of the form xxxxxxx/master, where xxxxxxx is a random string so that it is not obvious which level the branch is when looking at the output of git branch. This random string is the “level code” for the level.
  • If a level requires multiple branches, the name of each branch should be of the form xxxxxxx/yyyyyyy, where yyyyyyy is the name assigned to the branch, which can be anything.
  • The goal of each level is to obtain the level code for the next level.
  • Each level will make some use of Git’s functionality. File contents, file diffs, commits, commit messages, and even commit authors are all fair game. This is not an exhaustive list.
    • Ideally, this game should be playable through the GitHub website, or through a local clone of the repository obtained using git clone, so that unfortunately precludes the use of multiple remotes (to keep the puzzle self-contained) or hiding things in the .git directory. I wonder how GitHub deals with multiple roots…
  • Each level will have a README file that outlines the level’s puzzle. The first thing the player should do when reaching a new level is to look at the README.
  • All levels should branch from the initial commit, which should be empty. This allows flexibility in adding, removing, or replacing levels as needed.
    • Initially, I had the idea of having a game branch, where the commit of a level is the parent for the commit of the next level. I realized that this was not flexible enough if maintenance was required.
  • Like Notpron is to HTML and other technologies, this game should be an opportunity to learn about Git and to get familiar with it.

I don’t know what to call this game, nor do I have any concrete ideas for puzzles, but there’s the idea, and I think it has potential. If you have any suggestions, please leave a comment!

EDIT: The Cthulhu has been released!

v1.5.0 of the editor script is out! This version fixes an issue where the script does not redirect for private blogs and some Jetpack blogs. If you don’t have such a blog, then this update shouldn’t affect you. Thanks go to doc for reporting the issue.

As usual, your script should have updated itself, but if not, you can head over to Greasy Fork and install it manually.

This change also affects the bookmarklet, so if you use the bookmarklet method, please replace it with the new version (delete the old one and re-add the new one). You can get the updated code on the workarounds page.

For the technical details, you can go look at commit e41fe77. It seems that sometime in the last two years, changed the structure of the editor page, so the query used was incorrect. The change was simply changing the query selector to better target the element with the link.

As many of you know, Firefox 57 has been out for a couple of months now. In it, Mozilla dropped support for XUL add-ons, leading to many add-ons becoming incompatible with Firefox 57. Greasemonkey and Scriptish, two popular add-ons for Firefox that enable you to run user scripts like the editor redirect script, are both XUL add-ons and therefore incompatible with Firefox 57.

Some of you have brought your migration issues to my attention, so I figured I’d share the procedure here so the rest of you can spread the word. Apologies for taking so long to get this out.

Just to note, the scripts themselves don’t need any changes.

  1. Make sure Greasemonkey has been updated to the latest version. It should be at version 4 or higher.
  2. Reinstall the scripts you want (quick link to all my scripts).
  3. Try out the script. If it works, then stop here.
  4. Make sure that both Greasemonkey and the scripts are enabled. Restart your browser if you still have troubles.
  5. If Greasemonkey fails to work or is not complete enough for you, uninstall it and install your scripts with Tampermonkey or Violentmonkey instead.

Greasemonkey has worked when I tested it, but the reports I’ve heard say that it doesn’t, so you may want to consider skipping to the last step and using one of the alternatives.

I’ve also updated the relevant section in the workarounds page.

If you have any troubles, please leave a comment and I’ll be happy to help you troubleshoot.

I released v2.3.0 of the Classic Stats Redirect script on Sunday. Your copy should have automatically updated already. If you don’t already have the script or need to update manually, you can download your copy from Greasy Fork. Special thanks go to Dennis for helping me test out this version!

After the incident causing the release of v2.2.1 (I apparently neglected to announce v2.2.0 and v2.2.1; this release suppresses redirection for URLs containing from=wp-admin), I decided that I should write some automated tests to catch these kinds of errors before I end up releasing them. I will discuss the issue in the technical section that follows.

This update is purely a refactor and the behaviour should be the same. If anything has changed, please leave a comment or file an issue.

Technical details →

I’ve been playing mahjong since 2012. I love the game, but I didn’t own a set until last year when a friend gifted me one.

Before I had a set, I got a few friends together and taught them to play Classical Chinese mahjong through Julian Bradfield’s mahjong programs. It was great and we had a lot of fun playing. The program helped them learn by giving English tooltips on the tiles and disallowing illegal actions. When playing with real tiles, though, we don’t have that luxury.

I couldn’t find a good reference sheet online, so I made one. It’s inspired by the table on Wikipedia. I replaced some of the terms with ones that I usually use (e.g. “Arrows” was changed to “Dragons”) and replaced the images with Unicode characters. The three tile calls and their definitions are also included below the table.

Mahjong quick reference sheet

This reference sheet is intended for Chinese Classical mahjong, but since Chinese Classical is the most basic of versions, it can be adapted to teach the basics of any version.

This reference sheet is also available as a PDF, a 4-up PDF, and as an ODT.

How do you eat apples? Like many people, you probably eat around the sides, leaving that iconic core. That’s not how my friend eats apples. You’d see her with a whole apple and she’d bite into it in a way that looks kind of off. Look back in a few minutes and you’d see the apple gone; no core, nothing.



“What about the seeds?” I asked. “You don’t have to eat them if you don’t want to,” she replied. I passed it off as a weird way that she eats apples, but a couple of years later, I stumbled upon the method again on the Internet. I don’t know how I got there, but there it was. I was never really into eating whole apples when I was younger; my dad would always complain that I left too much on the core whenever I ate one, so I just stopped eating whole apples. I learned to eat apples the way my friend did after that, and now I’m more than happy to pick up a whole apple and eat it. I can’t go back to eating around the core anymore.

How to Eat an Apple Like a Boss | FOODBEAST LABS by Foodbeast [YouTube]

There’s a lesson to be learned in everything we do. What can we learn from eating apples?

Let’s find out! →