Developing software in the Real World

Override Nginx media type for a URL

I followed Maarten Balliauw's article on setting up a pointer to my @akrabat@phpc.social Mastodon account on my own domain at @rob@akrabat.com. I'm not sure how useful it is and would prefer to have my own domain as the main account. Something to think about at least. When setting up https://akrabat.com/.well-known/webfinger, I realised that it was being served with a Content-Type of application/octet-stream, when it should be application/json. To fix this, I added this to my… continue reading.

Installing Xdebug on PHP 8.1 installed with Homebrew

I have recently set up a new M2 MacBook Air and as usual, installed Homebrew and then installed PHP. Homebrew is always up to date, so it installed PHP 8.1 for me. Again, as usual, I installed Xdebug using pecl install xdebug. This whirrs and clicks for a while downloading and compiling the xdebug.so and then fails with: rob@ardent ~ $ pecl install xdebug downloading xdebug-3.1.5.tgz … Starting to download xdebug-3.1.5.tgz (232,070 bytes) … Build… continue reading.

BBEdit Hosts File Syntax Highlighting

While editing my Hosts file in BBEdit, I wondered how hard it would be to create syntax highlighting for it. A quick google later, I discovered that I needed to create a Codeless Language Module and this is my first attempt: To install, download Hosts.plist and copy to your iCloud Drive's BBEdit/Application Support/Language Modules directory, restart BBEdit and you're done. I've kept it really simple and just highlight comments and the IP address, but it… continue reading.

Background images and multiple styles in rst2pdf

Over the weekend I released rst2pdf 0.99. The list of changes is quite long as it's been over a year since the last release. There are some key things in this release that I'm particularly pleased about including Python 3.9 and 3.10 & Sphinx 4 support, multiple styles in the class directive and the ability to specify background images in the raw:: pdf directive. There's also a number of bug fixes, particular to math rendering… continue reading.