Skip to content

Instantly share code, notes, and snippets.

@rdmpage
rdmpage / README.md
Last active December 22, 2015 21:58
Zoomable page

Zoomable image viewer based on code from tlrobinson

@rdmpage
rdmpage / POST.json
Created September 8, 2013 13:29
Example of BioNames API adding identifiers and thumbnail to a BibJSON format reference. Simply POST JSON to http://bionames.org/api/api_lookup.php
{ "id":"B25", "author":[ {"firstname":"B","lastname":"Kensley","name":"B Kensley"} ], "type":"article", "title":" Decapod Crustacea from the south-west Indian Ocean.", "journal":{ "name":"Annals of the South African Museum ", "volume":"52", "pages":"149--181" }, "year":"1969", "identifier":[]}
@rdmpage
rdmpage / doiRA.js
Created May 30, 2013 15:47
Bookmarklet to find registration agency of a DOI using CrossRef service, see http://www.crossref.org/crweblog/2013/05/find_the_registration_agency_f.html. Create a bookmark on your browser bookmark bar and paste Javascript below as bookmark address. Then highlight DOI on web page, click book mark and see the registration agency.
javascript:u=location.href;a=false;x=window;e=x.encodeURIComponent;d=document;if((s=d.selection)?t=s.createRange().text:t=x.getSelection()+'')(r=/(doi:)?\s?(10\.\d{4}\/\S+)/.exec(t))?u=r[2]:a=true;a?alert('Please%20highlight%20a%20full%20DOI,%20or%20deselect%20text%20to%20add%20this%20page.'):w=open('http://doi.crossref.org/doiRA/'+u,'DOI%20Registration%20Agency','width=720,height=755,scrollbars,resizable');void(x.setTimeout('w.focus()',200));
@rdmpage
rdmpage / GeoJSON.js
Created May 2, 2013 10:05
Mesiobov milliped data compared with GBIF
var GeoJSON = function( geojson, options ){
var _geometryToGoogleMaps = function( geojsonGeometry, opts, geojsonProperties ){
var googleObj;
switch ( geojsonGeometry.type ){
case "Point":
opts.position = new google.maps.LatLng(geojsonGeometry.coordinates[1], geojsonGeometry.coordinates[0]);
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rdmpage
rdmpage / eol.php
Created March 12, 2013 14:30
How to retrieve values from EOL XML output (note we have to register default namespace)
<?php
$xml ='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response xmlns="http://www.eol.org/transfer/content/1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dwc="http://rs.tdwg.org/dwc/terms/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xsi:schemaLocation="http://www.eol.org/transfer/content/1.0 http://services.eol.org/schema/content_1_0.xsd">
<taxonConcept>
<taxonConceptID>1045608</taxonConceptID>
<dwc:ScientificName>Apis mellifera Linnaeus 1758</dwc:ScientificName>
<commonName xml:lang="da" eol_preferred="true">Honningbi</commonName>
<commonName xml:lang="de" eol_preferred="true">Honigbiene</commonName>
<commonName xml:lang="en" eol_preferred="true">European honey bee</commonName>
@rdmpage
rdmpage / UWyoming.EducationOutreachCoordinator
Created February 26, 2013 14:34
Decoded EvolDir message
Position Advertisement: Education/Outreach Coordinator
The Education/Outreach Coordinator is an academic staff position of the University of Wyoming’s Biodiversity Institute (BI). The position will work with other BI staff in pursuit of its mission. The Education/Outreach Coordinator will coordinate the Institute’s education resources, manage the education components of the BI’s website, and provide education outreach to Wyoming’s teachers and schools.
Institute/University Description: In 2012, the University of Wyoming created the BI to encourage wise and informed decisions concerning the conservation of biological diversity. To meet this challenge a central component of the BI’s mission is to promote, develop and evaluate biodiversity education in the K-12 schools of Wyoming. More information is available at www.uwyo.edu/biodiversity<http://www.uwyo.edu/biodiversity>.
The University of Wyoming provides high quality undergraduate and graduate programs to 13,000 students from all 50 states and more than 90 co
@rdmpage
rdmpage / Request for ION numbers
Last active December 14, 2015 03:09
Requests to get number of new species and subspecies names from ION
POST page=graphs&novType=New+species+and+subspecies&searchType=data&q=Animalia to http://www.organismnames.com/metrics.htm
@rdmpage
rdmpage / index.html
Created December 6, 2012 22:27
NEXUS tree viewer
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>NEXUS Tree Viewer</title>
<style type="text/css" title="text/css">
@import url("/style.css?20120730");
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="http://blog.accursedware.com/jquery-svgpan/jquery-svgpan.js"></script>