I hereby claim:
- I am johanmeiring on github.
- I am johanmeiring (https://keybase.io/johanmeiring) on keybase.
- I have a public key whose fingerprint is 5572 17A5 BD5B 42C9 71B0 D40F A5CA 6E4F CBA6 3188
To claim this, I am signing this object:
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 |
#!/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 |
import exifread | |
import os | |
import re | |
import shutil | |
in_dir = "path" | |
out_dir = "path" | |
clean = False |
I hereby claim:
To claim this, I am signing this object:
from django.db import models | |
from django.utils import timezone | |
from django.contrib.auth.models import BaseUserManager, AbstractBaseUser, PermissionsMixin | |
class UserManager(BaseUserManager): | |
def create_user(self, email, first_name, surname, password=None): | |
if not email: | |
raise ValueError('Users must have an email address') |
#!/bin/bash | |
COUNTER=1 | |
rm ips | |
while [[ $COUNTER -lt 255 ]]; do | |
ping 192.168.254.$COUNTER -c 1 -W 1 && echo "192.168.254.$COUNTER" >> ips | |
COUNTER=$(( $COUNTER + 1 )) | |
done |
#!/bin/bash | |
for file in $(\ | |
find . -maxdepth 1 -type d | \ | |
egrep -v "\.$" | \ | |
sed -r 's/\.\///'); do | |
python manage.py schemamigration $file --auto | |
done | |
exit 0 |
#!/bin/bash | |
DEST=/root/BACKUPS | |
# Code to actually create backup files goes here... | |
# Check if we need to rotate the backup files. | |
FC=`ls ${DEST}/*.tar | wc -l` | |
if [[ $FC -gt 6 ]]; then | |
echo "Too many backup files. Deleting oldest one..." | |
DELETE_FILE=`ls -tr ${DEST}/*.tar | head -1` |
#!/bin/bash | |
# MySQL Replication Status Checker | |
# This script will run the SHOW SLAVE STATUS query on the specified server, and then report it if Last_IO_Errno or Last_SQL_Errno do not equal 0. | |
# Most effective when used as a cron job that runs once every minute. | |
# Version 0.1 | |
# DB Info | |
DBHOST=localhost | |
USERNAME=root | |
PASSWORD=lolololol |
# From http://garmoncheg.blogspot.com/2012/06/pretty-git-log.html | |
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --" |