This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var kml_layers = new Array(); | |
/** | |
* Process KML Layers | |
* | |
* @param layerOptions | |
* Object of options | |
* @param mapid | |
* Map ID | |
* @return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD | |
* license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the | |
* full text of the license. */ | |
/** | |
* @requires OpenLayers/Renderer/Elements.js | |
*/ | |
/** | |
* Class: OpenLayers.Renderer.VML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD | |
* license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the | |
* full text of the license. */ | |
/** | |
* @requires OpenLayers/Renderer/Elements.js | |
*/ | |
/** | |
* Class: OpenLayers.Renderer.VML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# coding: utf-8 | |
require 'rubygems' | |
require 'fastercsv' | |
require 'pdf/reader' | |
require 'CSV' | |
class Array | |
def to_csv | |
str='' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# python code for soft-hyphenation of CamelCase text | |
hyphenated = re.sub('([a-z])([A-Z])', r'\1­\2', text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from multiprocessing import Pool | |
import os | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# * Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'nokogiri' | |
file = ARGV[0] | |
nok = Nokogiri::XML(open(file)) | |
nok.css('Placemark').each do |p| | |
if p.css('Point coordinates').inner_text == '0.0,0.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'sqlite3' | |
# So this is address and name-completion for the sup mail client, which is | |
# really quite nice in a sort of vim-ish way | |
# However, I've switched since writing this, mainly because sup doesn't play nice with any other | |
# mail clients, so it screws up my read/unread/labeled systems when I'm using my iPhone, etc. | |
# Supposedly this is an upcoming feature, but it has been for a while and seems non-essential | |
# to the developers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Google Maps API 2.0 | |
* MapBox integration. | |
* | |
* Do not remove the MapBox or OpenStreetMap attribution from this code, | |
* doing so is in violation of the terms of both licenses. | |
*/ | |
/** | |
* Factory function for a MapBox layer for use with a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def report_feed(request): | |
reports = FieldReport.objects.kml() | |
r = render_to_kml('kml/placemarks.kml', {'places' : reports}) | |
r['Content-Disposition'] = 'attachment;filename=reports.kml' | |
return r |