How to store configuration files in git
I store my configuration files as a git repository. This gives me the following important features:
- I can easily setup configuration on a new machine, simply by cloning the repository.
- I can have different branches (currently I am using them for different operating systems).
- I can easily rollback any changes (even though I edit my configuration files in vim and I have persistent undo enabled).
Requirements
To implement what is described here, you obviously will need git. I suppose that you have some remote place to store the repository (I am using my own remote server and gitolite but I suppose that anything – for example, GitHub – will work as well). Also using a shell which allows to set up aliases makes things more convenient. I am using GNU Bash and PowerShell and both of them work.
Convenience script for command-line 1Password client
Password manager
I am an active user of 1Password password manager. I even pay subscription fee for so called “family account”. It does support the major browsers (Chrome, Firefox, Edge, Brave, Safari) and mobile (iOS and Android) devices. Unfortunately, GUI app is available only for macOS, Windows and Linux, and I want FreeBSD.
I must mention that I tried to live in KeePassX ecosystem and it was, well, unfulfilling. Too many rough edges for my taste.
Mixed Python/Rust project with maturin
This post describes how to create Python project using Rust for time-critical parts. While the steps described below work for me, they are definitely not the only way to do things.
Disclaimer: the instructions are obsolete and probably will not work now.
Prerequisites and setup
Prerequisites
Python
Obviously, you will need Python. I am not going to
cover its installation here. The Python version I am going to use is 3.11.2
.
The command python -c "import sys; print(sys.version)"
will print the version
of the Python interpreter you have installed.
Iocage Jails
This post contains the information I have missed when I have started to use iocage for jails management on FreeBSD.
Disclaimer: I am relatively new to FreeBSD and while what is written below works for me it is most probably not the only (or even a right) way to do things.
Jails
Jails is a killer feature of FreeBSD. One can think about jail as about chroot on steroids, or as about a very light-weight virtual machine. A jail provides an environment isolated from the rest of the system where FreeBSD is running (usually; one can run, for example, Linux in a jail).
How to create links in PowerShell
The purpose of this post is to remind myself how to create links in PowerShell. Nowadays (since mid-August 2016) PowerShell is cross-platform and open-source (with MIT license).
Cmdlets
Commands in PowerShell are called cmdlets. There are two of them to create
links: New-HardLink
for creating hard links and New-Symlink
for creating
symbolic links. Unfortunately, I was not able to get New-Symlink
to work
but see below for workaround.
Hard links
Hard links can be created with New-Hardlink
and work as expected.
Why I am not using Linux (anymore)
The year was 1994. I wanted multi-tasking operating system so I have
tried to install fresh Windows 95. It failed; actually, it failed 12
times in a row. I think now that the reason was my computer – I was
using UMC CPU. After
the 12th failure I have installed Slackware Linux. I did not
have enough RAM (I had only 4Mb) to run X Window or Red Hat (one needed 8
Mb) but Slackware worked as a charm. I did every beginner’s mistake,
starting out with “What is /proc/kcore
and why is it so big? Can I
delete it?” Luckily, I had a friend who knew about Linux and was
answering my never-ending questions. Long story short, I have got my
FidoNet point and
UUCP running. Of course, I did
not have any Internet access (which was not very useful at that time;
just think that Google started out as a research project in 1996) and my
modem was 2400 bod without error
correction
(I also had VGA monitor which I did not like due to it is not being
sharp enough, so I was using monochrome Hercules
monitor – mind
you, amber-glowing not green-glowing). I was doing MNP5 for my modem in
software. Later I have moved to Debian (was it 13 floppy disks?), got
14400 bod modem with error correction, and dial up internet access – in
this order. I vividly remember upgrade from 1.2.13 kernel to 2.x line.
It has required to update everything, and on dial up it was an adventure.