Skip to content

Instantly share code, notes, and snippets.

John Stowers nzjrs

Block or report user

Report or block nzjrs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nzjrs /
Created Apr 3, 2011
Generate development history statistics for PyGTK
pepper activity --datemin=1998-12-01 --output=${OUT}/activity.png --size=800x600 ${PROJ}
pepper activity --split=authors --n=10 --datemin=1998-12-01 --output=${OUT}/activity-auth.png --size=800x600 ${PROJ}
pepper activity --split=directories --datemin=1998-12-01 --output=${OUT}/activity-directories.png --size=800x600 ${PROJ}
pepper loc --output=${OUT}/loc.png --size=800x600 ${PROJ}
pepper loc --tags --output=${OUT}/loc-tags.png --size=3200x600 ${PROJ}
nzjrs / gdk-gstappsrc-stream.c
Created Dec 2, 2010
GStreamer Streaming AppSrc Example
View gdk-gstappsrc-stream.c
/* gcc gdk-gstappsrc-stream.c -Wall `pkg-config --cflags --libs gstreamer-app-0.10 gdk-pixbuf-2.0` -o gdkstream */
#include <gst/gst.h>
#include <gst/app/gstappsrc.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
nzjrs / gtkview.c
Created Nov 18, 2010
GTK+ Viewer for Microsoft Kinect (uses libfreeconect)
View gtkview.c
* Gtk example to show depth map from Micrsoft Kinect
* Copyright (c) 2010 John Stowers
* Copyright (c) 2010 individual OpenKinect contributors. See the CONTRIB file
* for details.
* This code is licensed to you under the terms of the Apache License, version
* 2.0, or, at your option, the terms of the GNU General Public License,
* version 2.0. See the APACHE20 and GPL2 files for the text of the licenses,
nzjrs / oo-eps.bas
Created Nov 1, 2010
Exporting openoffice charts for LaTeX
View oo-eps.bas
' Export all charts from a Calc spreadsheet to EPS
' (c) Jose Fonseca
' Taken from
Sub Main
Dim oDoc, oDocCtrl, oDocFrame, oDispatchHelper
oDoc = ThisComponent
oDocCtrl = oDoc.getCurrentController()
oDocFrame = oDocCtrl.getFrame()
oDispatchHelper = createUnoService( "" )
nzjrs /
Created Oct 16, 2010
Script for building the Py{GObject,GTK} installers using MinGW
# Script for building the Py{GObject,GTK} installers using MinGW
# via wine on ubuntu 10.04
#Install the deps, MinGW and MSYS. GCC 4.5.0
#wine mingw-get.exe install gcc
#wine mingw-get.exe install msys-base
BDIST_TARGETS="wininst msi"
nzjrs / Makefile
Last active Sep 5, 2015
LaTeX Makefile
View Makefile
# Makefile for LaTeX files
# Original file from
# please check (Roel)
# current version (John)
# Copyright (c) 2009,2010 (in order of appearance):
# Roel Meeuws <>
# John Stowers <>
# ChangeLog:
nzjrs / lcd_chars.txt
Created May 28, 2010
PyGtk LCD Widget
View lcd_chars.txt
# Character set for the Squeezebox display
nzjrs /
Created Jan 19, 2010
PyGtk client side windows demo
#!/usr/bin/env python
# Gtk+ client-side-windows demo in python
# John Stowers
import gobject
import cairo
import gtk
import gtk.gdk as gdk
#hacks for using functions not exposed in this pygtk version
nzjrs /
Created Oct 13, 2009
Update or add copyright headers to source files.
nzjrs /
Created Oct 11, 2009
Humanize date differences
#!/usr/bin/env python
# This function prints the difference between two python datetime objects
# in a more human readable form
# Adapted from:
def humanize_date_difference(now, otherdate=None, offset=None):
if otherdate:
dt = otherdate - now
offset = dt.seconds + (dt.days * 60*60*24)
You can’t perform that action at this time.