Apple broke the display menu, so I wrote my own
A short time ago, the macOS display menu stopped working for me. It no longer had options to change mirroring settings, only supporting AirPlay. So I wrote my own, also solving some other issues.
A short time ago, the macOS display menu stopped working for me. It no longer had options to change mirroring settings, only supporting AirPlay. So I wrote my own, also solving some other issues.
You might get unusual errors about Unicode and inability to convert to ASCII. Programs might just crash at random. Those are often simple to fix — all you need is correct locale configuration.
On Monday, Apple announced some changes to its Mac lineup. All MacBooks (even the Air) got CPU upgrades, and the starting price of a MacBook Pro (13″, no Touch Bar) went down to US$1299. Which makes the 12-inch model effectively pointless.
A quick spec comparison reveals that the Pro comes with a much better CPU, GPU, screen, camera — the only drawback is the storage space.
CSV is not a standard. What does that really mean for anyone using that format? The file’s recipient may be unable to read it the way you intended. Separators, decimal marks, escaping and encodings are all problems — and Excel does them all pretty badly.
Five months ago, I decided to make the switch from my trusty old desktop computer, running Arch Linux, to a MacBook Pro. I picked the 2015 13" base model with an upgraded hard drive. The device is beautiful, and just works™, which is pretty important to me.
Recently I was working on some C# and Java code. And along the way, I used Python and Vim to (re)write my code. A small Python script and a 6-keystroke Vim macro did it faster and better than a human would.
Every programmer should learn a good scripting language and use a programmable editor like Vim. Why? Here are two examples, after the break.
You’ve just written a great Python web application. Now, you want to share it with the world. In order to do that, you need a server, and some software to do that for you.
The following is a comprehensive guide on how to accomplish that, on multiple Linux-based operating systems, using nginx and uWSGI Emperor. It doesn’t force you to use any specific web framework — Flask, Django, Pyramid, Bottle will all work. Written for Ubuntu, Debian, Fedora, CentOS 7, Alma Linux, Rocky Linux and Arch Linux (should be helpful for other systems, too). Now with an Ansible Playbook.
Revision 8 (2022-02-20): works with Fedora 35, AlmaLinux 8, RockyLinux 8
While this guide is still valid, in 2026 I switched to Docker and Gunicorn for my Python web app deployments. Check out Deploying Python Web Applications with Docker for more details.
I spent Saturday on rewriting a Flask app in Django. The app in question was Nikola Users, which is a very simple CRUD app. And yet, the Flask code was a mess, full of bugs and vulnerabilities. Eight hours later, I had a fully functional Django app that did more and fixed all problems.
I tested the speed of four static site generators: Nikola, Pelican, Hexo and Octopress, in a clean environment. Spoiler alert: Nikola won.
Disclaimer: author is a developer and user of Nikola. The test environments used were the same for all four generators.
Nikola v7.6.1, by Roberto Alsina, Chris Warrick and contributors; Python; MIT license
Pelican v3.6.0, by Alexis Metaireau and contributors; Python; GNU AGPL license
Hexo v3.1.1, by Tommy Chen and contributors; Node.js; MIT license
Octopress v2.0, by Brandon Mathis and contributors; Ruby; MIT license (based on Jekyll)