Skip to content

Instantly share code, notes, and snippets.

View skorasaurus's full-sized avatar

Will Skora skorasaurus

View GitHub Profile
#bars {
[amenity='bar'], [amenity='pub'], {
text-face-name:@font_reg;
text-name:'[name]';
text-allow-overlap: false;
text-fill:#000;
text-halo-fill:fadeout(#fff,20);
text-halo-radius:2;
text-placement:interior;
text-size:11;
@skorasaurus
skorasaurus / gist:1364479
Created November 14, 2011 17:12
python script for mapnik [xml]
#!/usr/bin/env python
import mapnik2
mapfile = 'barsoob3.xml'
map_output = 'mapnikxmloutput.png'
m = mapnik2.Map(800, 600)
mapnik2.load_map(m, mapfile)
bbox = mapnik2.Envelope(mapnik2.Coord(-81.738, 41.435), mapnik2.Coord(41.459,-81.6723))
m.zoom_to_box(bbox)
print "Scale = " , m.scale()
mapnik2.render_to_file(m, map_output)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Map>
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" background-color="#565656">
<FontSet name="fontset-0">
<Font face-name="Ubuntu Regular"/>
<Font face-name="Arial Regular"/>
<Font face-name="DejaVu Sans Book"/>
</FontSet>
<Style name="roads" filter-mode="first">
sudo gdb -pid `pidof nodejs`
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
@skorasaurus
skorasaurus / gist:1406000
Created November 29, 2011 19:09
mygeojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@skorasaurus
skorasaurus / gist:1406005
Created November 29, 2011 19:10
gdbtilemilllog
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Attaching to process 2955
Thread 6 (Thread 0xb3629b70 (LWP 3551)):
#0 0x004c6416 in __kernel_vsyscall ()
#1 0x00c1c834 in pthread_cond_timedwait@@GLIBC_2.3.2 ()
from /lib/i386-linux-gnu/libpthread.so.0
#2 0x081768c6 in ?? ()
#3 0x00c17e99 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#4 0x003bd73e in clone () from /lib/i386-linux-gnu/libc.so.6
Thread 5 (Thread 0xb363ab70 (LWP 3550)):
#0 0x004c6416 in __kernel_vsyscall ()
@skorasaurus
skorasaurus / gist:1790594
Created February 10, 2012 16:22
osm-bright configuration
#!/usr/bin/env python
from collections import defaultdict
config = defaultdict(defaultdict)
config["importer"] = "osm2pgsql" # either 'imposm' or 'osm2pgsql'
# The name given to the style. This is the name it will have in the TileMill
# project list, and a sanitized version will be used as the directory name
# in which the project is stored
admin query for layer:
( SELECT way, admin_level
FROM planet_osm_line
WHERE boundary = 'administrative'
) AS data
style in base.mss:
@skorasaurus
skorasaurus / gist:2645298
Created May 9, 2012 15:09
tilemill.log upgrade to 0.9.1 (on ubuntu 11.04)
Note: Unknown option "updatesVersion" in config file.
Note: Unknown option "updatesTime" in config file.
[tilemill] Note: Unknown option "updatesVersion" in config file.
[tilemill] Note: Unknown option "updatesTime" in config file.
[tilemill] Started [Server Tile:20008].
[tilemill] Plugin [templates] loaded.
[tilemill] Plugin [carto] loaded.
[tilemill] Plugin [fonts] loaded.
[tilemill] Plugin [editor] loaded.
[tilemill] Plugin [map] loaded.