Skip to content

Instantly share code, notes, and snippets.

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

gthieleb

:octocat:
Volunteering
View GitHub Profile
@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:]: