Skip to content

Instantly share code, notes, and snippets.

@ananelson
ananelson / jython-pexpect-zombie.py
Created June 7, 2011 21:44
script to demonstrate jython/pexpect zombie on OSX
# Minimal example of jython -i causing zombie processes when called via pexpect.
import pexpect
EXECUTABLE = 'jython -i'
PROMPT = '>>>|\.\.\.' # Python uses >>> prompt normally and ... when in multi-line structures like loops
proc = pexpect.spawn(EXECUTABLE)
proc.expect(PROMPT)
print "=================================================="
.body_foreground {
color : #AAAAAA;
}
.body_background {
background-color : #000000;
}
.body_foreground > .bold,.bold > .body_foreground, body.body_foreground > pre > .bold {
color : #FFFFFF;
@ananelson
ananelson / gist:3026220
Created July 1, 2012 00:34
pjsua transcript
ubuntu@ip-10-166-205-27:~$ pjsua --null-audio --rec-file=ex1.wav --auto-rec
00:33:08.624 os_core_unix.c pjlib 1.12.0 for POSIX initialized
00:33:08.626 sip_endpoint.c Creating endpoint instance...
00:33:08.626 pjlib select() I/O Queue created (0x1ae3cc0)
00:33:08.626 sip_endpoint.c Module "mod-msg-print" registered
00:33:08.626 sip_transport. Transport manager created.
00:33:08.626 sip_endpoint.c Module "mod-pjsua-log" registered
00:33:08.626 sip_endpoint.c Module "mod-tsx-layer" registered
00:33:08.626 sip_endpoint.c Module "mod-stateful-util" registered
00:33:08.626 sip_endpoint.c Module "mod-ua" registered
@ananelson
ananelson / gist:3027405
Created July 1, 2012 07:51
tropo transcript
00000 473b 11:34:52 PM Received new TropoML document on Tropo-Thread-bea0143efb0855824fae04701624abd3: {"tropo": [{"on": {"event": "continue", "next": "/webapi/vote/menu"}}]}
00001 473b 11:34:52 PM Processing document http://morning-mountain-9168.herokuapp.com/webapi/start for instance bea0143efb0855824fae04701624abd3 callFactory for instance bea0143efb0855824fae04701624abd3
00002 473b 11:34:52 PM Processing events: continue
00003 473b 11:34:52 PM Sending TropoML Payload on Tropo-Thread-bea0143efb0855824fae04701624abd3 [url=http://morning-mountain-9168.herokuapp.com/webapi/vote/menu]: {"result":{"sessionId":"bea0143efb0855824fae04701624abd3","callId":"0304f604b7842752be86949a7ff4c25e","state":"RINGING","sessionDuration":0,"sequence":1,"complete":true,"error":null}}
00004 473b 11:34:52 PM Received new TropoML document on Tropo-Thread-bea0143efb0855824fae04701624abd3: {"tropo": [{"say": {"value": "hello, thank you for helping us choose the music"}}, {"ask": {"say":
@ananelson
ananelson / gist:3029285
Created July 1, 2012 19:09
./configure output
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
#!/bin/bash -v
export HOME=/root
### @export "capture-logs"
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
### @export "get-release-name"
source /etc/lsb-release
echo $DISTRIB_CODENAME
echo "deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu $DISTRIB_CODENAME multiverse" >> /etc/apt/sources.list
# Sphinx version: 1.2b1
# Python version: 2.7.3
# Docutils version: 0.10 release
# Jinja2 version: 2.6
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/sphinx/cmdline.py", line 247, in main
app.build(force_all, filenames)
File "/usr/local/lib/python2.7/dist-packages/sphinx/application.py", line 211, in build
self.builder.build_update()
File "/usr/local/lib/python2.7/dist-packages/sphinx/builders/__init__.py", line 211, in build_update
<html>
<head>
<style>
.flask {
width: 300px;
height: 400px;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARoAAAGACAIAAAD9LDrIAAAKO2lDQ1BpY20AAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzoGFyolBdMxggAAESggSqwQQcMwRSswA6cwR28wBcCYQZEQAwkwDwQQgbkgBwKoRiWQRlUwDrYBL
#!/bin/sh
#
# The hook should exit with non-zero status after issuing an appropriate
# message if it wants to stop the commit.
if git diff --cached | grep "NOCOMMIT"
then
echo "NOCOMMIT found in code, cancelling commit."
exit 1
else
#!/bin/sh
#
# The hook should exit with non-zero status after issuing an appropriate
# message if it wants to stop the commit.
if git diff --cached | grep "NOCOMMIT"
then
echo "NOCOMMIT found in code, cancelling commit."
exit 1
fi