Skip to content

Instantly share code, notes, and snippets.

Avatar

Stan Klimoff graven

View GitHub Profile
@graven
graven / index.html
Created Jun 9, 2012
Manifest visualization
View index.html
<!doctype html5>
<html>
<body>
<style type="text/css">
<style>
#chart {
height: 500px;
}
View CMDB.py
# coding=utf-8
class CMDB:
values, valueHistory, publishers, subscribers = {}, {}, {}, {}
@staticmethod
def getValue(id):
return CMDB.values.get(id, None)
@staticmethod
@graven
graven / nova.conf.sh
Created May 27, 2011
Nova configuration for stress testing
View nova.conf.sh
--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
@graven
graven / colortest.py
Created Apr 15, 2011
Small utility to test terminal support for 256-color output.
View colortest.py
# 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
@graven
graven / mov2h264.sh
Created Aug 25, 2010
QuickTime MOV to MP4 using H.264
View mov2h264.sh
#!/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
View cirle-ellipse-inheritance.scala
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
}