Skip to content

Instantly share code, notes, and snippets.

View gamma's full-sized avatar

Gerry Weißbach gamma

View GitHub Profile

Keybase proof

I hereby claim:

  • I am gamma on github.
  • I am gamma (https://keybase.io/gamma) on keybase.
  • I have a public key whose fingerprint is 37F1 7233 0AC5 EC85 9B28 5EE7 9547 1032 7DBC FDD4

To claim this, I am signing this object:

@gamma
gamma / gist:74998f1d9ca938662fa0
Created August 11, 2014 07:19
OneName Verification
Verifying myself: My Bitcoin username is +gammaproduction. https://onename.io/gammaproduction
@gamma
gamma / docker-compose.yml
Created November 6, 2016 13:12
Docker-Compose file to run a dwarffortress box Side-by-Side with Dropbox. Start Dropbox first and check the log to Connect to an account. You should use a fresh Dropbox account if possible.
version: "2.0"
services:
dwarffortress:
container_name: dwarffortress
image: 'mifki/dfremote'
restart: always
tty: true
ports:
- 1235:1235/udp
volumes:
@gamma
gamma / docker-plugin.hpi
Last active December 16, 2016 05:59
Jenkins CI Docker-Plugin with patch for Windows 2016 ssh connection
This file has been truncated, but you can view the full file.
@gamma
gamma / README.md
Last active July 31, 2024 03:13
How to connect a docker container to the docker daemon on a Synology NAS

Note: This originates from: https://forum.synology.com/enu/viewtopic.php?f=258&t=107508&sid=78d911737c5ecea1f9087bdab13612bf&start=15#p478281

Here are steps that I have modified to work for me. This assumes you have a shared folder named "docker" in volume1.

We need to Symlink /var/run/docker.sock to /volume1/docker/docker.sock, because Synology Docker GUI will not be able to run it when it's pointed directly to /var/run/docker.sock. Also the symlink needs to persist after reboot. To make it do so, you will need to create an automated task in your Synology DSM via "Task Scheduler".

  • Go to "Control Panel" > "Task Scheduler".
  • Click "Create" > "Scheduled Task" > "User-defined Script".
  • On the "Create Task: Window, make sure "User:" is selected as "root" and rename the "Task:" to whatever you like.
  • Click "Schedule" tab. Under "Date - Run on the following days", select "Daily". Under "Time - Frequency", select "Every 1 hour(s)" (just to be on the safe side).
@gamma
gamma / upgrade.sh
Last active August 7, 2017 04:40
Rolling Update with docker-compose and old Swarm Image. Expects docker-compose.yml side-by-side
#!/bin/bash
# Use the command line arguments as input. Each argument is a service.
SERVICE_LIST=`echo "$@" | tr ' ' '\n'`
if [ -z "${SERVICE_LIST[@]}" ]; then
SERVICE_LIST=`docker-compose config --services`
fi
# Check for all services in the compose file, scale them to "two"
echo "+++++++++++++++++++++++++"
@gamma
gamma / maz.sh
Created April 26, 2018 05:29
Abzug der aktuellen Tageszeitung der MAZ Oberhavel
#!/bin/bash
USER="$1"
PASS="$2"
BASE="https://epaper.maz-online.de"
LOGIN=$(curl -v $BASE 2>&1)
COOKIE=$(echo "$LOGIN" | grep "Set-Cookie" | tail -n 1 | awk '{print $3}')
TOKEN=$(echo "$LOGIN" | grep "token" | awk -F\" '{print $6}')
@gamma
gamma / gradle4.rb
Last active May 4, 2022 13:27
Gradle 4 for homebrew
# cat > /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gradle4.rb
# brew install --build-from-source gradle4
class Gradle4 < Formula
desc "Open-source build automation tool based on the Groovy and Kotlin DSL"
homepage "https://www.gradle.org/"
url "https://services.gradle.org/distributions/gradle-4.10.3-all.zip"
sha256 "336b6898b491f6334502d8074a6b8c2d73ed83b92123106bd4bf837f04111043"
# not needed in newer gradle releases
# bottle :unneeded
@gamma
gamma / dd-progress.sh
Created March 4, 2019 09:38
MacOS bash dd command with progress
function isodump {
FILE=$1
DISK=$2
if [ -z "$FILE" ] || [ -z "$DISK" ] ; then
echo "Usage: isodump <ISO File> <DEVICE>"
return 128
fi
# cat > /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/[email protected]
class GradleAT6 < Formula
desc "Open-source build automation tool based on the Groovy and Kotlin DSL"
homepage "https://www.gradle.org/"
url "https://services.gradle.org/distributions/gradle-6.9.1-all.zip"
sha256 "b13f5d97f08000996bf12d9dd70af3f2c6b694c2c663ab1b545e9695562ad1ee"
license "Apache-2.0"
bottle do
sha256 cellar: :any_skip_relocation, x86_64_linux: "fd167292281521adf832093bbc0485f5a03e82c9962039f54f12e59d0d2dce1b"