Deluge Docker Compose

---
version: "2.1"
services:
  deluge:
    image: ghcr.io/linuxserver/deluge
    container_name: deluge
    environment:
      - PUID=1001
      - PGID=1001
      - TZ=$TZ
      - DELUGE_LOGLEVEL=error #optional
    volumes:
      - $HOME/source/deluge:/config
      - /mnt:/downloads
    ports:
      - 8112:8112
      - 6881:6881
      - 6881:6881/udp
    restart: unless-stopped

FindTheClosest

public class FindTheClosest {

    private final Number target;
    private final Number[] numbers;

    public FindTheClosest(Number target, Number[] numbers) {
        this.target = target;
        this.numbers = numbers;
    }

    public Number execute() {
        Stream<Number> stream = Arrays.stream(numbers);
        Optional<Number> optional = stream.min(Comparator.comparing(number -> {
            double delta = target.doubleValue() - number.doubleValue();
            return delta == 0 ? Integer.MAX_VALUE : Math.abs(delta + 1F / Integer.MAX_VALUE);
        }));
        return optional.orElse(target);
    }
}

Autostart Kodi on Raspbian

This is the /etc/systemd/system/kodi.service unit file:

[Unit]
Description = Kodi Media Center

# if you don't need the MySQL DB backend, this should be sufficient
After = systemd-user-sessions.service network.target sound.target

# if you need the MySQL DB backend, use this block instead of the previous
# After = systemd-user-sessions.service network.target sound.target mysql.service
# Wants = mysql.service

[Service]
User = kodi
Group = kodi
Type = simple
ExecStart = /usr/bin/kodi-standalone
Restart = always
RestartSec = 15

[Install]
WantedBy = multi-user.target

To install, enable and run the service:

systemctl daemon-reload
systemctl enable kodi.service
systemctl start kodi.service

The kodi user was created witht the following commands:

adduser --disabled-password --gecos "User to run Kodi Media Center" kodi
adduser kodi audio
adduser kodi video
adduser kodi plugdev
adduser kodi input

JDownloader.org – Terminal User Interface

Terminal User Interface

Conceptual Ideas

The idea about the terminal implementation is that on any computer (Windows, Linux, Linux server edition, Unix,…) the application can be ran the old-skool way, using command line aka terminals. The ideas explained on this page are only conceptual ideas so far. Implentation hasn’t started yet on this topic and even if it was those conceptual ideas stay conceptual.

Running JD

Continue reading “JDownloader.org – Terminal User Interface”

Rekomendasi Printer

Hallo,

Sedikit rekomendasi untuk printer rumahan. Kemarin baru saja beli printer Canon MP 287, cukup bagus dan sudah dilengkapi dengan sistem tinta infus. Setelah itu browsing2 tentang kriteria printer yang baik. Canon sendiri dengan thermal head print teknologi + infus sudah lebih dari cukup untuk penggunaan rumahan.Thermal print head menggunakan elemen panas untuk memuaikan dan mengeluarkan tinta dari catridge. Setelah menggunakan untuk keperluan pribadi ternyata kurang. Mengapa saya bisa katakan kurang? Continue reading “Rekomendasi Printer”