Skip to content

Instantly share code, notes, and snippets.

Avatar

Gerry Weißbach gamma

View GitHub Profile
@gamma
gamma / dd-progress.sh
Created Mar 4, 2019
MacOS bash dd command with progress
View dd-progress.sh
function isodump {
FILE=$1
DISK=$2
if [ -z "$FILE" ] || [ -z "$DISK" ] ; then
echo "Usage: isodump <ISO File> <DEVICE>"
return 128
fi
@gamma
gamma / gradle4.rb
Last active Aug 2, 2021
Gradle 4 for homebrew
View gradle4.rb
# cat > /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gradle4.rb
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"
bottle :unneeded
def install
@gamma
gamma / maz.sh
Created Apr 26, 2018
Abzug der aktuellen Tageszeitung der MAZ Oberhavel
View maz.sh
#!/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 / upgrade.sh
Last active Aug 7, 2017
Rolling Update with docker-compose and old Swarm Image. Expects docker-compose.yml side-by-side
View upgrade.sh
#!/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 / README.md
Last active May 2, 2021
How to connect a docker container to the docker daemon on a Synology NAS
View README.md

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 / docker-plugin.hpi
Last active Dec 16, 2016
Jenkins CI Docker-Plugin with patch for Windows 2016 ssh connection
View docker-plugin.hpi
This file has been truncated, but you can view the full file.
@gamma
gamma / docker-compose.yml
Created Nov 6, 2016
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.
View docker-compose.yml
version: "2.0"
services:
dwarffortress:
container_name: dwarffortress
image: 'mifki/dfremote'
restart: always
tty: true
ports:
- 1235:1235/udp
volumes:
View gist:74998f1d9ca938662fa0
Verifying myself: My Bitcoin username is +gammaproduction. https://onename.io/gammaproduction
View keybase.md

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: