View machine_setup.sh
#!/bin/bash
# Gist available at: https://gist.github.com/winhamwr/3bad9f4e05885b599a4e
set -e;
export JOB_IDLE_TIMEOUT=60
make --makefile=$WORKSPACE/scripts/hudson/Makefile log_job_started_for_idle_shutdown;
sudo apt-get update;
sudo apt-get install -y;
sudo apt-get install -y build-essential linux-headers-$(uname -r) nfs-kernel-server dkms dpkg-dev;
View exporter.py
import base64
import logging
import cgi
import logging
import os
import posixpath
import re
import subprocess
import time
from tempfile import NamedTemporaryFile
View out.log
vagrant up dev
Bringing machine 'dev' up with 'virtualbox' provider...
==> dev: Loading Berkshelf datafile...
==> dev: Sharing cookbooks with VM
==> dev: Couldn't find Cheffile at ./Cheffile.
==> dev: Updating Vagrant's Berkshelf...
The following berks command failed to execute:
/opt/chefdk/bin/berks vendor /home/wes/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150126-5078-1e0wj59-dev --berksfile /home/wes/policystat/workspace/pstat/Berksfile
View calc.py
from __future__ import division
from django.db.models import Count
system_setting_pks = list(
Customer.objects.annotate(
tenant_count=Count('tenant_set')
).filter(tenant_count__gt=1).values_list('settings__pk', flat=True)
)
num_systems = len(system_setting_pks)
View pr_template.md

What does this PR do?

Where should the reviewer start?

How should this be manually tested?

Any background context you want to provide?

Screenshots (if appropriate)

View ipsec-monitor.sh
#!/bin/bash
function main()
{
monitor_from_file $*
}
function monitor_vpn_ip_port()
{
local CONN_NAME=$1
View test.py
# This test passes, even though the existing-username validation is completely broken
class UsernameUpdateCSVTestCase(TestCase):
def test_new_username_already_exists_validation_error(self):
# If the new_username already exists on the same home site, we throw a
# validation error
site_admin_username, _ = split_username(self.site_admin_user.username)
UserFactory(
username='existing_username',
tenant=self.tenant,
)
View wait_for_vagrant.sh
#! /bin/bash
# Sleep until we can successfully SSH into a vagrant box.
# eg. $ wait_for_vagrant devbox && vagrant ssh devbox --command 'cd project && ./manage.py runserver'
# Uses doublinng backoff while waiting
# with_backoff() adapted from http://stackoverflow.com/a/8351489
# Retries a command a configurable number of times with backoff.
#
# The retry count is given by ATTEMPTS (default 5), the initial backoff
View insert_date.py
import datetime
format_str = '%Y-%m-%d %H:%M:%S'
now = datetime.datetime.now()
output = now.strftime(format_str)
keyboard.send_keys(output)
## Installation
View jquery.wymeditor.spellcheck.js
var incorrect_spelling_style = {
'border-bottom': '1px dashed #FF0000'
};
var incorrect_spelling_class = 'incorrect';
// No constants for Node.* IE
var ELEMENT_NODE = 1;
var TEXT_NODE = 3;
WYMeditor.editor.prototype.spellcheck = function() {