Skip to content

Instantly share code, notes, and snippets.

View graven's full-sized avatar

Stan Klimoff graven

View GitHub Profile
class Duple(val first : float, val second : float)
class DiagDuple(val sole : float) extends Duple(sole, sole)
class Ellipse[-F <: Duple](foci : F) {
private var m_foci : Duple = foci
def foci : Duple = m_foci
def foci_=(foci : F) = m_foci = foci
}
@graven
graven / nova.conf.sh
Created May 27, 2011 21:12
Nova configuration for stress testing
--verbose=true
--ec2_url=http://$CC_IP:8773/services/Cloud
--s3_host=$CC_IP
--cc_host=$CC_IP
--rabbit_host=$CC_IP
--sql_connection=mysql://nova:nova@$CC_IP/nova
--glance_port=9292
--glance_host=$CC_IP
--use_s3=true
--libvirt_type=kvm
# coding=utf-8
class CMDB:
values, valueHistory, publishers, subscribers = {}, {}, {}, {}
@staticmethod
def getValue(id):
return CMDB.values.get(id, None)
@staticmethod
@graven
graven / index.html
Created June 9, 2012 17:49
Manifest visualization
<!doctype html5>
<html>
<body>
<style type="text/css">
<style>
#chart {
height: 500px;
}
@graven
graven / mov2h264.sh
Created August 25, 2010 05:30
QuickTime MOV to MP4 using H.264
#!/bin/bash
# Converts QuickTime MOV to MP4 using H.264 (aka MPEG-4 Part 10) as video encoder
# Used for screencasts
#
# keywords: convert MOV to H.264, QuickTime, iMovie, MP4, MPEG, ffmpeg
# platform: OS X
# note: to get HD output from iMovie, export through "Share using QuickTime"
#
ffmpeg -i $1.mov -vcodec libx264 -vpre hq -b 800k $1.mp4
@graven
graven / colortest.py
Created April 15, 2011 07:50
Small utility to test terminal support for 256-color output.
# Ported to Python from http://www.vim.org/scripts/script.php?script_id=1349
print "Color indexes should be drawn in bold text of the same color."
print
colored = [0] + [0x5f + 40 * n for n in range(0, 5)]
colored_palette = [
"%02x/%02x/%02x" % (r, g, b)
for r in colored