Skip to content

Instantly share code, notes, and snippets.

- name: "Get Repo"
run: |
git=/usr/bin/git
refs="refs/remotes/origin/$GITHUB_REF_NAME"
echo "cloning repo: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
echo " from branch: $GITHUB_REF_NAME"
echo " commit: ${GITHUB_SHA}"
tokenkey="http.${GITHUB_SERVER_URL}/.extraheader"
AUTH=$( echo -n "x-access-token:${GITHUB_TOKEN}" | base64 )
#
@jwalzer
jwalzer / aap_install.yml
Created October 13, 2022 08:12
AAP2-Installation: Remount /var/tmp und tmp are -o exec for installation and restore safely
- name: Install AAP components
hosts:
- bootstrap_node
- aap_nodes
tasks:
- name: get current state of mountpoints
ansible.builtin.set_fact:
#!/bin/bash
#
# rsync_backups.bash
# a simple script helping to get your rsync backups right
# This works for me and does exactly one job for me ...
#
# WARNING! WARNING!
# Only use this in trustworthy environment!
# All configfiles and jobfiles are trusted and are sourced directly.
#

Keybase proof

I hereby claim:

  • I am jwalzer on github.
  • I am jwalzer (https://keybase.io/jwalzer) on keybase.
  • I have a public key ASDav_BW88OpcvRFplSx2J6qu516UNIbuuBfG0iXA3z5FQo

To claim this, I am signing this object:

@jwalzer
jwalzer / git fetch merge-requests - bulk edit.bash
Last active June 10, 2021 08:37
crazy little Bash-oneliner that adds merge-request fetching to all git repos in current directory - beware of hack!
find . -name .git | while read -r DIR; do ( cd "${DIR%%/.git}"; echo "${DIR%%/.git}"; grep -v "refs/remotes/origin/merge-requests" .git/config | (ORIGIN=""; while read -r A B C D; do case "$A" in \[remote) printf '%s\n' "$A $B"; if [[ "$B" = '"origin"]' ]]; then ORIGIN="YES" ; fi;; \[*) printf '%s\n' "$A $B" ;;fetch) printf '\t%s\n' "$A $B $C $D"; if [[ "$ORIGIN" = "YES" ]] ; then printf '\t%s\n' "fetch = +refs/merge-requests/*:refs/remotes/origin/merge-requests/*"; fi ;;*) printf '\t%s\n' "$A $B $C $D" ;;esac;done) > .git/config.tmp; echo "${DIR%%/.git}: done"; mv .git/config.tmp .git/config) & done
#!/bin/bash
declare -a HOSTIPS=(
10.10.0.101
10.10.0.102
10.10.0.103
10.10.0.104
10.10.0.105
10.10.0.106
10.10.0.107
@jwalzer
jwalzer / nginx.conf
Created February 28, 2021 23:15 — forked from nrollr/nginx.conf
NGINX config for SSL with Let's Encrypt certs
# UPDATED 17 February 2019
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
listen [::]:80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
}
# SSL configuration
@jwalzer
jwalzer / delete-from-v2-docker-registry.md
Created December 17, 2020 10:00 — forked from jaytaylor/delete-from-v2-docker-registry.md
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
@jwalzer
jwalzer / mtu.bash
Created November 26, 2020 08:18
Bisect the MTU to a host via Ping
#!/bin/bash
STDERR() {
echo "$*" > /dev/stderr
}
LOGnAct=0
LOG() {
if [[ "$LOGnAct" == 1 ]]
then
@jwalzer
jwalzer / mtusize.sh
Created November 24, 2020 12:50 — forked from sebastianw/mtusize.sh
MTU Size
function mtusize {
#set -x
[ -z "$1" ] && { echo "mtusize <host> [<initial data size> <step length>]"; return 1; }
ip=$1
size=${2:-1345}
step=${3:-64}
count=0
minfailed=999999
rstring=("" " failed")
while true; do