A copy-paste go SQL mock for GORM
When it comes to writing robust and reliable tests for your Go applications, having a well-structured and efficient testing setup is crucial. One common challenge in testing Go applications is dealing with database interactions. To ensure that your code functions correctly, it’s essential to create a controlled environment for database operations during testing. In this…
Verifying Wikimedia user page links on Mastodon
While reviewing the ongoings of the 2023 Wikimedia hackathon, I learned about the RealMe MediaWiki extension, which is already deployed to Wikimedia sites and allows verification of URLs that appear on user pages within other software or platforms, such as Mastodon. Link verification for dummies Imagine you want to show that your online profiles, like…
Dependency injection in go using fx, and replacing services for test
I’m writing a new go application and ended up giving fx (by uber) a try for dependency injection. The getting started docs were brilliant for my use case (creating an API), but the examples for how to inject mock services for tests were lacking, so I decided to write some code examples of how I…
Wikidata query service Blazegraph JNL file on Cloudflare R2 and Internet Archive
At the end of 2022, I published a Blazegraph JNL file for Wikidata in a Google Cloud bucket for 1 month for folks to download and determine if it was useful. Thanks to Arno from weblyzard, inflatador from the WMF search platform team, and Mark from the Internet Archive for the recent conversations around this…
Creating properties with statements using Wikidata Integrator
Wikidata Integrator is a Python library that simplifies data integration from Wikidata (and other Wikibases). It is written in Python, is focused on Wikibase concepts (as opposed to some libraries which are MediaWiki focused) and has a user-friendly interface. I’m currently working on a demo Wikibase and decided to bring all of the data into…
Wikibase and reconciliation
Over the years I have created a few little side projects, as well as working on other folks’ Wikibases, and of course Wikidata. And the one thing that I still wish would work better out of the box is reconciliation. What is reconciliation In the context of Wikibase, reconciliation refers to the process of matching…
Require a “More” block in WordPress posts
As a WordPress user or reader, you might have noticed that some blogs and websites use a “More” block to break up their content and display a teaser of the post on the homepage or archive pages. This feature allows visitors to see a preview of the post and decide if they want to read…
Developer previews with AWS, Terraform and GitHub Actions
As a developer, one of the most critical aspects of your workflow is the ability to test and preview your code changes before deploying them to production. This is where developer previews come in. This post will outline how to create your own simple developer preview system, using Github Actions for building, AWS S3 for…
Wikidata Map in 2023
It’s been 2 years since the 2021 Wikidata map. Yesterday I was sitting in the WMDE office and Lydia raised the point that we hadn’t made a map in quite some time (T331124). Maps used to try to generate in a somewhat automated fashion, but the process was rewritten in 2021 and still needs to…
Windows 11 OpenSSH agent to WSL2
I briefly touched on my OpenSSH agent to WSL2 solution back in 2021. Today find myself setting up a new Windows 11 laptop and running into a couple of different issues, and ultimately using a slightly different solution than before, so here is the short writeup glossing over the areas that lead me to get…