Skip to content

Instantly share code, notes, and snippets.

View cageyjames's full-sized avatar

James Fee cageyjames

View GitHub Profile
#ne50mpopulatedplaces {
[zoom = 3][SCALERANK = 0]{
::labels{
text-name:[NAME];
text-face-name:"DejaVu Sans Book";
text-fill:#3d3d3d;
text-size:11;
text-min-distance:8;
text-line-spacing:1;
text-halo-radius:1;}
ogr2ogr ne_rail_fixed.shp ne_10m_railroads.shp
""" This is the code I used to find the URLs that were 404 in Disqus """
import os,sys
#import feedparser
import urllib
import Levenshtein
def read_atom():
d = feedparser.parse("http://cageyjames.webfactional.com/atom.xml") # the url of the Atom feed can also be used here
-- Preview the currently active BBEdit document using Marked.
tell application "BBEdit"
activate
-- Ask BBEdit for it's active document.
set the_document to active document of text window 1
-- If the file doesn't alreay exist, ask the user to save it.
if not the_document's on disk then
save the_document
ogr2ogr -where "description LIKE '%chair_lift%'" -f KML chair_lifts.kml output.kml "aerialway_line"
@cageyjames
cageyjames / WeoGeoAPI_Library_Groups.py
Created December 19, 2012 00:30
Get a list of Groups in your WeoGeo Library
#!/usr/bin/env python
#title :WeoGeoAPI_Library_Groups.py
#description :Connect to WeoGeo and get a JSON list of all your groups
#author :jfee
#date :20121219
#version :0.1
#usage :python WeoGeoAPI_Library_Groups.py
#notes :
#python_version :2.7.0
#==============================================================================
bbcurl () { curl $1 | open -a BBEdit -f; }
weoJSON = weosXXXX #some json call
# delete unneeded JSON fields
delete WeoJSON.fieldname
@cageyjames
cageyjames / FindDataOnWeoGeoMarket.py
Last active December 10, 2015 00:59
Code example on how to connect to the WeoGeo Market and return a JSON string with your datasets
#!/usr/bin/env python
""" This sample code will allow you to connect to the WeoGeo Market and get a list of datasets.
You'll need the WeoGeo Python API that can be acquired by "pip install WeoGeoAPI". """
print "\nConnecting to WeoGeo...\n"
# Import Needed Libraries
import WeoGeoAPI