Skip to content

Instantly share code, notes, and snippets.

@rdmpage
rdmpage / query.txt
Created May 19, 2016 10:08
Querying Wikipedia for links to BioStor
The Mediawiki API can be used to find qhat wikipedia pages link to BioStor, e.g.:
https://en.wikipedia.org/w/api.php?action=query&list=exturlusage&euquery=biostor.org&eulimit=20
See https://www.mediawiki.org/wiki/API:Lists/All#Exturlusage for details.
@rdmpage
rdmpage / Cricula.nexus
Created May 10, 2016 13:27
Cricula NEXUS
#NEXUS
Begin trees; [Treefile saved Thu Aug 20 21:42:14 2015]
[!
>Data file = /Users/rpage/Sites/geojson-phylogeny-demo/bold-api/service/tmp/SAUPA642-10/SAUPA642-10.nex
>Neighbor-joining search settings:
> Ties (if encountered) will be broken systematically
> Distance measure = uncorrected ("p")
> (Tree is unrooted)
]
@rdmpage
rdmpage / Cricula.geojson
Last active May 10, 2016 13:27
Cricula barcode map
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rdmpage
rdmpage / primers.txt
Last active May 17, 2018 10:10
COI DNA barcode primer locations
Reference COI is NC_003128 Buteo buteo COI
TZBRD035-15.COI-5P [648bp] ctgatctttggtgnatgagcaggcatagccggcacagcacttagcctactaatccgcgcagaactaggacagccaggaacactattgggagacgaccaaatctacaatgtaatcgtaacagcccacgctttcgtcataatcttcttcatagtcatacctattatgatcggaggcttcggaaactgactggttccactcataattggcgccccagacatagcattcccccgcataaataatatgagcttctgactcctcccaccttcttttctcctcctactagcctcctctacagtagaagccggggctggcactggatgaactgtttatccacccctagccggtaatcttgcccacgcgggcgcatcagtagacctggctattttttcccttcacttggcaggcgtgtcgtccatcttaggagctattaactttatcaccacaattattaacataaagccccctgcactatcacaatatcaaacacccctcttcgtatgatccgtcctcattactgctatcctcttactactatccctgccagtcctagccgccgggattacaatactcctcaccgatcgcaacctcaacactacattctttgaccctgcaggaggaggagacccaatcctgtatcaacacctattc
TZBRD019-15.COI-5P tcttcggcgcctgagctggtatagtcggcaccgccctcagcttactcatccgtgcagaactcggccaacccggcacactcctaggtgacgaccaaatttataacgtaatcgttaccgcacatgccttcgtaataatcttcttcatagttataccaatcatgatcggaggattcggaaactgacttgttccactcataattggcgctc
@rdmpage
rdmpage / index.html
Last active April 20, 2016 21:46
Query GBIF by drawing on map
<!DOCTYPE html>
<html>
<head>
<title>GBIF search</title>
<meta charset="utf-8" />
<link
rel="stylesheet"
href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css"
/>
<link
@rdmpage
rdmpage / geojson-conversion.sh
Created January 11, 2016 13:15 — forked from benbalter/geojson-conversion.sh
Bulk convert shapefiles to geojson using ogr2ogr
# Bulk convert shapefiles to geojson using ogr2ogr
# For more information, see http://ben.balter.com/2013/06/26/how-to-convert-shapefiles-to-geojson-for-use-on-github/
# Note: Assumes you're in a folder with one or more zip files containing shape files
# and Outputs as geojson with the crs:84 SRS (for use on GitHub or elsewhere)
#geojson conversion
function shp2geojson() {
ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp"
}
@rdmpage
rdmpage / collection.json
Created December 10, 2015 06:02
EOL Collections Write API
{"collection":{"name":"Mesoplodon","description":"Mesoplodon species","collection_items":[{"collected_item_type":"TaxonConcept","collected_item_id":328563}]}}
@rdmpage
rdmpage / jbig2enc-master.txt
Created October 21, 2015 20:29
Compiling leptonica-1.68 and jbig2enc
Need to supply paths to configure
./configure CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
@rdmpage
rdmpage / curl.txt
Created October 5, 2015 13:26
Get URLs/PDFs over slow connections (e.g., China)
curl -L -C - '<url>'
@rdmpage
rdmpage / Merge PDFs.txt
Created September 8, 2015 21:24
Merge PDFs in a directory into one PDF using ghostscript, without rotating pages
gs -q -dNOPAUSE -dBATCH -dAutoRotatePages=/None -sDEVICE=pdfwrite -sOutputFile=merged.pdf *.pdf