Skip to content

Instantly share code, notes, and snippets.

View nderjung's full-sized avatar
🥑

Alexander Jung nderjung

🥑
View GitHub Profile
@nderjung
nderjung / keybase.md
Last active September 22, 2017 12:20

Keybase proof

I hereby claim:

  • I am a1exanderjung on github.
  • I am alexanderjung (https://keybase.io/alexanderjung) on keybase.
  • I have a public key ASA2GY_YkGY5vYxEAU-vYktsGchBql5JxhVC8wDlF9LDyAo

To claim this, I am signing this object:

@nderjung
nderjung / fix-muffly-headset.sh
Created December 25, 2017 18:55
Fix a muffled bluetooth headset
# Determine the profile index by
pacmd list-cards
# Set the audio profile to a2dp sink (replace 6 with profile index):
pacmd set-card-profile 6 a2dp_sink
@nderjung
nderjung / pubs-remove-underscores.sh
Last active March 11, 2019 16:44
Remove underscores from pubs/pubs entries
#!/bin/bash
for old in `pubs list | grep -Po '\[\K[^]]*'`; do
new=`echo $old | sed -r 's/_//g'`
pubs rename $old $new
done
@nderjung
nderjung / reset-proxmox-cluster.sh
Created March 12, 2019 16:24
Reset proxmox cluster
#/bin/bash -xe
systemctl stop pvestatd.service
systemctl stop pvedaemon.service
systemctl stop pve-cluster.service
systemctl stop corosync
systemctl stop pve-cluster
sqlite3 /var/lib/pve-cluster/config.db "delete from tree where name = 'corosync.conf';"
@nderjung
nderjung / list-grub-entries.sh
Created April 26, 2019 15:28
List grub entries
awk -F\' '$1=="menuentry " || $1=="submenu " {print i++ " : " $2}; /\tmenuentry / {print "\t" i-1">"j++ " : " $2};' /boot/grub/grub.cfg
@nderjung
nderjung / post-receive.d-mirror.sh
Created May 17, 2019 12:01
Git mirror via post-receive hook
#!/bin/sh
[email protected]:nderjung/my-cool-mirror.git
SSH_KEY=~/.ssh/id_my_cool_mirror
GIT_DIR=${GIT_DIR:-$(dirname $0)}
GIT_SSH_COMMAND="ssh -i $SSH_KEY -F /dev/null -oStrictHostKeyChecking=no" git push --mirror $GIT_REMOTE_REPO
@nderjung
nderjung / crypt_unlock.sh
Created May 30, 2019 17:38 — forked from gusennan/crypt_unlock.sh
initramfs-hook for unlocking LUKS-encrypted LVM partition
#!/bin/sh
PREREQ="dropbear"
prereqs() {
echo "$PREREQ"
}
case "$1" in
prereqs)
[Definition]
failregex = no user/password was provided for basic authentication.*client: <HOST>
user .* was not found in.*client: <HOST>
user .* password mismatch.*client: <HOST>
ignoreregex = </host></host></host>
[nginx-auth]
enabled = true
filter = nginx-auth
action = iptables-multiport[name="nginxauth", port="http,https", protocol="tcp"]
@nderjung
nderjung / clean-git-submodules.sh
Created June 13, 2019 21:41
Clean git submodules
#!/bin/bash
# Context: you have a number of git submodules and those git repositories
# are now dirty with build artifacts. To completely clean the submodules
# and reset them to their original clone state, perform the following:
git submodule foreach 'git fetch origin; git checkout $(git rev-parse --abbrev-ref HEAD); git reset --hard origin/$(git rev-parse --abbrev-ref HEAD); git submodule update --recursive; git clean -dfx'
From 97b4f22565ce0aed81c633295c30a591051e37ee Mon Sep 17 00:00:00 2001
From: Haris Rotsos <[email protected]>
Date: Tue, 14 May 2019 21:51:34 +0000
Subject: [PATCH 1/2] got a first xensocket functioality that compiles but
still needs work to complete
---
Makefile | 9 +-
include/xensocket.h | 102 +++++
stub.mk | 1 +