Skip to content

Instantly share code, notes, and snippets.

View djtfmartin's full-sized avatar

Dave Martin djtfmartin

View GitHub Profile
Talpa europaea
Vulpes vulpes
Abies cephalonica
Abies cilicica
Abies concolor
Abies delavayi
Abies firma
Abies fraseri
Abies grandis
Abies homolepis
{
"description": "These habitats are derived using the EUNIS Land Cover Scotland geospatial layer provided by Scottish Natural Heritage. This is a Scotland raster based (10m) landcover made up of best available national data classified according to the EUNIS (EUropean Nature Information System). The main purpose of the landcover is to provide well-known, nationally consistent information for SNH\u2019s national habitat network models. Secondary purposes include input for other analysis projects as well as map backdrops.",
"layerName": "eunis_land_cover_scotland_polygonize",
"metadataLink": "https://gateway.snh.gov.uk/natural-spaces/dataset.jsp?dsid=EUNIS",
"tree": {
"A": {
"children": {
"A1": {
"guid": "A1",
"name": "Littoral rock and other hard substrata",
@djtfmartin
djtfmartin / schema.xml
Created September 13, 2016 14:54
SOLR biocache schema
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@djtfmartin
djtfmartin / habitats.json
Created April 20, 2016 12:19
habitats.json
{
"description": "These habitats are derived using the EUNIS Land Cover Scotland geospatial layer provided by Scottish Natural Heritage. This is a Scotland raster based (10m) landcover made up of best available national data classified according to the EUNIS (EUropean Nature Information System). The main purpose of the landcover is to provide well-known, nationally consistent information for SNH\u2019s national habitat network models. Secondary purposes include input for other analysis projects as well as map backdrops.",
"layerName": "eunis_land_cover_scotland_polygonize",
"metadataLink": "https://gateway.snh.gov.uk/natural-spaces/dataset.jsp?dsid=EUNIS",
"tree": {
"A": {
"children": {
"A1": {
"guid": "A1",
"name": "Littoral rock and other hard substrata",
@djtfmartin
djtfmartin / index.html
Created February 25, 2016 22:21
Charts demos
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.min.js"></script>
<script src="https://raw.githubusercontent.com/tomsouthall/Chart.HorizontalBar.js/master/Chart.HorizontalBar.js"></script>
<script src="https://code.jquery.com/jquery-1.12.1.min.js"></script>
</head>
<body style="width:100%;">
<div id="charts" style="padding:15px; font-family:'Arial';">
<div>
<div class="chart-content">
#!/bin/bash
export TZ=Australia/Canberra
date
# all ALA projects should use/source this value from this script
export ALA_MAVEN_REPO_URL="http://nexus.ala.org.au/content/repositories"
# we do not need this, if a custom <id> is NOT set (NOT used), and therefore NOT passed to maven deploy:deploy-file mojo in repositoryID
# maven will look for the "default" <id>remote-repository</id> in ~/.m2/settings.xml
@djtfmartin
djtfmartin / Dockerfile
Last active October 20, 2016 21:42
Base dockerfile
FROM ubuntu:14.04
MAINTAINER Dave Martin <David.Martin@csiro.au>
RUN apt-get update && apt-get -y install openssh-server supervisor
RUN mkdir /var/run/sshd
RUN echo 'root:password' | chpasswd
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config
# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
@djtfmartin
djtfmartin / eunis_tif2asc.sh
Created November 24, 2015 12:22
eunis_tif2asc.sh
#!/bin/bash
#convert to asc for easy editing
gdal_translate -of AAIGrid /data/ala/data/layers/raw/EUNIS_LAND_COVER_SCOTLAND_FINAL.tif /data/ala/data/layers/raw/EUNIS_LAND_COVER_SCOTLAND_FINAL.tofix.asc
#edit, works on osx
sed 's/[[:<:]]2147483647[[:>:]]/0/g' /data/ala/data/layers/raw/EUNIS_LAND_COVER_SCOTLAND_FINAL.tofix.asc | sed 's/[[:<:]]3[[:>:]]/3/g' | sed 's/[[:<:]]5[[:>:]]/4/g' | sed 's/[[:<:]]7[[:>:]]/5/g' | sed 's/[[:<:]]11[[:>:]]/6/g' | sed 's/[[:<:]]12[[:>:]]/7/g' | sed 's/[[:<:]]101[[:>:]]/8/g' | sed 's/[[:<:]]102[[:>:]]/9/g' | sed 's/[[:<:]]201[[:>:]]/10/g' | sed 's/[[:<:]]202[[:>:]]/11/g' | sed 's/[[:<:]]203[[:>:]]/12/g' | sed 's/[[:<:]]401[[:>:]]/13/g' | sed 's/[[:<:]]504[[:>:]]/14/g' | sed 's/[[:<:]]505[[:>:]]/15/g' | sed 's/[[:<:]]602[[:>:]]/16/g' | sed 's/[[:<:]]604[[:>:]]/17/g' | sed 's/[[:<:]]701[[:>:]]/18/g' | sed 's/[[:<:]]703[[:>:]]/19/g' | sed 's/[[:<:]]704[[:>:]]/20/g' | sed 's/[[:<:]]706[[:>:]]/21/g' | sed 's/[[:<:]]901[[:>:]]/22/g' | sed 's/[[:<:]]902[[:>:]]/23/g' | sed 's/[[:<:]]1
TaxonName
Acalitus brevitarsus
Acalitus calycophthirus
Acalitus longisetosus
Acalitus rudis
Aceria aceriscampestris
Aceria cephalonea
Aceria crataegi
Aceria erinea
Aceria euaspis
Acanthis cabaret
Acanthis flammea
Acanthis flammea subsp. flammea
Acanthis hornemanni
Acanthis hornemanni subsp. exilipes
Accipiter gentilis
Accipiter gentilis subsp. gentilis
Accipiter nisus
Acrocephalus agricola
Acrocephalus arundinaceus