Skip to content

Instantly share code, notes, and snippets.

@ghing
ghing / vmware-server-2.0.2-203138-update.patch
Created March 8, 2011 17:50
Version of Radu Cotescu VMware Server installation patch updated with fixes for realtime kernels.
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"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 11)
@ghing
ghing / gist:948350
Created April 29, 2011 14:05
BARD basemap generation error
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)
ERROR:
The BARD map could not be computed. Please check the configuration settings
and try again.
@ghing
ghing / gist:957302
Created May 5, 2011 15:54
Celery error
[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/trace.py", 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/base.py", line 248, in __call__
return self.run(*args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/celery-2.1.4-py2.6.egg/celery/task/http.py", line 178, in run
@ghing
ghing / ohcalculators.py
Created June 16, 2011 13:45
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
ghing / momphone.py
Created July 5, 2011 19:21
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
ghing / traceback.txt
Created July 8, 2011 18:19
District Builder Traceback
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/Django-1.2.3-py2.6.egg/django/core/handlers/base.py", 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/cache.py", line 56, in _cache_controlled
response = viewfunc(request, *args, **kw)
File "/projects/publicmapping_ohiov1.2/trunk/django/publicmapping/redistricting/views.py", line 133, in decorator
return function(request, *args, **kwargs)
@ghing
ghing / celeryd-ohio-excerpt.log
Created July 8, 2011 18:23
Error when trying to import my district 1 only block index file.
[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/trace.py", 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/base.py", line 248, in __call__
return self.run(*args, **kwargs)
@ghing
ghing / areas.txt
Created July 8, 2011 19:32
Output of psql -U publicmapping publicmapping_ohio_v1_2 -c "select round(st_area(geom)) as g_area, round(st_area(simple)) as s_area from redistricting_geounit where geolevel_id > 1;" > areas
g_area | s_area
------------+------------
188777863 | 188821726
1772952 | 1773885
115330738 | 115299478
123402715 | 123389629
168916950 | 169004177
16810917 | 16829315
75493624 | 75438669
2788115 | 2780298
@ghing
ghing / postgresql-8.4-main-excerpt.log
Created July 8, 2011 20:07
Postgres logs behind 500 error
2011-07-08 15:03:00 CDT ERROR: GEOS Intersection() threw an error!
2011-07-08 15:03:00 CDT STATEMENT: SELECT rd.id,
rd.district_id,
rd.name,
rd.is_locked,
lmt.version,
rd.plan_id,
rc.subject_id,
rc.number,
st_asgeojson(
@ghing
ghing / celeryd-ohio-excerpt.log
Created July 8, 2011 21:01
Error when trying to import my State Senate District 16-only district index file.
[2011-07-08 16:54:00,264: ERROR/MainProcess] Task redistricting.utils.index2plan[053e21e9-7bad-4693-b96a-73e
88872da5d] raised exception: GEOSException('Error encountered checking Geometry returned from GEOS C functio
n "GEOSDifference_r".',)
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/celery-2.1.4-py2.6.egg/celery/execute/trace.py", 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/base.py", line 248, in __c
all__
return self.run(*args, **kwargs)