Skip to content

Instantly share code, notes, and snippets.

View the1ts's full-sized avatar

Paul Mansfield the1ts

View GitHub Profile
@ljm42
ljm42 / fix_docker_client
Created September 1, 2019 16:38
Temporary fix the Docker client for Unraid
#!/bin/bash
# Version 1.0
# Latest version of this script: https://gist.github.com/ljm42/74800562e59639f0fe1b8d9c317e07ab
# This script was tested on Unraid 6.7.2, although it will likely work in previous versions as well. It should not be needed in 6.8
# It will solve the problem reported here: https://forums.unraid.net/bug-reports/stable-releases/dockers-wanting-to-update-but-dont-in-the-end-r618/
# where due to changes in the Docker Hub API, the Unraid Docker client reported that certain Dockers needed to be updated.
# Thanks for @bluemonster for coming up with the fix!
@jmound
jmound / refresh.sh
Last active August 7, 2023 10:33
Bash function to refresh all pods in all deployments by namespace
# based on the "patch deployment" strategy in this comment:
# https://github.com/kubernetes/kubernetes/issues/13488#issuecomment-372532659
# requires jq
# $1 is a valid namespace
function refresh-all-pods() {
echo
DEPLOYMENT_LIST=$(kubectl -n $1 get deployment -o json|jq -r .items[].metadata.name)
echo "Refreshing pods in all Deployments"
for deployment_name in $DEPLOYMENT_LIST ; do
@itay-grudev
itay-grudev / README.md
Last active March 19, 2021 19:53
BT WiFi Maintain Connectivity Script

BT WiFi Maintain Connectivity Script

Usage

btauth --user USER_OR_EMAIL --pass PASSWORD # To Authenticate with the BT WiFi
btmaintain --user USER_OR_EMAIL --pass PASSWORD # To maintain a connection and re-authenticate automatically
nohup btmaintain --user USER_OR_EMAIL --pass PASSWORD 2>&1 >/dev/null & # Same as above but ran in background
@cabal95
cabal95 / vm-backup.sh
Created July 25, 2015 17:53
I use this script to backup my QEMU/KVM/libVirt virtual machines. The script requires KVM 2.1+ since it uses the live blockcommit mode. This means the data in the snapshot disk is rolled back into the original instead of the other way around. Script does NOT handle spaces in paths.
#!/bin/bash
#
BACKUPDEST="$1"
DOMAIN="$2"
MAXBACKUPS="$3"
if [ -z "$BACKUPDEST" -o -z "$DOMAIN" ]; then
echo "Usage: ./vm-backup <backup-folder> <domain> [max-backups]"
exit 1
@sscarduzio
sscarduzio / relog.sh
Created August 24, 2014 21:20
BtWiFi_with_FON automatic login written as a bash script. I have this running every 10 minutes on my raspberry pi
#!/bin/bash
# CONF
DBG=true
RELOG_UNAME=your@email.com
RELOG_PASSW=xxxxxxxxxxxxxxx
# END CONF