Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View prologic's full-sized avatar
👋
Principal SRE, Founder of Yarn.social and Salty.im

James Mills prologic

👋
Principal SRE, Founder of Yarn.social and Salty.im
View GitHub Profile
@prologic
prologic / config.log
Last active December 13, 2015 17:48
Trouble installing mapserver on Mac OS X 10.8.2 with the latest Xcode and brew.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ ./configure --prefix=/usr/local/Cellar/mapserver/6.0.3 --with-proj --with-gdal --with-ogr --with-geos --with-postgis --with-fastcgi=/usr/local
## --------- ##
## Platform. ##
$ pip install mapscript
Downloading/unpacking mapscript
Running setup.py egg_info for package mapscript
Requirement already satisfied (use --upgrade to upgrade): distribute in /usr/local/lib/python2.7/site-packages/distribute-0.6.30-py2.7.egg (from mapscript)
Installing collected packages: mapscript
Running setup.py install for mapscript
building '_mapscript' extension
cc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c mapscript_wrap.c -o build/temp.macosx-10.8-x86_64-2.7/mapscript_wrap.o
@prologic
prologic / console output
Created February 26, 2013 02:40
mapnik - Failed ot build on 10.8.2
$ brew install mapnik
==> Installing mapnik dependency: libtool
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
==> Downloading http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/libtool/2.4.2 --program-prefix=g --enable-ltdl-install
==> make install
==> Caveats
In order to prevent conflicts with Apple's own libtool we have prepended a "g"
so, you have instead: glibtool and glibtoolize.
@prologic
prologic / Sample Dataset
Last active December 14, 2015 06:39
Sample ASCII Grid Dataset with Time Series.
.
./RCP3PD_csiro-mk30_2015
./RCP3PD_csiro-mk30_2015/bioclim_01.asc
./RCP3PD_csiro-mk30_2015/bioclim_02.asc
./RCP3PD_csiro-mk30_2015/bioclim_03.asc
./RCP3PD_csiro-mk30_2015/bioclim_04.asc
./RCP3PD_csiro-mk30_2015/bioclim_05.asc
./RCP3PD_csiro-mk30_2015/bioclim_06.asc
./RCP3PD_csiro-mk30_2015/bioclim_07.asc
./RCP3PD_csiro-mk30_2015/bioclim_08.asc
~/ccav/tmp/mapserver
$ ./gdaltindex-time -i ./data/RCP3PD_csiro-mk30_2015/bioclim_01.asc -o test.shp -f "ESRI Shapefile" -l "RCP3PD_csiro-mk30_bioclim_01" -t "2015"
Warning 6: Field time create as date field, though DateTime requested.
ERROR:
file: gdaltindex-time.c
line: 224
function: strptime
No such file or directory
@prologic
prologic / test.py
Created July 18, 2013 03:33
Testing shapely's simplify operation while preserving topology and resulting in an invalid geometry.
#!/usr/bin/env python
from json import loads
from shapely import speedups
speedups.available and speedups.enable()
from shapely.geometry import shape
from numpy import asarray
@prologic
prologic / pyproto.py
Created September 14, 2013 05:55 — forked from foxbunny/pyproto.py
""" https://bitbucket.org/brankovukelic/pyproto """
from copy import copy
__all__ = ['Object']
class Object(object):
"""Base prototype for prototypal object model in Python
To create a new object, simply instantiate an Object instance::
from shapely.geometry import shape, Point, MultiPoint
import math
import json
def get_bounds(geometries):
"""Returns bounding box of geometries. Implementation creates a MultiPoint
from the boxes of all polygons in order to get the result"""
points = []
for g in geometries:
@prologic
prologic / Dockerfile
Created February 10, 2014 02:49
lxc-start: No such file or directory - stat(/proc/21086/root/dev//console)
# TerraNova / CCAIH (http://sourceforge.net/p/ccaih)
#
# Dockerfile to build a Docker image for the TerraNova / CCAIH Project.
#
# This is the "plone:dev" image:
#
# VERSION: 0.1
FROM 09e136746f56
MAINTAINER James Mills <j.mills@griffith.edu.au>
~/work/glanceclient
$ source pt-1620-openrc.sh
Please enter your OpenStack Password:
(glance)
$ glance image-list
The request you have made requires authentication. (HTTP 401)