Skip to content

Instantly share code, notes, and snippets.

View gamma's full-sized avatar

Gerry Weißbach gamma

View GitHub Profile
@gamma
gamma / relocate.sh
Created November 15, 2021 10:45
SVN relocate for a list of directories
#!/bin/bash
# This script is used to relocate a Subversion repository from one
# filesystem location to another. It is intended to be run from the
# command line, but it can be run from any other program too.
# You can prepare the new repository location using:
#
# export NEW_SVN_LOCATION=file:///path/to/new/repository
#
# The script can be run using the following command - The list
@gamma
gamma / ImageReadTest.java
Created March 22, 2022 19:25
Adoptium JVM Docker Crash with OpenJPEG2k / JNR JFFI
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.Arrays;
import javax.imageio.ImageIO;
import javax.imageio.spi.IIORegistry;
@gamma
gamma / install-printer.sh
Last active September 29, 2022 06:43
Install alpine PDF printer
#!/bin/bash
# run with:
# curl -sSL https://gist.githubusercontent.com/gamma/a089aed5277cc727f9ccee01c4f8d1c6/raw | sh --
# Add testing repo
echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
# Install cups
apk add cups cups-libs cups-pdf@testing cups-client cups-filters hplip@testing
@gamma
gamma / rsync
Created June 13, 2023 06:12
Create Backup from Hetzner Storage Box to Synology DSM using ActiveBackup For Business
#!/bin/bash
# Backing up a Hetzner Storage box TO the Synology DSM does not work easily due to
# the special rsync paths requhired by Hetzner which is /home as root. However, Synology
# does not allow the and requests the path // - which is basically the root. Hetzner
# not allow that in turn. This script solves the issue by being a wrapper to rsync,
# which modifies the command to reflect that change.
#
# Script is provided as is, for free, no guarantees given. Use at your own risk.
#