Skip to content

Instantly share code, notes, and snippets.

Greg Kempe longhotsummer

Block or report user

Report or block longhotsummer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@longhotsummer
longhotsummer / leaflet-big-image-full.html
Created Apr 5, 2016
Full example of using leaflet to pan and zoom a big image, as described at http://kempe.net/blog/2014/06/14/leaflet-pan-zoom-image.html
View leaflet-big-image-full.html
<html>
<!-- See also: http://kempe.net/blog/2014/06/14/leaflet-pan-zoom-image.html -->
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"></script>
<style>
#image-map {
width: 100%;
height: 300px;
border: 1px solid #ccc;
margin-bottom: 10px;
View virtualenv-auto-activate.sh
#!/bin/bash
# virtualenv-auto-activate.sh
#
# Installation:
# Add this line to your .bashrc or .bash-profile:
#
# source /path/to/virtualenv-auto-activate.sh
#
# Go to your project folder, run "virtualenv env", so your project folder
# has a env folder at the top level, next to your version control directory.
@longhotsummer
longhotsummer / metered-taxi.txt
Created Nov 20, 2014
Metered Taxi by-law text
View metered-taxi.txt
CITY OF JOHANNESBURG METROPOLITAN MUNICIPALITY
METERED TAXI, MINIBUS, MIDIBUS AND BUS BY-LAWS
The Municipal Manager of the City of Johannesburg Metropolitan Municipality hereby, in terms of Section 13(a) of the Local Government: Municipal Systems Act, 2000 (Act No 32 of 2000), publishes the Metered Taxi, Minibus, Midibus and Bus By-laws for the City of Johannesburg Metropolitan Municipality, as approved by its Council and as concurred with by the Premier: Gauteng Province in terms of section 80A of the National Road Traffic Act, 1996 (Act 89 of 1996), as set out hereunder.
CITY OF JOHANNESBURG METROPOLITAN MUNICIPALITY
METERED TAXI, MINIBUS, MIDIBUS AND BUS BY-LAWS
CHAPTER 1
INTERPRETATION
Definitions
1. (1) In these By-laws, any word or expression that has been defined in the Gauteng Public Passenger Road Transport Act, 2001 (Act No. 7 of 2001) has that meaning and, unless the context otherwise indicates –
“authorised official” means any official of the Council who has been authorised by it to administer, im
@longhotsummer
longhotsummer / metered-taxi.xml
Created Nov 20, 2014
Metered Taxi by-law XML
View metered-taxi.xml
<?xml version="1.0" encoding="UTF-8"?>
<akomaNtoso xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.akomantoso.org/2.0" xsi:schemaLocation="http://www.akomantoso.org/2.0 akomantoso20.xsd">
<act contains="originalVersion">
<meta>
<identification source="#openbylaws">
<FRBRWork>
<FRBRthis value="/za/by-law/locale/1980/name/main"/>
<FRBRuri value="/za/by-law/locale/1980/name"/>
<FRBRalias value="By-Law Short Title"/>
<FRBRdate date="1980-01-01" name="Generation"/>
@longhotsummer
longhotsummer / cpt-boundary.geojson
Created Sep 5, 2014
Cape Town Municipality boundary
View cpt-boundary.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View bkcpt-wifi.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@longhotsummer
longhotsummer / bkcpt.json
Last active Aug 29, 2015
CPT cycle paths (very basic)
View bkcpt.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View counties.topojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View leaflet-big-image.js
// Using leaflet.js to pan and zoom a big image.
// See also: http://kempe.net/blog/2014/06/14/leaflet-pan-zoom-image.html
// create the slippy map
var map = L.map('image-map', {
minZoom: 1,
maxZoom: 4,
center: [0, 0],
zoom: 1,
crs: L.CRS.Simple
@longhotsummer
longhotsummer / centroid.js
Last active Jul 7, 2016
Using D3, topojson and node.js to calculate the centroid of topojson features
View centroid.js
/* A node.js script that uses D3 and topojson to calculate and output the lat/long
* coordinates of the centroid for a collection of topojson boundary features.
*/
// install using npm install d3
var d3 = require("d3");
// download from http://d3js.org/topojson.v1.min.js
var topojson = require("./topojson.v1.min.js");
// load json
You can’t perform that action at this time.