Skip to content

Instantly share code, notes, and snippets.

View johanmeiring's full-sized avatar

Johan Meiring johanmeiring

  • Pretoria, South Africa
View GitHub Profile
@johanmeiring
johanmeiring / photototo.py
Last active August 29, 2015 14:06
Walk through dir, collect JPGs, copy to destination with timestamp as name, with duplicate detection.
import exifread
import os
import re
import shutil
in_dir = "path"
out_dir = "path"
clean = False
@johanmeiring
johanmeiring / build-vms.sh
Created February 9, 2015 06:15
VirtualBox Ubuntu VM creation from command line
#!/bin/bash
# Example file line:
# VM name,Group,MAC Address,RAM,Procs,HDD,VRDP port
# sf-mc-01,Group,080027EF99DD,512,1,6000,9007
if [[ ! -e $1 ]]; then
echo "File $1 not found."
exit 1
fi
@johanmeiring
johanmeiring / gist:935dc22ba8224184095824f9c7c80257
Created April 6, 2016 20:29
Ansible on Windows via Vagrant
vagrant init withinboredom/Trusty64
vagrant ssh
sudo apt-get update
sudo apt-get install -y language-pack-en git python-dev python-pip libkrb5-dev
sudo locale-gen en_US.UTF-8
cd /home/vagrant && git clone git://github.com/ansible/ansible.git --recursive
sudo pip install paramiko PyYAML Jinja2 httplib2 six "pywinrm>=0.1.1" kerberos
echo "source /home/vagrant/ansible/hacking/env-setup" >> /home/vagrant/.bashrc