This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Extract Kubernetes Custom Resource Definitions (CRDs) from the raw output of `kubectl get crds -o yaml` for use by | |
IntelliJ Ultimate. | |
""" | |
# Crown Copyright (Government Digital Service) | |
# Released under the MIT license | |
import argparse | |
import os | |
import sys | |
import yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I, for one, am ready to be polite to our new robot overlords. | |
eval $(thefuck --alias oops) | |
alias please=sudo | |
# Prompt with colors and git branch information | |
if [[ $(id -u -n) != "<username>" ]]; then | |
USERNAME_STRING='\[\033[0;32m\]\u' | |
else | |
USERNAME_STRING='' | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
"""update_register.py | |
Usage: | |
update_register.py [-h] FILENAME | |
""" | |
from docopt import docopt | |
import openpyxl | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qemu-img convert image.qcow2 image.raw | |
sudo kpartx -av image.raw | |
mkdir temp | |
sudo mount /dev/mapper/loop0p2 temp | |
... | |
sudo umount temp | |
sudo kpartx -dv /dev/loop0 | |
qemu-img convert -c -f raw -O qcow2 image.raw image-patched.qcow2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
email = git@bgill.eu | |
name = Benjamin Gill | |
signingkey = C3EAA99A1E587915 | |
[push] | |
default = simple | |
[pull] | |
ff = only | |
[alias] | |
# Aliases for laziness - fewer characters |