Random ramblings about Mac, Python, TeX, programming, and more   |     |        |     |  

Using OrbStack to test and debug my website implementation

June 12, 2024  |  web, software, python
This post is part of a series of posts where I share my experiences developing, testing, and debugging the new implementation of my website, including this blog and my home page.

When I developed my new website, I used OrbStack to run a virtual developer version of the site on my development computer (the host). I recommend this setup since what you run in development can be very close to the si …

Last updated: June 12, 2024

A Debain/NGNIX/Gunicorn setup for web.py

May 22, 2024  |  web, software, python
This post is part of a series of posts where I share my experiences developing, testing, and debugging the new implementation of my website, including this blog and my home page.

In this post, I will describe how I did the setup of a Debian Linux computer for my web.py web applications served by NGINX and Gunicorn. The same setup is used both on my live site hosted on Linode and on my OrbStack v …

Last updated: June 7, 2024

Experiences from developing a new website

May 15, 2024  |  web, software, python
This post is part of a series of posts where I share my experiences developing, testing, and debugging the new implementation of my website, including this blog and my home page. At the end of this post, you will find links to the other posts.

I've had a side project re-implementing this blog and my web pages for a while. In January 2021, I moved the blog and web pages to a Linode-hosted web plat …

Last updated: June 12, 2024


May 12, 2024  |  web, blog, software, macos

My first blog post on this blog was posted September 14 2007, just titled «The first posting». The whole content of the post was this:

This is my first posting on Blogger. This blog (feed) is my private blog where I will post stuff not related to work. This posting is also a test of MarsEdit, the blog publisher I've started to use today. I have a license for MarsEdit 1, but I will upgrade to ver …
Last updated: May 15, 2024

Beaker and PyCrypto (and web session data)

April 23, 2024  |  web, python, crypto
This post is part of a series of posts where I share my experiences developing, testing, and debugging the new implementation of my website, including this blog and my home page.

In web development, I have started to use Beaker (documentation) to handle session data (e.g., current logged in user in a session). The data for a given session can be stored in files, in a database, in memory (does n …

Last updated: May 15, 2024

Programming fonts (and online preview)

March 8, 2024  |  fonts, tools, programming

In 2012, I wrote about coding fonts, and still, my preferred programming font is Source Code Pro. I have updated the post from 2012 a couple of times with new interesting fonts for coding, and I continue to look for new fonts that could be a replacement for my preferred programming font. Yesterday, via Charles Roper, I came over the font Intel One Mono designed by Frere-Jones Type for Intel. I th …

Last updated: March 9, 2024

Emacs on macOS

December 29, 2023  |  tools, programming, macos

I do almost all my programming and scientific writing in Emacs, and I am a Mac user running a recent version of macOS (usually the latest release available). I try to install most of the third-party software I use with Homebrew. It makes it much easier to install the software I need (including Emacs, BSD make, OpenSSL, Python, and Qt) and keep the software updated (regularly running the command «b …

Last updated: December 29, 2023

Mailspring and keyboard shortcuts

April 19, 2023  |  tools, macos

Mailspring is a free mail client for Mac, Linux and Windows (a paid Pro version is also available). Mailspring's user interface (UI) is open source (GPLv3). It is built on a plugin architecture and is designed to be easy to extend.

I have started using Mainspring on macOS recently, and since I find keyboard shortcuts important when using an email client efficiently, Mailscript's highly configurabl …

Last updated: December 29, 2023

MetaPost figures (in LaTeX)

May 19, 2022  |  latex, publ

I prefer to produce documents using LaTeX (and other TeX friends), and draw figures using MetaPost. A long, long time ago (when I did my PhD), I even created a MetaPost package, aaobj (documentation).

Recently, I have moved towards using the Lua implementation of TeX (see also the LuaLaTeX documentation). I will not discuss why in detail here, but one of the reasons is that inline MetaPost in LaTe …

Last updated: April 2, 2024

Qt for Python (on Mac)

December 13, 2021  |  python, programming

In November 2019, I wrote about this:

Qt for Python (and plotting with Matplotlib)

Since then, Qt 6 and PySide6 has been released (see Qt for Python 6 released). Currently, I install both Python and Qt on my Mac with Homebrew, making the steps much easier than described in the post from 2019:

brew install qt
brew install python

At the moment, Homebrew does not install Python 3.10, the latest a …

Last updated: January 3, 2022

Add artwork and thumbnails to video files

October 22, 2021  |  tools, macos

I just converted a lot of home videos from VHS to MP4 files. I planned to upload and view the resulting files on my iPad. I used HandBrake to reduce the size of the files and WALTR PRO (remember to turn of Automatic Content Recognition in the Preferences) to transfer the videos to my iPad. But, before I transferred them to the iPad, I wanted to add a title and an artwork image to the metadata of e …

Last updated: October 22, 2021

Server side IMAP rules

June 3, 2021  |  tools, python

I'm using several email services, but most of my private email is on an IMAP based service. A lot of the received emails should be automatically moved to a sub-folder on the server without my involvement. In most email clients you can easily create rules to do this. However, I would like to do this even when I have no email clients up and running. For my work email service (Outlook) this can be d …

Last updated: June 8, 2021

Get the notes out of Apple Notes into OneNote (via Evernote) with AppleScript

April 9, 2021  |  tools, programming, macos

I have been using Apple Notes for all my note taking since 2016. For not so interesting reasons, I recently had to change to Microsoft OneNote. But I did not want to leave all my meeting notes behind. I had to find a solution to get all my notes out for Apple Notes. And as many times before, AppleScript (and Python) was part of the solution.

My first attempt was to search for possible tools or rec …

Last updated: April 14, 2021

Differential Privacy (and Python)

March 1, 2021  |  security, python, programming

Differential privacy is an interesting tool when doing privacy aware analytics. This is a topic I have been working on for a while, and one of the great challenges is to implement generic tools for this. However, developers at Google are using this a lot internally, and they have also made their libraries available at GitHub. Since I often prefer Python, I am happy to find a Python wrapper for the …

Last updated: March 5, 2021


January 28, 2021  |  tools, macos

In a previous posting, I explained how to use Apple Script to automate an action and connect it to a keyboard shortcut. Recently, I changed the approach for several such actions on my Macs. The new approaches are all based on Keysmith. My experience is that the resulting actions from Keysmith are executed much more efficiently than my previous solution.

Last updated: March 3, 2021

Moved to a Linode-hosted blog platform

January 18, 2021  |  blog

Last January, I moved this blog to WordPress. The reason for the move was that MarsEdit stopped supporting Blogger (where my blog was hosted for years through Blogspot). I was never happy with the WordPress hosting, and this December, I decided to build my own blog platform hosted on a Linode server. I got it up and running before the annual WordPress bill was due December 31st. The goal was to cr …

Last updated: May 3, 2024

MacOS automation with Python and AppleScript

February 21, 2020  |  programming, macos

I prefer to program in Python, but for automation on the Mac, AppleScript is still a great tool. Especially paired with a good AppleScript editor/debugger like Script Debugger. For many projects it would be nice to do most of the scripting in Python, and only do the interaction with the different programs (GUI) in AppleScript. The obvious solution is PyObjC and its ScriptingBridge framework (wrapp …

Last updated: January 27, 2021

Microsoft Outlook: download pictures

February 12, 2020  |  tools, programming, macos

I am currently on my Mac using the Microsoft Outlook application for email. For a lot of reasons, I have turned off automatically download pictures from the Internet (see Preferences→Reading→Security). But sometimes, I want to see the pictures included in the email message I am reading. I can push the button Download pictures to see them. However, I prefer to use the keyboard. I have not found a …

Last updated: February 12, 2020

How to create macOS Keyboard shortcuts to sub-menus

January 31, 2020  |  macos

In macOS, it is easy to create new keyboard shortcuts to a menu item. Just go to System Preferences → Keyboard → Shortcuts, select App Shortcuts, press the plus button, select application (or All Applications), type in the menu title of the menu item, and choose a keyboard shortcut:

macOs menu keyboard shortcuts

The menu title can be from a sub-menu item. However, if you have more than one sub-menu item with the same title, …

Last updated: January 31, 2020

Including source code in this blog

January 31, 2020  |  web, publ, programming, macos

I write these blog posts with MarsEdit. And, while I am writing, I preview the blog post with Marked 2 (start Marked 2 and choose Preview → MarsEdit Preview from the menu). And since my writing usually is about programming, the blog posts might contain source code. My approach is similar to how I include source code in papers, and I was writing about it back in 2015. So this is an update on how I …

Last updated: January 31, 2020

Including source code in papers (and exams)

November 17, 2019  |  publ, python, programming

In march 2015, I wrote about using Pygments when including source code in papers (and on the web). I still use Pygments, but I have never updated the description on how I do it now. In most cases, I use Pygments implicit without interacting with the program myself. I leave it to the LaTeX package minted. You still need to install Pygments, but you do not need to interact with it. The minted packag …

Last updated: November 17, 2019

Qt for Python (and plotting with Matplotlib)

November 11, 2019  |  python, programming

To able to develop GUI-based Python programs using Qt you need to install Qt and PySide2 (Python mapping for Qt 5, see Qt for Python). A good place to start is the Qt for Python getting started document.

Install the software

I have Python 3.8 on my Mac. I have also installed numpy and matplotlib with pip (since I have many different Python installations on my Mac, including 2.7, 3.7 and 3.8, I wil …

Last updated: December 13, 2021