Serverless Version Control System with Repository on Fritz-Nas

I’ve got a Windows laptop and a Linux workstation and I like to work on both of them, sometimes on one, sometimes on the other. Also, I’ve got a Fritzbox 7490 which has got a small internal NAS drive, just big enough for my little repository.

SVN – didn’t work

So I went on and tried to create a serverless fsfs svn repository on the Fritz-Nas. It worked all well from my Windows laptop and I even could do a checkout on the Linux machine but I could not commit anything from the linux machine. Error message something like Can't open file '/server/svn/repo/db/txn-current-lock'. I tried two hours to fix this problem, but couldn’t get it to work. Probably you need to change some settings in the SMB-config file for the Fritz-Nas on the Linux machine. But many people on the internet do advise not to try such a setup at all. So, scrap it, no thanks.

GIT – no problem

After that I tried use git as repository. This is the first time I’m using git and everything seems to work pefectly out of the box. And git is similar enough to svn so that you won’t get too confused when coming from svn.


Waterfox – a Firefox Quantum Replacement

Why Waterfox?

Some time ago, the Firefox developers, crazy as they are, decided that it was a good idea to annoy all us loyal Firefox users by scrapping support for a huge amount of add-ons. This has gone into effect with Firefox 57, aka Quantum.

It has annoyed me very very much… For example, 5 month after first release of FF 57 there is no replacement yet available for the Vertical Toolbar add-on and it probably won’t be available for a longer time. Why? Not even because the add-ons developer is lazy, no.

It is because the FF developers thought it would be a great idea to remove some of the interfaces which were available for add-on developers without a replacement. What an infinite sapience!

It is planned though, that maybe sometime in 2018 the needed interfaces will be available for the Vertical Toolbar add-on. Oh well.

For months now, on some machines, I had not updated my FF to Quantum. Some minutes ago I stumbled over Waterfox. Waterfox is a Firefox fork where all the old add-ons (XPCOM/XUL) work. And a lot of the new ones (WebExtensions), too.

My Impression

I just installed it on a LXLE Linux and all my beloved add-ons work like ever, including Vertical Toolbar.

Also Waterfox is fast and runs smooth, it behaves way smoother on my old laptop than FF Quantum, which I had installed testwise.

And, though the current Waterfox version is 56.1, it seems they are applying all the important security updates of Firefox 57 and later.

Conclusion: If you liked Firefox and now are missing some add-ons in Quantum, you’ll love Waterfox. Try it out. It is available for Windows, Linux, Android, Mac, … only for 64 bit systems, though.

Bye bye Firefox, hello Waterfox 🙂


Copying add-ons and settings.

When first starting Waterfox on Windows or Linux, it searches for an installed Firefox and tries to copy all the settings and add-ons and settings of the add-ons. This works not 100% with all add-ons. If some of your add-ons do not look or behave like they should, copy the settings from Firefox to Waterfox like described here, steps 3 to 8.

Installing Waterfox on Windows

Easy peasy. Just download and run the installer.

Installing Waterfox on Linux

Installing it on Linux is easy, though there are currently no official packages available for LXLE or Ubuntu. Just do this:

a. Download the tarball, then do the follwing in a shell

tar -xvjf ./waterfox.tar.bz2    
cd ./waterfox

b. Then you might want to add some desktop or menu entries. With a LXDE desktop you should do this:

cd ~/.local/share/applications
cp  some-other-internet-related.desktop waterfox.desktop

Then open waterfox.desktop in a plain text editor and adapt the entries. Important are Exec and Name.

More info about LXDE desktop stuff here.

Classic Add-Ons

Of course, FF will kick out classic extensions from its extension library. Classic AddOns is designed to help.

Rounded Corners With Online Image Editor

Lately, I wanted to put rounded corners onto an image. I couldn’t do this easily with several of my usual tools for images (Greenshot, Paint.Net, IrfanView).

To help came a free online image editor. Many languages can be selected, including german, english, spanish, bulgarian, japanese.
Rounding corners is simple. You can select the radius of the corner in pixels, the thickness of the border and the color of the border.

AWK One Liners

# Print field number 4, 5, and all the rest
awk '{$1=$2=$3=""; print $0}' 

# Split every line of the file x.txt at each comma
awk -F, '{for (i=1; i<=NF; i++) print $i}' x.txt

# Print only filenames of logfiles which contain a line matching /xyz/.
awk '/xyz/{print FILENAME; nextfile}' *.log

Trim leading and ending whitespace of field number two and print result. Attention, gsub does its work in place and returns the number of replacements. So you cannot use print gsub(/^[ \t]+|[ \t]+$/, "", $2);

awk '{gsub(/^[ \t]+|[ \t]+$/, "", $2); print $2}'

Put apostrophes around a field. I found no way to do this with awk in the shell. Instead, I came up with this:

awk '{printf("+%s+\n", $i)}' | tr + "'"

Split comma separated lines of texts from file 1.txt, trim leading and ending whitespace of fields and convert all into the middle part of an SQL-statement with LIKE.

awk -F, '{for (i=1; i <= NF; ++i) { gsub(/^[ \t]+|[ \t]+$/, "", $i); printf("+%s%s+ or artikel like \n", $i, "%")} }' 1.txt  | tr + "'"

Print filename, line number and line matching xyz in each file (instead of a total line nr). Didn’t find quickly a solution in awk, using find -exec:

find . -type f -exec  awk '/xyz/{print FILENAME, NR, $0}' {} \; 
# Use multiple characters -+. and space as field separators.   
awk -F'[-+ .]'     # The delimiter is a regular expression! 

# Print lines from match1 to match2.
awk '/match1/,/match2/'

# ... lines from mat1 to mat2, ignoring case in match expression.
awk 'tolower($0)~"mat1",tolower($0)~"mat2"'  # OR 
awk 'BEGIN{IGNORECASE=1}/mat1,mat2/'         # Only with gawk! 

More AWK help

Perment’s AWK One Liners
Tuxgraphics’ AWK One Liners
AWK One Liners Explained
Gnu AWK User’s Guide