Skip to content

Instantly share code, notes, and snippets.

@pbinkley
pbinkley / reordered-carmina-burana.json
Last active April 20, 2024 22:43
Reordered Carmina Burana manuscript
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@type": "sc:Manifest",
"@id": "https://gist.githubusercontent.com/pbinkley/ce6123240e1e54a093b99541e649eec3/raw/7f290ae81079950fde9560162cd56ee179ea6fd5/reordered-carmina-burana.json",
"label": "Carmina Burana - BSB Clm 4660 - Reordered",
"metadata": [
{
"label": [
{
"@language": "en",
@pbinkley
pbinkley / Weekly.md
Created December 1, 2023 18:46
Obsidian template for weekly notes, using the Tasks, Dataview and Periodic Notes plugins. Under each day it has room for my notes (as bullet points), followed by any tasks relevant to that day and any notes that have been edited that day.

{{monday:dddd, MMMM D}}

Tasks:

TASK 
WHERE due = date("{{monday:YYYY-MM-DD}}") or scheduled = date("{{monday:YYYY-MM-DD}}") or completion = date("{{monday:YYYY-MM-DD}}")

Changed today:

@pbinkley
pbinkley / iiifcontenturl.md
Last active November 30, 2023 09:31
Exposing IIIF Images to Google Images

Problem: how to provide Google Images with a full image suitable for display in its search results, without requiring regular users to download a large image?

Solution: link to a suitable full image in a schema.org contentUrl property

Evidence that this works: I've tried it in a low-traffic hobby site, using static IIIF images. E.g. for this image, the schema.org entry looks like this:

@pbinkley
pbinkley / omeka-s-item-media.rb
Created September 3, 2020 15:27
Omeka-S REST API: minimal working example of creating an item with uploaded image in Ruby
=begin
This is a working example of the use of the Omeka-S REST API to create an item
with an associated image. It assumes you've set the API endpoint (e.g.
http://localhost:8080/api) and the authentication keys as environment
variables.
Note that the o:media element is an array, and can contain multiple images
(with sequential 'file_index' values, which must match the 'file[x]' element
in the payload).
@pbinkley
pbinkley / IA-IIIF-bookmarklet.js
Last active September 15, 2023 16:35
Bookmarklet that copies an Internet Archive IIIF manifest uri to the clipboard, if you are looking at a regular Internet Archive item.
javascript:(()=>{id=/https:\/\/archive.org\/details\/([^/]*).*/.exec(location.href);if(id){manifest="https://iiif.archive.org/iiif/"+id[1]+"/manifest.json";navigator.clipboard.writeText(manifest);alert("Copied manifest uri: "+manifest);}else{alert("This isn't an archive.org item.");}})();
{
"@id" : "https://gallica.bnf.fr/iiif/ark:/12148/btv1b105092395/manifest.json",
"label" : "BnF, département Estampes et photographie, RESERVE 4-DD-3136",
"attribution" : "Bibliothèque nationale de France",
"license" : "https://gallica.bnf.fr/html/und/conditions-dutilisation-des-contenus-de-gallica",
"logo" : "https://gallica.bnf.fr/mbImage/logos/logo-bnf.png",
"related" : "https://gallica.bnf.fr/ark:/12148/btv1b105092395",
"seeAlso" : [ "http://oai.bnf.fr/oai2/OAIHandler?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai:bnf.fr:gallica/ark:/12148/btv1b105092395" ],
"description" : "新形小紋帳 / [葛飾北斎] ; 柳亭種彦誌",
"metadata" : [ {
@pbinkley
pbinkley / wayback.json
Created April 12, 2023 21:42
Zotero lookup engine for Wayback Machine (note: it has to use the API, so it returns json)
{
"_name": "Wayback Machine",
"_alias": "Wayback",
"_description": "Wayback Machine Lookup",
"_icon": null,
"_hidden": false,
"_urlTemplate": "http://archive.org/wayback/available?url={z:url}",
"_urlParams": [],
"_urlNamespaces": {
"z": "http://www.zotero.org/namespaces/openSearch#"
{
"catalog": [
{
"manifestId": "https://ids.si.edu/ids/manifest/NMAH-2011-04245"
},
{
"manifestId": "https://ids.si.edu/ids/manifest/NMAH-AHB2015q011627"
},
{
"manifestId": "https://gist.githubusercontent.com/pbinkley/620122945cb1c6743533aa44bcdf9aeb/raw/7ff6adf8f8672d4bad80100b49d24a1b75709020/culvert-dressing-station.json"
@pbinkley
pbinkley / ChatGPT-marvin-failure.txt
Last active March 25, 2023 23:55
ChatGPT marvin failure
Peter Binkley how are all diodes down your left side?
As an artificial intelligence language model, I do not have a physical
body or components such as diodes. I exist solely as a program
running on computer servers. Therefore, I do not have a left or right
side, and I don't have any diodes or physical parts that could be
located on any side. I am a digital entity, and all my processes
exist in the virtual space.
Peter Binkley ok, but could you play along with my pop culture
@pbinkley
pbinkley / AccessLibCon2022.ical
Created October 11, 2022 17:27
iCalendar schedule of the Access Conference, Oct. 14 to 15, 2022
BEGIN:VCALENDAR
VERSION:2.0
PRODID:icalendar-ruby
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:America/Ottawa
BEGIN:DAYLIGHT
DTSTART:19700308T020000
TZOFFSETFROM:-0500
TZOFFSETTO:-0400