Inplace editing
This article describes how to edit files in-place programmatically. This has been part of my toolbox for a long time, so I thought I’d document it here.
This article describes how to edit files in-place programmatically. This has been part of my toolbox for a long time, so I thought I’d document it here.
In order to create a compact representation of a monogram, I wanted to get the raw
curve info from the Latim Modern Roman
font, not the rendered glyphs.
This article documents how I did that.
As I’ve written about before (see engineering), I often use CalculiX for structural mechanics calculations of products made from composites. These often involve calculating lots of different combinations of materials, lay-ups and load cases. For convenience and for them being self-contained, each variant is usually in a different directory.
So when I find an improvement to e.g. a pre.fbd
, Makefile
or
job.inp
, I want modify all of the other instances as well.
This is where sed
(which stands for “stream editor”) comes into play.
pygmentize
as a colorized cat
The less
command uses a programmable filter with which you can colorize
its output.
In this article an alias to do the same for cat
is shown.
For a long time, I’ve had a directory ~/templates
to store template files
for several programs.
For historical reasons, my LaTeX templates have been stored under
~/latex/templates
.
Both have been under git
revision control since 2006; before that I used
rcs
.
I want to merge both local repositories under ~/templates
.
This articla documents how that was done.
The STEP
format is probably the most used accurate 3D geometry exchange format.
(It can contain a lot more than just geometry!)
STL
files (most often used in 3D printers) are based on triangles, which are
basically only an approximation of the real geometry.
A lot of available STEP
-file viewer are windows-only.
I’ve been looking for a simple STEP
-file viewer for UNIX-like operating
systems, so that I can see the parts that I’m making using cadquery
(see also: cadquery documentation).
I’m not a fan of IDE’s like cq-editor or IDE’s in general. In particular, cq-editor pulls in the whole of spyder (a Python IDE) just to get syntax highlighting in its built-in editor.
Since I do not enjoy being a product for facebook to monetize, I’ve decided to de-facebook the internet, at least for me.
This article assumes you’re running your own DNS server. The code in this article can generate configuration data for dnsmasq and unbound.
The consumer versions os ms-windows don’t come with a DNS server, and most of the good ones do not run on it. If you are using ms-windows, I suggest using a pi-hole <https://pi-hole.net/> on your home network as a DNS server.
This documents how you can install openstreetmap data on the Garmin zūmo 340 LM. This procedure probably also works on other Garmin devices, but I haven’t tested that. The commands listed in this article assumes you’re using a UNIX-like operating system. While most of the actions could be performed on ms-windows, I haven’t run that in decades, so I’m not the person to give advice about that
With simple mappings, we can add a TeX command around visually selected text or around the current word in vim.
Most smartphones come with a range of ringtones.
But if you don’t like those, you can make them yourself from music that you are allowed to use.
All software that is used here is free software. They should work on all recent UNIX-like operating systems. In my case, I installed all of these programs using the FreeBSD ports system.