Skip to content

Instantly share code, notes, and snippets.

View alexgleith's full-sized avatar

Alex Leith alexgleith

View GitHub Profile
@alexgleith
alexgleith / geojsonCircleMarker.html
Last active November 26, 2016 20:06 — forked from clhenrick/geojsonCircleMarkerHTML
added sample data
<!doctype html>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<html>
<head>
<title>test</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" />
@alexgleith
alexgleith / map.on.click.example.js
Created March 4, 2014 04:15
map on click leaflet
map.on('click', function(e) {
var popLocation= e.latlng;
var popup = L.popup()
.setLatLng(popLocation)
.setContent('<p>Hello world!<br />This is a nice popup.</p>')
.openOn(map);
});
@alexgleith
alexgleith / SQLServerGISDatabase.reg
Last active August 29, 2015 13:57
SQL Server ODBC Add
!!Note, only use the bits in between these '---' in a .reg file. Need to be run from local machine as Admin.
Note2: For MapInfo, install the SQL Server Native Client driver, it allows MI to handle dates. You'll need to install it anyway to use these scripts. http://msdn.microsoft.com/en-us/sqlserver/aa937733.aspx
Default (works for 32 bit software on 32 bit machine, and 64 bit software on 64 bit machine).
---
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources]
@alexgleith
alexgleith / Seed-Truncate Python
Created May 4, 2014 23:07
Python Truncate or Seed GeoWebCache GeoServer Layers Python Code
import json
import urllib2
import base64
un='username'
pw='password'
baseURL = "https://URL/geoserver/gwc/rest/seed/"
descURL = "https://URL/geoserver/gwc/rest/layers/"
<?xml version="1.0" encoding="UTF-8"?>
<Capabilities xmlns="http://www.opengis.net/wmts/1.0"
xmlns:ows="http://www.opengis.net/ows/1.1"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gml="http://www.opengis.net/gml"
xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd"
version="1.0.0">
<!-- Service Identification --> <ows:ServiceIdentification>
<ows:Title>Basemaps_Orthophoto</ows:Title>
@alexgleith
alexgleith / index.html
Last active March 29, 2023 17:24
Simple Leaflet GeoServer Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="initial-scale=1,user-scalable=no,maximum-scale=1,width=device-width">
<title>Example Leaflet</title>
<link rel="stylesheet" href="https://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css">
</head>
@alexgleith
alexgleith / GeoServer GWC REST Example
Created March 18, 2015 21:33
Truncate and Seed GWC cached layers in GeoServer
import json
import urllib2
import base64
baseURL = "https://domain.example:8080/geoserver/gwc/rest/seed/"
descURL = "https://domain.example:8080/geoserver/gwc/rest/layers/"
un = 'username'
pw = 'biglongtrickypassword'
def truncateLayer(layer):
@alexgleith
alexgleith / Zoning.sld
Created April 17, 2015 03:12
Zoning SLD - Tasmanian Planning Scheme Style for GeoServer
<?xml version="1.0" encoding="UTF-8"?><sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" version="1.0.0">
<sld:NamedLayer>
<sld:Name>Zoning_GCC</sld:Name>
<sld:UserStyle>
<sld:Name>Zoning_GCC</sld:Name>
<sld:FeatureTypeStyle>
<sld:Name>name</sld:Name>
<sld:Rule>
<sld:Name>10 General Residential</sld:Name>
<ogc:Filter>

Keybase proof

I hereby claim:

  • I am alexgleith on github.
  • I am alexgleith (https://keybase.io/alexgleith) on keybase.
  • I have a public key whose fingerprint is A534 6E24 5A55 A3C6 1AE4 4C2D 9322 7071 6AD3 C746

To claim this, I am signing this object:

@alexgleith
alexgleith / collapsing-table.js
Created April 4, 2016 21:44
Collapsing (grouped) tables extension to bootstrap-table.
/**
* @author: Yura Knoxville
* @version: v1.0.0
*/
!function ($) {
'use strict';
var initBodyCaller,