koldfront

Switching the default branch to 'development'

๐Ÿ•ž๏ธŽ - 2020-06-21

I have decided to switch my public git repositories to use a branch called 'development' as the default branch.

I find the terms 'development' and 'production' much easier to interpret. I have seen projects where 'master' is the branch development happens on continuously, and then there is a separate branch for releases, and I have seen the opposite, where the 'master' branch is never committed to, except when merging to do a release.

So when the term 'master' is seen as problematic, why not switch to something less ambiguous?

It is not that complicated to do:

I have a single clone of most of my repositories, so I went to that, and ran:

git checkout master
git branch -m master development
git push -u origin development

Then I went to the bare repository on my server, where I "host" the public repositories, and ran:

git symbolic-ref HEAD refs/heads/development

And finally in the clone, I ran:

git push origin --delete master

And Bob is my uncle.

For anybody that have cloned any of my public repositories, there are two options: a) make a new clone, or b) run these commands in your clone:

git checkout master
git branch -m master development
git fetch
git branch --unset-upstream
git branch -u origin/development
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/development
git remote prune origin

While finding these commands, I learned about symbolic-ref, so if you check out my emacs repository, you get the branch scratch/gtk-x-disconnect by default now. Nice!

Splitting an .ics file up #debian #radicale #calendar #perl

๐Ÿ••๏ธŽ - 2020-04-11

As I mentioned when I upgraded my server to Debian 10 (buster), the version of radicale included no longer supports calendar (.ics) files with more than one event. Instead each event is supposed to be in a file by itself, the file name being the UID of the event.

I have finally taken the time to write a little program that will take one of the .ics-files I used to use, and splits it out to a file per event.

Getting around to that took me, what, ยพ of a year? Oh well, here is is:

#!/usr/bin/perl

# split_ics - take an .ics file and a directory and write a file per event

# Copyright (C) 2020 by Adam Sjรธgren <asjo@koldfront.dk> Under the GPLv2.

use strict;
use warnings;
use utf8;
use v5.12;

use Data::ICal;
use File::Slurp;

my $ics_file=$ARGV[0];
my $dir=$ARGV[1];

my $ics_data=File::Slurp::read_file($ics_file, { binmode=>':utf8' });
my $input=Data::ICal->new(data=>$ics_data);

foreach my $event (@{$input->entries}) {
    my $uid=$event->property('UID');
    my $filename=$dir . '/' . $uid->[0]->value;
    my $calendar=Data::ICal->new();
    $calendar->add_entry($event);
    open my $fh, '>:utf8', $filename || die $!;
    print $fh $calendar->as_string;
    close $fh;
}

The only tricky part was avoiding the Data::ICal-module splitting lines in the middle of multi-octet utf-8 characters.

A tip: you can run radicale --verify-storage to have any problems with the generated files reported. Do remember to run it as the radicale user, though.

Jeeves and Wooster to the rescue #wodehouse #tv #audio

๐Ÿ•›๏ธŽ - 2020-03-27

If the whole thing is kind of dragging you down, don't you know, men brighter than I habitually recommend a dosis of P.G. Wodehouse.

I have to say that I find his Jeeves stories the most fetching. The television series starring Hugh Laurie and Stephen Fry are positively excellent.

In case you are less visually inclined and prefer a great narrator to provide your ears with relief, I can wholeheartedly recommend the great Jonathan Cecil's performances. They are nothing less than brilliant.

What ho!

Big Thief, Store Vega (early show) โ˜…โ˜…โ˜…โ˜…โ˜† #live #music

๐Ÿ•ค๏ธŽ - 2020-03-11

Due to SARS-CoV-2 precautions, the concert at Store Vega was split in two - an early show and a late show.

I saw the early show - arrived fashionably around 30 seconds before the band went on stage - and it was good. Low key, sincere, concentrated and indie - good.

If Big Thief's tour passes by where you are: recommended.

Where you sometimes think that the heavy metal folks have their guitars so low it must be uncomfortable, Big Thief have them so high you almost think the same.

Increasing the number of nfsd threads on Linux #linux #nfs

๐Ÿ•ฆ๏ธŽ - 2020-02-26

If you have a Linux machine as an NFS server, and you reach some high number of clients, you may see warnings in dmesg along the lines of:

nfsd: too many open connections, consider increasing the number of threads

If you use the error message to search for solutions online, you'll find plenty of explanations saying that you should change the RPCNFSDCOUNT variable in, e.g. /etc/default/nfs-kernel-server on a Debian-based machine.

Sometimes the guides will tell you to restart the nfs-kernel-server-service, but alas, that won't take effect (at least not immediately(?)) Sometimes the suggestion is then to reboot the machine.

Besides being ugly, that might not be convenient, if - say - a whole lot of machines depend on the NFS mount (which is how we got here in the first place!)

I've now found the solution twice, and this time, I am writing it down!

To change the number of nfsd threads to e.g. 16, you run the command:

# rpc.nfsd 16

The change won't persist a reboot, so you'll still have to change the RPCNFSDCOUNT variable, but it will take effect immediately. The number you specify is the desired total number of nfsds.

You can check the number using ps faux | grep [n]fsd | wc -l or looking at the first number in grep ^th /proc/net/rpc/nfsd.

I ๐Ÿ–ค Free Software #ilovefs

๐Ÿ•ข๏ธŽ - 2020-02-14

GNU Emacs Debian GNU/Linux Linux X.Org Postfix Perl Python PostgreSQL OpenSSH Firefox Apache ejabberd Dovecot git GnuPG XMonad GHC Gnus jabber.el rdiff-backup LaTeX Gimp lots of GNU the list goes on an on - thanks everybody!

United Kingdom leaving the European Union

๐Ÿ•ฃ๏ธŽ - 2020-01-28

I guess there are only a couple of days left until the United Kingdom leaves the European Union.

I am not quite sure what will happen to buying things online in the UK from "over here" in "Europe", but I suppose there will be taxes and fees to pay galore.

Too bad - I really liked buying all kinds of interesting pens at Cultpens, a company with a wide range of products and good service!

Another company I will miss ordering from is The Keyboard Company - I have bought 4 or 5 keyboards from them, they carry a nice range of products and they are proactive (I once ordered a combination of keyboard and replacement keys that didn't quite make sense, and they promptly warned me).

There are many things about the EU I am not especially impressed by, but my overall feeling now is that it makes more sense to work to improve it, than to dismantle it.

Lille langebro

Today

Salvation Army (155).

Gnumeric (22).

BitTorrent (19).

Saturday

Project Gutenberg (49).

Sunday

Debian Social Contract (23).

Wednesday

Beck Hansen (50).

Ruby Vega (26).

dazz (37).

2020-07-09

Adam (47).

Courtney Love (54).

Tom Hanks (63).

Anjelica Huston (68).

O.J. Simpson (72).

UN Small Arms Destruction Day.

Palau: National Day.

2020-07-11

Suzanne Vega (61).

2020-07-13

The DNA Lounge reopens (19).

2020-07-15

Rosetta Stone discovered in Egypt (221).

2020-07-18

Nelson Mandela (102).

2020-07-20

First moonlanding (51).

2020-07-22

koldfront (21).

Prins Felix Henrik Valdemar Christian (18).

2020-07-23

Amiga launched (35).

2020-07-24

Christina Ruskรฆr Nielsen (41).

2020-07-25

Dolly (23).

2020-07-26

George Bernard Shaw (164).

Carl Gustav Jung (145).

FBI (112).

2020-07-29

George Bradshaw (220).

Jesper Holm (43).

2020-07-30

d-a-d.com (23).