Header image for Using the BytesIO Class in Python

Using the BytesIO Class in Python

The io.BytesIO class in Python is an in-memory stream for binary data. It provides a file-like interface that lets you read and write bytes just like you would with a file, but all the data is kept in memory rather than on disk. This can be extremely useful when …

Header image for Linking to Posts in Python Pelican

Linking to Posts in Python Pelican

Pelican provides a syntax for linking to another post by its filename.

Header image for Copying Files & Directories in Linux with Progress Indication

Copying Files & Directories in Linux with Progress Indication

I’ve long used rsync for high fidelity, detailed copies of large swathes of files in Linux. For example:

Header image for Why An 8TB Drive Isn’t 8 Usable TB

Why An 8TB Drive Isn’t 8 Usable TB

I bought an 8TB external SSD to use as a live boot Linux device. I knew that this issue was due to the way that bits are aggregated into terabytes, but — thanks to our mate ChatGPT — here’s a nice explanation of why my 8TB SSD only shows 7,452 …

Header image for Wrap with HTML tags in VSCode

Wrap with HTML tags in VSCode

Using the Emmet capabilities in VSCode (see previous TIL) you can highlight a section of HTML code and quickly wrap it with other HTML using Emmet shortcuts.

Header image for __main__.py file in a project

__main__.py file in a project

This is, to a Python project / module, what if __name__ == '__main__ is to an individual Python file.

Header image for A nice workflow for creating Python projects with AI

A nice workflow for creating Python projects with AI

First, create a new project using poetry

Header image for neofetch for Linux system info summary

neofetch for Linux system info summary

neofetch provides a nice snapshot of system information. This is what you were wanting to add to the --sysinfo output for gpt-engineer.

Header image for Emmet Abbreviations in VSCode

Emmet Abbreviations in VSCode

Apparently there’s this plugin for many IDEs called Emmet which makes writing HTML very fast!

Header image for Installing Racket (Scheme) in WSL

Installing Racket (Scheme) in WSL

We’ll install Racket from apt as follows, as the snap version ended up with many hassles