Skip to content

Instantly share code, notes, and snippets.

View gthieleb's full-sized avatar
:octocat:
Volunteering

Gunnar Thielebein gthieleb

:octocat:
Volunteering
View GitHub Profile
@ThinGuy
ThinGuy / ci-rerun.sh
Created September 25, 2022 20:56
Re-run cloud-init without reboot (run as root if UID 1000 did not get setup on Ubutnu)
#!/bin/bash
cloud-init clean --logs
cloud-init init --local
cloud-init init
cloud-init modules --mode=config
cloud-init modules --mode=final
@filipenf
filipenf / convert-and-test.sh
Last active March 28, 2023 20:39
Script to convert an ansible vault into a yaml file with encrypted strings
#!/bin/bash
#Vault password is 1
echo "Converting vault to yaml format:"
ansible-vault decrypt --output - vault | python ./convert_vault.py > new-vault.yml
echo "Decrypting a variable from the converted vault"
ansible localhost -i localhost, -e @new-vault.yml -m debug -a 'var=secret' --ask-vault-pas
@gthieleb
gthieleb / exif2date.py
Created June 27, 2017 07:23
Set mtime/atime for photos extracted from exif time date
#!/usr/bin/env python
import sys
import exifread
import time
from os import path, utime
k = 'EXIF DateTimeOriginal'
for fn in sys.argv[1:]: