Skip to content

Instantly share code, notes, and snippets.

View djtfmartin's full-sized avatar

Dave Martin djtfmartin

View GitHub Profile
@djtfmartin
djtfmartin / Jenkins_PPK_setup.txt
Created August 21, 2015 13:00
Jenkins PPK setup
Jenkins public private key
---------------------------
On index.als.scot
---------------
Create a user called jenkins:
useradd -m jenkins
usermod -G tomcat7 jenkins
sudo su jenkins
@djtfmartin
djtfmartin / scottish-feature-species.txt
Created August 24, 2015 16:09
scottish-feature-species.txt
Sciurus vulgaris
Felis silvestris
Martes martes
Vipera berus
Buteo buteo
Milvus milvus
Aquila chrysaetos
Fratercula arctica
Morus bassanus
Cepphus grylle
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
TaxonName
Acalitus brevitarsus
Acalitus calycophthirus
Acalitus longisetosus
Acalitus rudis
Aceria aceriscampestris
Aceria cephalonea
Aceria crataegi
Aceria erinea
Aceria euaspis
@djtfmartin
djtfmartin / meta.xml
Last active October 28, 2015 23:16
DwC-A meta.xml
<?xml version="1.0" encoding="UTF-8"?>
<archive xmlns="http://rs.tdwg.org/dwc/text/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" metadata="description.xml" xsi:schemaLocation="http://rs.tdwg.org/dwc/text/ http://rs.tdwg.org/dwc/text/tdwg_dwc_text.xsd">
<core ignoreHeaderLines="1" fieldsTerminatedBy="," fieldsEnclosedBy="&quot;" rowType="http://rs.tdwg.org/dwc/terms/Taxon">
<files>
<location>taxa.csv</location>
</files>
<id index="0" />
<field index="0" term="http://rs.tdwg.org/dwc/terms/taxonID" />
<field index="1" term="http://rs.tdwg.org/dwc/terms/parentNameUsageID" />
<field index="2" term="http://rs.tdwg.org/dwc/terms/acceptedNameUsageID" />
@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
#!/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 / 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">
@djtfmartin
djtfmartin / index.html
Created October 26, 2014 22:45
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://leafletjs.com/dist/leaflet.css" />
</head>
<body>
<div id="map" style="height: 800px"></div>
@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",