Skip to content

Instantly share code, notes, and snippets.

View jlward's full-sized avatar

Jason Ward jlward

  • SchoolInks
  • Indianapolis, IN
View GitHub Profile
@jlward
jlward / test.py
Created February 3, 2015 17:29
nosedjango bleed-through
from django.test import TestCase, TransactionTestCase
from pstat.document_control.models import Document
class AAATestCase(TransactionTestCase):
fixtures = [
'test_customers.yaml',
'test_tenants.yaml',
'test_blocs.yaml',
'test_document_settings.json',
@jlward
jlward / setup_slave.sh
Created April 20, 2012 16:45 — forked from winhamwr/ramdisk_mysql.sh
Script to put mysqld on a ram disk in ubuntu 10.04. Also addes Active Directory groups to slapd. Runs on every hudson slave boot
sudo cp -r /home/hudson/.ssh /root/;
sudo chown -R root:root /root/.ssh;
sudo service mysql stop;
sudo cp -pRL /var/lib/mysql /dev/shm/mysql;
sudo echo "[mysqld]
datadir = /dev/shm/mysql
" > /tmp/ramdisk.cnf;
sudo mv /tmp/ramdisk.cnf /etc/mysql/conf.d/ramdisk.cnf;
sudo echo "
#!/bin/bash
# Located at: http://gist.github.com/359405
source $WORKSPACE/../../../virtualenvs/$JOB_NAME/bin/activate
./scripts/clean.sh;
# Delete the database so Django doesn't prompt us yes/no to continue
echo "CREATE DATABASE IF NOT EXISTS $JOB_NAME DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;" | mysql -u root;
echo "DROP DATABASE IF EXISTS test_$JOB_NAME;" | mysql -u root;