Skip to content

Instantly share code, notes, and snippets.

@Xabibax
Xabibax / README.md
Created March 19, 2025 14:03 — forked from mosquito/README.md
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@Xabibax
Xabibax / VersionNumberComparator.java
Created November 18, 2022 08:35 — forked from adamcbuckley/VersionNumberComparator.java
A java.util.Comparator for version (or chapter) numbers, which have an arbitrary number of decimal points.
package com.hebdensoft;
import java.util.Comparator;
/**
* <p>A java.util.Comparator for version (or chapter) numbers, which have an arbitrary number of decimal points.</p>
* <p>The code was taken from https://bugs.openjdk.java.net/browse/JDK-8134512 and http://cr.openjdk.java.net/~igerasim/8134512/04/webrev/index.html</p>
* <p>How to use:</p>
* <p><code>myListOfVersionNumbers.sort(VersionNumberComparator.getInstance());</code></p>