Skip to content

Instantly share code, notes, and snippets.

View chrisking's full-sized avatar

Chris King chrisking

View GitHub Profile
@chrisking
chrisking / client.py
Last active December 31, 2015 01:59
client.py hackery done
"""
client.py contains all of the functionality required to interact with a client in your lab.
"""
#imports
import logging
import sh
import simplejson
import json
import os
@chrisking
chrisking / runserver.py
Created December 23, 2013 20:42
example config for sandman
from sandman import app
app.config['SQLALCHEMY_DATABASE_URI'] = 'db_account_info_here'
from sandman.model import register, activate, Model
class User(Model):
__tablename__ = "ppv_user"
class DataSet(Model):
@chrisking
chrisking / gunicorn.conf
Created January 29, 2014 20:32
Gunicorn Configuration
description "Gunicorn Web Server"
start on runlevel [2345]
stop on runlevel [!2345]
#Send KILL after 5 seconds
kill timeout 5
respawn
#Serve Gunicorn locally
script
<xml?>
<order>
<credit_card>234892384923849238492348</credit_card>
<exp_date>1120</exp_date>
<name>Billy Bob</name>
</order>
def sort_existing_bisect_changes(self, change_list):
"""
First we take in a changelist, then iterate over each change number,
if a test has been executed on that change number, we move it to the
end of the list.
The results are returned.
:param change_list: list of changes
:return change_list: list of changes after things have been moved
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@chrisking
chrisking / embed.html
Created June 23, 2014 15:39
embed text
<iframe id="sbg_video_frame" marginheight="0" scrolling="no" marginwidth="0" frameborder="no" allowfullscreen="yes" src="http://myrdctv.com/template/flashplayers/jwplayer/dev/files/embed.html?video=2014/06/clips/OWI4ZWRhZmFkZjlh&cdn=wrdc&adzone=/4756/WRDC/Web/Community&autoP=true&poster=http://myrdctv.com/sections/community/features/community-matters/images/stop_320x240.jpg&event=iframe player&googleID=UA-11902348-9&parent=http://myrdctv.com"></iframe><script src="http://myrdctv.com/template/flashplayers/jwplayer/dev/files/embed.js"></script>
@chrisking
chrisking / .vimrc
Created June 23, 2014 18:01
vim config
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
@chrisking
chrisking / example.groovy
Created July 3, 2014 19:27
maven config
//Checking for HOST OS to determine maven command
def maven_command = "";
if (System.properties['os.name'].toLowerCase().contains('windows')) {
//Is Windows
maven_command = "mvn.bat";
} else {
//Is Not Windows
maven_command = "mvn";
}
@chrisking
chrisking / shell.sh
Created July 6, 2014 14:38
django error
Environment:
Request Method: GET
Request URL: http://arguet.kilncode.com:8000/igloo/repo/gatemodelversion/
Django Version: 1.6.2
Python Version: 2.7.6
Installed Applications:
('django.contrib.auth',