Skip to content

Instantly share code, notes, and snippets.

View akisys's full-sized avatar

Alexander Kuemmel akisys

  • AK Information Systems
View GitHub Profile
@akisys
akisys / azure-bastion-connect.sh
Created May 11, 2023 16:04
Use Azure Bastion with ssh-user-config blocks
#!/usr/bin/env bash
set -fu
destination="${1:-""}"
port="${2:-"8122"}"
timeout="${3:-""}" # this will auto-terminate the azure bastion tunnel after this many seconds
azure_bastion_opts=""
@akisys
akisys / dockerhub-tags.sh
Last active July 27, 2023 18:25
docker-hub-tags-retrieval
#!/usr/bin/env bash
set -fue
[ "${DEBUG:-"NO"}" = "YES" ] && set -x
_ZIP=0
_DOCKERFILE=0
case "${1:-""}" in
@akisys
akisys / load-module-from-arbitrary-file.py
Created August 4, 2021 07:12
Load arbitrary Python files as Modules
import sys
import os.path
EXT_MODS = dict(
# module_name => file_path
cfggen="/usr/local/bin/sonic-cfggen",
configlet="/usr/bin/configlet"
)
if sys.version_info >= (3, 5):
@akisys
akisys / lwp-cloudflare-dyndns.sh
Last active December 20, 2019 16:27 — forked from Firsh/lwp-cloudflare-dyndns.sh
Cloudflare as Dynamic DNS
#!/bin/bash
# Cloudflare as Dynamic DNS
# From: https://letswp.io/cloudflare-as-dynamic-dns-raspberry-pi/
# Based on: https://gist.github.com/benkulbertis/fff10759c2391b6618dd/
# Original non-RPi article: https://phillymesh.net/2016/02/23/setting-up-dynamic-dns-for-your-registered-domain-through-cloudflare/
# Update these with real values
auth_token="${CF_TOKEN:-"[email protected]"}"
zone_name="${CF_ZONE:-"example.com"}"
record_name="${CF_RECORD:-"home.example.com"}"
@akisys
akisys / osx-for-hackers.sh
Created May 31, 2016 08:58 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'