Observations on what's around me and projects I'm working on.


Posts tagged with reference

Colour hexdump

Alice Pellerin has opened my eyes with the lovely post: your hex editor should color-code bytes. I don't hexdump very often, but I've installed Hexyl for when I next need to:
Read more…

Keeping long running macOS jobs active

With long-running jobs I want my laptop to stay awake until the job finishes: $ time caffeinate script-name-here When the script finishes, caffeinate with finish, and the laptop will eventually go to sleep. * * * I use #reference for commands and knowledge I keep having to look up!
Read more…

Creating a large GittHub Gist

The UI at GitHub limits the size of the gist you can create. The way around this is via the gh command line. For example: $ gh gist create path/to/big.txt- Creating gist big.txt✓ Created secret gist big.txt
Read more…

Review code changes, then discard

Sometimes I want to review a PR by looking at the changes in my editor locally. Once I'm happy, I throw away the changes.  The command sequence to do this is: git checkout maingit merge --squash branch-name-here# <do productive and important review work here>git reset --hard HEADAnd if I forget the --squash, it's git...
Read more…

Adding another Github repository to Northflank

I like Northflank PaaS. I restrict what repositories it has access to for building Docker images, and I always forget how to add more repositories. The steps are: Go to the Team page (home page, likely) and select "Integrations". Select "Git" on the left-hand menu, and then "View all" GitHub accounts. Select your GitHub...
Read more…

zmv: move files based on a pattern

The default shell on macOS became zsh a while back, but I'm still learning the basics. I didn't know that zmv exists:autoload -U zmv zmv -nv 'ah Study (<->) 1.0 sec.wav' '$1.wav'This would dry-run (-n) a rename of files that match the pattern on the left. E.g., a file like "ah Study 0083 1.0 sec.wav" becomes...
Read more…

“AI for Medical Diagnosis”, week 2: key evaluation metrics

Coursera’s AI for Medicine specialism includes a nice, short, set of videos that explain standard model evaluation metrics. I found it useful, and made a few notes. Interpreting accuracy in terms of probability If accuracy of a model is P(correct), we can break that down as the sum of joint probabilities. P(correct ∩...
Read more…

Odds ratios

I’ve been reading an annoying book which uses odds ratio (and hazard ratios). As I don’t use these terms much, I have to keep checking my understanding. Odds ratios: it’s the ratio of two odds! The useful and beautiful The Art of Statistics gives a clear example: Non-bacon eaters have a 6 out of 100 chance of bowel...
Read more…

Options I use with rg (ripgrep)

ripgrep (rg) has long replaced the standard UNIX grep command  for me. My main usage is rg sometext, but there are a few flags I sometimes reach for. Limit matches to specific file types For example:  rg --type csv sometextrg --type log sometextUse --typelist to see the list of supported types. You can add more types...
Read more…

Github issue searches using NOT

As buried in the docs, it’s a minus sign on the field name. For example: is:issue -assignee:@me state:open
Read more…

Octopus Cosy tariff rate names and colour coding

Our energy supplier has given confusing labels to the different rates they charge at different times of the day. So that I can remember them, they are: Green: “Day rate” — super expensive, avoid. Also called "peak rate" which makes more sense. Light pink: “Off peak” — a standard rate. Sometimes also called "day rate",...
Read more…

Disabling Maths Results in Apple Notes

Apple Notes detects certain kinds of expressions and computes a result, formatting the maths along the way. I find it mainly useful, but not always. The disable: Format > Maths Results and select Off. This appears to be a per-Note setting. The particular case I ran into was Notes turning a SQL clause into a formatted...
Read more…

A short ChEMBL schema diagram

ChEMBL is a database of drug targets, molecules, and measurements of the activity of the molecules on targets. It has an online interface, but I’m more of a SQL person, and so I download the PostgreSQL or SQLite copies of the data. There is a large and comprehensive schema diagram, supporting descriptions, and an FAQ....
Read more…

Local LLM crib sheet

My reminder of my local LLM set up as of May 2025. Ollama  Models are stored in ~/.ollama/models, but it’s easiest to manage with ollama ls and then ollama rm. Example: ollama run gemma3 or ollama run olmo2. Integration with other projects is the main reason I have Ollama installed. Smart cat sc is an LLM shell command...
Read more…

Controlling PyMol with a trackpad

In the continuing series of “because I always forget so better write it down”. Touchpad controls on a Mac Single click (hold) and move — rotate Command + click (hold) and move — reposition Two finger click (hold) and move up or down — zoom in or out Commands center sele — centre the view on the selected object...
Read more…