Skip to content

Instantly share code, notes, and snippets.

View alexgleith's full-sized avatar

Alex Leith alexgleith

View GitHub Profile
@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]
<?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 / 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,
@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 / awscli-currentAmzLinux.sh
Created April 1, 2017 00:17 — forked from rdp-cloud/awscli-currentAmzLinux.sh
When run from an EC2 instance this snippet will return the CURRENT ami id for Amazon Linux in the REGION that the instance is running in and load it up into a variable called currentAMI.
#!/bin/bash -xe
# grab the Availability Zone from the Meta Data service
az=$(curl http://169.254.169.254/latest/meta-data/placement/availability-zone/)
# drop the trailing zone to get the REGION the instance is running in.
currentRegion=${az%?}
# retirve the source AMI (latest Amazon Linux image in this case)
currentAMI=$(aws ec2 describe-images --owners self amazon --filters "Name=name,Values=amzn-ami-hvm-*gp2" --query 'Images[].[CreationDate,ImageId]' --output text --region $currentRegion | sort -k1 | tail -n1 | awk '{print $2}')
BASE:
var path = require('path')
var config = require('../config')
var cssLoaders = require('./css-loaders')
var projectRoot = path.resolve(__dirname, '../')
var webpack = require('webpack')
module.exports = {
entry: {
@alexgleith
alexgleith / turf-line-split-test.geojson
Last active October 2, 2017 21:59
splitLine changing order of split features changes location of split
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.