This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import logging | |
import cgi | |
import logging | |
import os | |
import posixpath | |
import re | |
import subprocess | |
import time | |
from tempfile import NamedTemporaryFile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function main() | |
{ | |
monitor_from_file $* | |
} | |
function monitor_vpn_ip_port() | |
{ | |
local CONN_NAME=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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, | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
format_str = '%Y-%m-%d %H:%M:%S' | |
now = datetime.datetime.now() | |
output = now.strftime(format_str) | |
keyboard.send_keys(output) | |
## Installation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() { |
NewerOlder