Qt Creator 4.9 uses KSyntaxHighlighting

As you can read in the official Creator 4.9.0 release announcement, Qt Creator now uses the KSyntaxHighlighting Framework for providing the generic highlighting.

This is a nice step for the wider adoption of this MIT licensed part of the KDE Frameworks.

And this is not just an one-way consumption of our work.

The framework got actively patches back that make it more usable for other consumers, too, like Kate ;=)

If you want concrete examples, take a look at:

I hope this cooperation will continue in the future. I thank the people working on Qt Creator that made this integration possible. I hope the initial effort will pay of with less code for them to maintain on their own and more improvements of the framework for all users.

Removing Files from Git History

Today I did run again into an old problem: You need to archive a lot small and large files inside a single Git repository and you have no support for Git LFS available. You did this several year and now you ended up in a state where cloning and working with the repository is unbearable slow.

What now? Last time I did run into that, I archived the overfull repository to some “rest in peace” space and used git filter-branch to filter out no longer needed and too large objects from a repository copy that then will replace the old one for daily use.

There are a lot of guides available how to use git filter-branch for that. All variants I ever used were complex to do and did take very long. Especially if you need several tries to get a sane set of stuff you want to remove to gain enough space savings.

This time, I searched once more and stumbled on the BFG Repo-Cleaner. And yes, it does what it promises on the web site and it seems to be trusted enough to be advertised by e.g. GitHub, too.

Just following the steps described on their landing page allows to shrink your stuff nicely and without a lot of round-trip time.

If you still are just in the “experimenting” phase to see which space decrease one can archive with which file size filter (or which files you want to purge by removing them from master before running the tool), I recommend to swap the step

git reflog expire –expire=now –all && git gc –prune=now –aggressive

with just

git reflog expire –expire=now –all && git gc –prune=now

to not wait potential hours for the aggressive GC. For me that was good enough to get some estimate of the later size for my experiments before I settled to some final settings and did the real run.

And as always, if you touch your Git history: Do that only if you really need to, keep backups, check carefully that afterwards the repository is in some sensible state (git fsck --strict is your friend) and inform all people using that repository that they will need to do a full new clone.

Kate History – KDE 4 Porting

During my web site upgrade, I reviewed the old stuff I had hosted on my long gone web sites but still archived here locally. An interesting thing I stumbled on are the KDE 3 -> 4 porting screenshots of Kate I saved in 2005.

They actually show pretty nicely how far we have gone since 2005 with our development stack.

The KDE 3 -> 4 transition was a large hassle. It did take weeks of work just to get Kate back into an usable state.

We first started with some trivial KTextEditor container (a mini KWrite) for the porting to get KTextEditor at all doing something. That started out with something that even had no menu or toolbars working:

This evolved after two days into a kind of working KWrite port (icons still randomly missing):

After the KTextEditor part did work “reasonable”, we started with Kate:

And ended up with an initial ported prototype three days later:

And after that a long time of actual polishing for KDE 4.0 did start. Kate was actually one of the first ported applications during the KDE 3 -> 4 transition.

The KDE 4 -> KF5 transition was much nicer, even thought the Frameworks split did cost a lot of time and resources. But the actual changes to the application code bases were not that radical.

And where did we end up with this ~14 years later? Actually, just here:

It is still recognizable the same application, thought I hope some progress is visible :=)

Web-Server Transition

Several years the kate-editor.org & cullmann.io pages got hosted on a Hetzner root server. To reduce costs and switch away from old hardware they got now moved to a OpenVZ based virtual server at Host Europe.

On both servers CentOS 7.x is running, it did always provide a stable foundation of the web services.

As with any server move in the past, I always need to search how to best move the data/config from one server to the other. To document this for me and others, here the quick way to move the basic things needed for web services using just plain Apache & MariaDB.

The following steps assume you have installed the same packages on both machines and the new machine is allowed to ssh as root to the old one. If you have non-system users, you should create them with the same ids as on the old server.

For the following shell commands, the old server address is $SERV and the MariaDB root password is $PASS on both machines. Best use the raw IP as address if you are in parallel updating your DNS entries to avoid confusion (and wrong syncs).

Attention: Wrong syncing of stuff can have disastrous consequences! Check all commands again before executing them, don’t trust random people like me without verification!

  • sync your data, assuming it is in /home and /srv/(ftp/www)

rsync –delete -av root@$SERV:/home/ /home
rsync –delete -av root@$SERV:/srv/ftp /srv
rsync –delete -av root@$SERV:/srv/www /srv

  • transfer your databases

ssh root@$SERV “mysqldump -u root -p$PASS –all-databases > /root/db.sql”
scp root@$SERV:/root/db.sql /root/
mysql -u root -p$PASS < /root/db.sql

  • sync configs (you might need more, this is just apache & vsftp)

rsync –delete -av root@$SERV:/etc/httpd /etc
rsync –delete -av root@$SERV:/etc/letsencrypt /etc
rsync –delete -av root@$SERV:/etc/vsftpd /etc

  • get crontabs over for later re-use, store them in the root home

rsync –delete -av root@$SERV:/var/spool/cron /root

Now all things should be there and after some service restarts e.g. WordPress powered pages should be up-and-running again.

I hope this short how-to helps others and allows me to avoid searching stuff in the future once again from scratch.

Scroll to top