Skip to content

Instantly share code, notes, and snippets.

Geoffrey Hing ghing

Block or report user

Report or block ghing

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
ghing /
Created Aug 16, 2010
Sample Django that shows how to serve static content when running development server
from django.conf.urls.defaults import *
from django.contrib.gis import admin
import settings
urlpatterns = patterns('',
(r'^admin/', include(,
(r'^$', 'boystown.views.index'),
ghing / VMware-server-2.0.2-realtime_fix.patch
Created Mar 8, 2011
Patch to VMWare Server 2.0.2 Linux kernel module sources that allows the modules to be compiled for use with a realtime kernel.
View VMware-server-2.0.2-realtime_fix.patch
diff -ru a/lib/modules/source/vmci-only/linux/driver.c b/lib/modules/source/vmci-only/linux/driver.c
--- a/lib/modules/source/vmci-only/linux/driver.c 2009-10-20 19:31:34.000000000 -0500
+++ b/lib/modules/source/vmci-only/linux/driver.c 2011-03-08 10:39:35.305432000 -0600
@@ -360,7 +360,11 @@
memset(vmciLinux, 0, sizeof *vmciLinux);
vmciLinux->ctType = VMCIOBJ_NOT_SET;
+#if !defined(CONFIG_PREEMPT_RT)
ghing / vmware-server-2.0.2-203138-update.patch
Created Mar 8, 2011
Version of Radu Cotescu VMware Server installation patch updated with fixes for realtime kernels.
View vmware-server-2.0.2-203138-update.patch
diff -ru a/lib/modules/source/vmci-only/include/pgtbl.h b/lib/modules/source/vmci-only/include/pgtbl.h
--- a/lib/modules/source/vmci-only/include/pgtbl.h 2009-10-22 06:54:15.000000000 -0400
+++ b/lib/modules/source/vmci-only/include/pgtbl.h 2010-01-17 22:52:44.127684350 -0500
@@ -24,6 +24,7 @@
#include "compat_pgtable.h"
#include "compat_spinlock.h"
#include "compat_page.h"
+#include "compat_sched.h"
ghing /
Created Apr 4, 2011
Simple script to convert a HTTP post data copied from the Tamper Data Firefox extension into Python code that can be used in a script using the mechanize library.
We couldn’t find that file to show.
ghing / gist:948350
Created Apr 29, 2011
BARD basemap generation error
View gist:948350
Loaded BARD library.
Read shapefile '/projects/publicmapping_michigan/local/data/shapes/blocks/PL_BLOCK_MI_M.shp'.
Error in function (sdf, nb = NULL, queen = TRUE) :
unused argument(s) (keepgeom = FALSE)
The BARD map could not be computed. Please check the configuration settings
and try again.
View gist:957302
[2011-05-04 23:31:00,835: ERROR/MainProcess] Task celery.task.http.HttpDispatchT
ask[1fb6bb21-4b8a-40d1-afd9-59c5ca722730] raised exception: ValueError('unknown
url type: :///getreport/',)
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/celery-2.1.4-py2.6.egg/celery/exe
cute/", line 34, in trace
return cls(states.SUCCESS, retval=fun(*args, **kwargs))
File "/usr/local/lib/python2.6/dist-packages/celery-2.1.4-py2.6.egg/celery/task/", line 248, in __call__
return*args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/celery-2.1.4-py2.6.egg/celery/task/", line 178, in run
ghing /
Created Jun 16, 2011
Custom District Builder calculators for Ohio
from publicmapping.redistricting.calculators import CalculatorBase
class ValueRange(CalculatorBase):
Determine a value, and indicate if it falls within a range
This calculator differs from the default Range calculator because it
checks the value argument (usually passed from another calculator)
rather than operating on a district or plan.
ghing /
Created Jul 5, 2011
Songs for Moms phone flyer using Tropo API
Mom Phone
Audio flyer for the May 5, 2011 Songs for Moms show in Chicago.
Hosted at (773) 280-5392
from urllib import quote
from random import choice
ghing / traceback.txt
Created Jul 8, 2011
District Builder Traceback
View traceback.txt
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/Django-1.2.3-py2.6.egg/django/core/handlers/", line 100, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.6/dist-packages/Django-1.2.3-py2.6.egg/django/views/decorators/", line 56, in _cache_controlled
response = viewfunc(request, *args, **kw)
File "/projects/publicmapping_ohiov1.2/trunk/django/publicmapping/redistricting/", line 133, in decorator
return function(request, *args, **kwargs)
ghing / celeryd-ohio-excerpt.log
Created Jul 8, 2011
Error when trying to import my district 1 only block index file.
View celeryd-ohio-excerpt.log
[2011-07-08 14:10:30,873: ERROR/MainProcess] Task redistricting.utils.index2plan
[d370e684-cc9e-4e6c-ae85-fc9a2949c4de] raised exception: GEOSException('Error en
countered checking Geometry returned from GEOS C function "GEOSDifference_r".',)
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/celery-2.1.4-py2.6.egg/celery/exe
cute/", line 34, in trace
return cls(states.SUCCESS, retval=fun(*args, **kwargs))
File "/usr/local/lib/python2.6/dist-packages/celery-2.1.4-py2.6.egg/celery/tas
k/", line 248, in __call__
return*args, **kwargs)
You can’t perform that action at this time.