cobra: unable to redefine ‘h’ shorthand
“Cobra is both a library for creating powerful modern CLI applications as well as a program to generate applications and command files” I’m currently using Cobra in the MediaWiki CLI project and recently came across an error while trying to auto-generate docs. I’m not actually trying to redefine this flag, but it looks like by…
Finding the most liked tweets for a topic in a year
I’m nearly halfway through writing a month of daily blog posts. I wanted to write some posts covering the history of both Wikidata and Wikibase on Twitter. Being a developer, I looked for APIs, but it seems tweets are not as accessible as they once were. This is a short write up of my adventure,…
A PHP library for jsonstorage.net
I first heard about jsonstorage.net when searching around for a quick place to persist some data while writing a Twitter bot. jsonstorage.net provides a simple JSON storage, with a free tier that can be very useful for small personal projects. The REST API is super simple, GET POST PUT DELETE etc. You can have either public…
SMWCon 2021, Development environments using containers
SMWCon 2021 is happening as I write this post. I was invited to give a short talk as part of a MediaWiki and Docker workshop organized by Cindy Cicalese on day 2. As I am writing a month of blog posts I’m going to turn my slides into a more digestible and searchable online blog…
Dispatching custom event in Fitbit SDK
I just upgraded my Fitbit charge 2 from 2016, to a Fitbit sense from 2020. After getting everything set up I took a quick look at the developer documentation and found myself in a web based IDE called Fitbit studio and before I knew it I had sideloaded a development demo app onto my new…
sudo / elevate on Windows 11
Windows has never had a native sudo or elevation feature. Of course if you write the correct Power Shell commands you can make this happen, but what we really want is convenience. There are various packages around to help out and various ways to install them. And in Windows 11 with a new package manager,…
Simple Go defer code example
In Go, a defer statement will execute a function call just before the function it is called from returns. I found that most of the examples of a Go defer call online seemed to do complicated things with numbers. So here is a nice simple example with just text output. Example You can run this…
Test if docker volume mounts are working
If you need some quick commands to paste to check if your docker volume mounting is working correctly here you go! Commands below!
mediawiki-docker-dev v1 rewrite
Back in 2017 at the Wikimedia Hackathon, I played around with Docker and docker-compose in relation to MediaWiki and testing with multiple setups at once while developing, meaning multiple PHP versions, web servers and databases. My original slides can still be found here. Since then mediawiki-docker-dev evolved into less of a testing system and more…
Adding git bash to Windows terminal
I just saw a tweet saying that Windows terminal is now generally available, so I had to give it a try. After downloading from the store and booting up I realized that only powershell, cmd and wsl are listed by default (and also Azure which I don’t really care about). Clicking around the UI a…