Skip to content

Instantly share code, notes, and snippets.

View larsgw's full-sized avatar

Lars Willighagen larsgw

View GitHub Profile
@larsgw
larsgw / bioblitzes_area.csv
Last active April 24, 2025 12:26
Area of different BioBlitzes in the Biodiversity Challenge 2025 on Observation.org
BioBlitz Area (ha)
WUR 2025 2626
AgroParisTech 2025 1344
KU Leuven 2025 1141
Uni. of Life and Env. Science Ukraine (UBIP) 2025 556
Hochschule Geisenheim University 2025 320
Uni of Nat. Resources and Life Sci. (Boku) 2025 149
Vytautas Magnus University Agriculture Ac. 2025 148
Radboud universiteit 2025 129
University of Reading 2025 125
@larsgw
larsgw / index.js
Created March 29, 2025 10:32
Mastodon Wide Columns
// ==UserScript==
// @name Mastodon Wide Columns
// @namespace http://tampermonkey.net/
// @version 2025-03-28
// @description Wide columns and simpler scrollbars for Mastodon
// @author You
// @match https://mastodon.social/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=mastodon.social
// @grant GM_addStyle
// ==/UserScript==
@larsgw
larsgw / feeds.tsv
Last active July 29, 2023 11:47
Get ACS journal feeds
name feed journal_code
Accounts of Chemical Research https://pubs.acs.org/action/showFeed?type=axatoc&feed=rss&jc=achre4 achre4
Accounts of Materials Research https://pubs.acs.org/action/showFeed?type=axatoc&feed=rss&jc=amrcda amrcda
ACS Agricultural Science & Technology https://pubs.acs.org/action/showFeed?type=axatoc&feed=rss&jc=aastgj aastgj
ACS Applied Bio Materials https://pubs.acs.org/action/showFeed?type=axatoc&feed=rss&jc=aabmcb aabmcb
ACS Applied Electronic Materials https://pubs.acs.org/action/showFeed?type=axatoc&feed=rss&jc=aaembp aaembp
ACS Applied Energy Materials https://pubs.acs.org/action/showFeed?type=axatoc&feed=rss&jc=aaemcq aaemcq
ACS Applied Engineering Materials https://pubs.acs.org/action/showFeed?type=axatoc&feed=rss&jc=aaemdr aaemdr
ACS Applied Materials & Interfaces https://pubs.acs.org/action/showFeed?type=axatoc&feed=rss&jc=aamick aamick
ACS Applied Nano Materials https://pubs.acs.org/action/showFeed?type=axatoc&feed=rss&jc=aanmf6 aanmf6
@larsgw
larsgw / index.html
Created September 23, 2022 09:34
RTI Viewer lite
<canvas id="a" width="1000" height="1000" style="border: 1px solid red;"></canvas>
<script type="text/javascript">
function parseImageResponse (response) {
// Parse XML
const parser = new DOMParser()
const xml = parser.parseFromString(response, 'application/xml')
const multiRes = xml.getElementsByTagName('MultiRes')[0]
// Gather info
@larsgw
larsgw / prior_art.csv
Last active June 21, 2021 23:36
Identification resource file formats
name url features notes
Structured Descriptive Data (SDD) https://github.com/tdwg/sdd No clear documentation, especially how to use it for identification keys
LIF3 https://help.lucidcentral.org/lucid/lif3-lucid-interchange-format-version-3-files/ No notable official documentation at all, used mainly (only?) by expensive application
NBIC's identification key widget data model https://github.com/Artsdatabanken/identification_key/blob/master/Data%20format%20(en).md Matrix/dichotomous keys, subsets, morphs, multiple levels Standardised but usage is specific to Norway (and Norwegian Biodiversity Information Centre even)
Artfakta artnycklar JSON format https://artfakta.se/artbestamning/artnycklar Matrix/dichotomous keys, ??? Ostensibly only used internally
Soortzoekers JSON format https://determineren.nederlandsesoorten.nl/ Matrix keys, morphs/subets (?), multiple levels Ostensibly only used internally
DELTA https://www.delta-intkey.com/www/standard.htm Matrix/dichotomous keys, no media Not entirely s
@larsgw
larsgw / issn.js
Last active June 17, 2021 11:39
Reversible ISSNs
const fs = require('fs').promises
const path = require('path')
async function main () {
const file = await fs.readFile(path.join(__dirname, 'Downloads/issns.csv'), 'utf8')
const issns = new Set(file.trim().split('\n').slice(1))
const printed = new Set()
for (const issn of issns) {
if (printed.has(issn)) continue
const [a, b] = issn.split('-')
@larsgw
larsgw / csl-data.json
Created May 2, 2020 14:11
Example CSL-JSON file
[{
"type": "article",
"title": "Example CSL-JSON file",
"author": [{
"family": "Willighagen",
"given": "Lars"
}],
"issued": {
"date-parts": [[2020, 5, 2]]
},
@larsgw
larsgw / types.json
Created January 1, 2019 14:47
Initial test to create Wikidata <-> CSL mapping
{
"Q571": "book",
"Q922203": "book",
"Q19705": "book",
"Q191067": "article",
"Q59908": "article",
"Q216665": "book",
"Q190399": "pamphlet",
"Q327611": "pamphlet",
"Q1173065": "book",
@larsgw
larsgw / bibtex.grammar
Created July 19, 2018 21:41
BibTeX PEG.js grammar
// BibTeX Grammar
// ==============
{
const join = array => array.join('')
const toObject = array => array.reduce((object, [key, value]) => {
object[key] = value
return object
}, {})
@larsgw
larsgw / id.md
Created November 27, 2017 17:02
Testing GitHub Markdown

dataType

dataType {#customId}