-
Tenant resource authorization in JAX-RS
You have a book REST resource and each book has an owner. Only the owner of the book can access an owned book. JAX-RS specification has no answer to this problem since it only provides a role based security with @RolesAllowed annotation. It is unfortunate JavaEE spec does not offer at last some interfaces which…
-
Creating a new torrent and seeding with Transmission
You have setup a Transmission server on your Linux box together with Transmisison Web or something along those lines and now you are wondering.. how can I actually seed a NEW file? I couldn’t find a straightforward answer on the web so here is the short tutorial: Upload your file to your transmission download directory…
-
Ubuntu 18.04 on MacBook Pro 11.5 – a sad state of affairs
There was an extra MacBook Pro 11.5 lurking around so I decided to install Ubuntu 18.04 on it and try to setup a usable workstation. A culmination of several issues prompted me to not pursue this setup further. Linux drivers and MacBook hardware just don’t play along very well. Display flickering/corruption on main display The…
-
Xrandr framebuffer and per-display scaling
Ubuntu 18.04 LTS came out recently with Gnome desktop as default. Unfortunately even in 2018, it won’t remember the external monitor positioning after reboot and has no support in display settings to set per-display scaling. Year of the Linux desktop, anyone? Xrandr is a powerful Linux tool to manipulate displays. Unfortunately, the man page is…
-
Can JPA @Version column be nullable?
When using @Version with yor JPA entities you might be wondering, should you make the column nullable or not? There is no answer to this question in the documentation or the internet in general. The only way to find out was to test it. The answer is: column has to be not-null, at least for…
-
Running multiple PHP versions and compiling from source
We had a peculiar situation where both PHP5 and PHP7 were needed at the same time on a FreeBSD server. It was also prohibitive to get root or sudo access on the managing account. The solution was to compile PHP from source with fpm, run fpm on a UNIX socket and wire the specific domain…
-
Centos Docker unable to unmount on stop/start
Error looks something like Error response from daemon: driver “overlay” failed to remove root filesystem for 805c245dad451542b44bb1b58c60887fa98a64a61f2f0b8de32fa5b13ccc8ce4: remove /var/lib/docker/overlay/8f666b802f418f4a3dc4a6cafbefa79afc81491a5cb23da8084dd14e33afbea0/merged: device or resource busy It usually appears when stopping and starting a container. It results in Docker container not being able to start or starts in a weird dead/removed state. Issue is presumably fixed in Centos…
-
Lib packaging for your own repo
This is a note to self about the release procedure and distro packaging of a development library. This instructions expect aptly and createrepo to be preinstalled on your repo server together with a valid GPG key. Packaging a .deb 1. Checkout the release tag and build the deb according to README. Each build should be…
-
Analysis of BNETD and Blizzard
This is a Lawmeme article posted by Ernest Miller in 2002 bringing a detailed look in the Blizzard v Bnetd case. Since the original website no longer exists on the web I decided to post it here for preservation. You can view the original on this archive.org link. On February 17th, Vivendi sent a…
-
Bashmagic collection vol1
Keep only last X lines of a file (shrink). echo "$(tail -n 10000 huge.log)" > huge.log Deploy maven artefact to a specific repo without specifying it in pom.xml (format repoId:default:repoUrl). Repo should be specified in your .m2 settings.xml with any necessary credentials. mvn deploy -DaltDeploymentRepository=repo.mydomain.com.my.releases::default::https://repo.mydomain.com/repository/maven-my-releases/ One liner to set password for default PostgreSQL user after…