Skip to content

Instantly share code, notes, and snippets.

View stevage's full-sized avatar
💭
🐘

Steve Bennett stevage

💭
🐘
View GitHub Profile
@stevage
stevage / installmosh.sh
Last active August 29, 2015 14:03
Install Mosh on Ubuntu
sudo apt-get install -y python-software-properties && sudo add-apt-repository ppa:keithw/mosh && sudo apt-get update && sudo apt-get install -y mosh
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAuKywKeAWFTGc0j3QFxwRbg4BEYLlZksRhp3BJengRP4bDR3r60HqFlwp+XlbB/U3Fsgh/2x1Pany/RvxFytMhDKg+Vvxdzt1MLcXC5p2/zEL4KV98ODbYb+VuOPotL5+8yM4lkX5re7wyZnngB9RgfSU1rhWb4UxuSkfmeeoOVU=
@stevage
stevage / region_fid.sld
Created August 28, 2015 06:57
Region mapping style layer definition for TerriaJS
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- a Named Layer is the basic building block of an SLD document -->
<NamedLayer>
<Name>region_id</Name>
@stevage
stevage / index.html
Created November 7, 2015 12:25
Not just copyright
<!DOCTYPE html>
<html>
<head>
<style>
iframe { width: 100%; height: 700px; }
body { margin: 0; padding: 0; }
</style>
<body>
<iframe src="https://docs.google.com/document/d/1CYYXFW2mNaSCfVFOzjsz7EU-4KTz7uHeITvJMLWyVek/pub?embedded=true"></iframe>
</body>
@stevage
stevage / swagger.yaml
Created November 16, 2015 12:42
PTV realtime API swagger YAML
swagger: '2.0'
# This is your document metadata
info:
version: "2.1.0"
title: PTV Timetable API (community portal)
description: |
This is Open Knowledge Australia's version of Public Transport Victoria's <a href="https://www.data.vic.gov.au/data/dataset/ptv-timetable-api">Timetable API</a> documentation, built with [Swagger](https://github.com/swagger-api/swagger-ui). It was created by <a href="http://stevebennett.me">Steve Bennett</a> (stevage@gmail.com, <a href="https://twitter.com/stevage1">@stevage1</a>) for Open Knowledge Australia. It was not funded or supported by PTV, but was based on the official documentation using the CC-BY licence.
The Timetable API 2.0.0 lets you find stations and stops in a given area, query the next few departures from a stop, and the stops on a given line or service. Version 2.1.0, released on 28 May 2015 adds realtime stop arrivale times for trams and some buses, and disruption data. It does not provide vehicle location tracking, spatial data other than st
{
// REQUIRED (DataPackage): a url-compatible short name ("slug") for the package
"name": "Victoria-ABS",
// REQUIRED (DataPackage): a human readable title for the package
"title": "Revenue, Expenses, Assets, Liabilities for Victoria (Australia) 2005-14",
"sources": [ {
"name": "ABS",
@stevage
stevage / index.html
Last active March 31, 2016 00:56 — forked from djtfmartin/index.html
LeafletJS and ALA occurrence layer
<!DOCTYPE html>
<html>
<head>
<title>LeafletJS and ALA occurrence layer</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
<body>
<div id="map" style="height: 800px"></div>
<script src="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script></head>
@stevage
stevage / patchfile
Created April 8, 2016 08:30
ECW SDK patch
--- Source/C/NCSUtil/NCSPrefsXML.cpp.ori 2016-04-08 08:28:13.365541000 +0000
+++ Source/C/NCSUtil/NCSPrefsXML.cpp 2016-04-08 08:28:58.665541000 +0000
@@ -32,7 +32,11 @@
} else {
char *pHomeDir = getenv("HOME");
if( pHomeDir ) {
+#ifdef NCS_BUILD_UNICODE
+ sUserPrefsFile.Format( NCS_T("%s%ls"), pHomeDir, NCS_T("/.erm/ncsuserprefs.xml") );
+#else
sUserPrefsFile.Format( NCS_T("%s%s"), pHomeDir, NCS_T("/.erm/ncsuserprefs.xml") );
@stevage
stevage / index.html
Created June 12, 2016 07:22
Railways
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.ie.css" />
<![endif]-->
<script src="http://cdn.leafletjs.com/leaflet-0.5/leaflet.js"></script>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<style>
@stevage
stevage / index.html
Created June 12, 2016 07:24
Tableau test
<!DOCTYPE HTML>
<html>
<head>
<style>
.tableauPlaceholde { width: 50% !important; height: 811px; }
</style>
</head>
<body style="background:gray;">
This is...a test.