Skip to content

Instantly share code, notes, and snippets.

View betrcode's full-sized avatar
👋

Max Wenzin betrcode

👋
View GitHub Profile
@betrcode
betrcode / inheritance.py
Created February 26, 2014 13:20
Python inheritance __init__ calling
class BaseWithInit(object):
def __init__(self):
print "Init BaseWithInit"
class ClassWithoutInit(BaseWithInit):
pass
<html>
<head>
<script type="text/javascript" src="http://canvg.googlecode.com/svn/trunk/rgbcolor.js"></script>
<script type="text/javascript" src="http://canvg.googlecode.com/svn/trunk/canvg.js"></script>
<script>
function getImgData(chartContainer) {
var chartArea = chartContainer.getElementsByTagName('iframe')[0].
contentDocument.getElementById('chartArea');
var svg = chartArea.innerHTML;
var doc = chartContainer.ownerDocument;
@betrcode
betrcode / build-failed.tcl
Created December 4, 2012 10:52
TCL Expect script to turn ON/OFF a switch on a iTach WF2CC, to be called from Jenkins in a post build action (usage: tclsh build-failed.tcl)
#!/bin/sh
# \
exec tclsh "$0" ${1+"$@"}
package require Expect
set exp::winnt_debug 1
puts stdout "Connecting to iTach and turning it ON\n"
spawn plink -telnet 1.3.3.184 -P 4998
@betrcode
betrcode / build-failed.sh
Created December 4, 2012 09:05
Scripts to turn on/off CC#2 on a iTach WF2CC
#!/bin/sh
spawn telnet 1.3.3.184 4998
expect "Escape character is '^]'."
send "setstate,1:2,1\r"
expect "setstate,1:2,1"