Skip to content

Instantly share code, notes, and snippets.

View atomotic's full-sized avatar

raffaele messuti atomotic

View GitHub Profile
@atomotic
atomotic / readme.md
Created October 3, 2021 10:46
export a static image from Annotorious, with annotation data embedded
@atomotic
atomotic / iiif-annotation-studio.png
Last active March 7, 2019 15:58
iiif-annotation-studio
iiif-annotation-studio.png
~ ipfs ls /ipns/ipfs-sec.stackexchange.cloudflare-ipfs.com/crypto/
zdj7WawSwGzackrPMpRyE5gB14rrR3CXSML4Cowsfo8RVA48m 261478141 A
zdj7WmdqpgAKtT6bik5FZiUuEBw3ibBE2Jvbf2yDHoCTeZtUR 2369946 -
zdj7WikogGGVBPciUv1hgnecawo7P4E6Rwj44LC6vdibCywTN 276549715 I
zdj7WfHUdRgg4LTr77ZX3tR3fLj7xDDpo8StCFFU4B2ZR43cm 1034 M
zdj7WfKAh1sMoUDZLq13yJzyb7dpHaqSV1p2Ftdx2VUgxMhFe 154 index.html
zdj7WcC5bvaUjBXYXZnsUa7Ghe2rtiSst9JnwpMwDTBWC4N4m 8343 search.html
zdj7WazUKfQCWpKePKDRBFaomsJrNcEu6U9obNP9UhLg6cArN 53013564 _index
@atomotic
atomotic / mastodon-followers.sh
Created August 31, 2018 08:26
get the list of followers of a mastodon user. output in ntriples
#!/usr/bin/env bash
instance="https://digipres.club"
user="raffaele"
json=$(curl -s -H "Accept: application/activity+json" $instance/users/$user/followers?page=1)
echo "$json" | jq -r .orderedItems[] | xargs -I% echo "<%> <follows> <$instance/user/$user> ."
next=$(echo "$json" | jq -r .next)
while true; do
# apt install rustc cargo
# git clone https://github.com/tari/warcdedupe
# cd warcdedupe
# cargo install
# ...
# ./target/debug/warcdedupe -h
WARC deduplicator.
Usage:
warcdedupe [options] [<infile>] [<outfile>]

install solr and create a core (books)

brew install solr
solr start
solr create -c books -d /usr/local/Cellar/solr/7.2.1/example/files/conf

index a pdf

post -c books /tmp/gabriella-giannachi-archive-everything-mapping-the-everyday.pdf
@atomotic
atomotic / brainwashed-2017-poll.txt
Created January 13, 2018 09:07
brainwashed 2017 Readers Poll - The Results
spotify:album:4nSWX5A4xVomzrOEGDKLQ6 - Slowdive, Slowdive
spotify:album:4JQ2igmQEWUihSRzWgTiCF - Gas, Narkopop
spotify:album:0D8xltlqklXZ1DV7lFyE22 - Drew McDowall, Unnatural Channel
spotify:album:7Hcbzsu4lqRzPakrCnpgb9 - Emptyset, Borders
spotify:album:4y372QHtXp8aJCV7M4YkBv - Lawrence English, Cruel Optimism
spotify:album:5EXqFb0ch5dqP2ncl63XVY - Gnod, Just Say No To The Psycho Right-Wing Capitalist Fascist Industrial Death Machine
spotify:album:4yLRI4kaOy4LhSPZ2sCVbE - Godflesh, Post Self
spotify:album:6B1OkPs0AlG9QsHIxKwrgp - William Basinski, A Shadow In Time
spotify:album:6LDgPsDJlyJ948ARpncN9c - Alessandro Cortini, Avanti
spotify:album:02RHfsgbl7H9lnYXEsTLsA - Wire, Silver / Lead
~ curl -s -I  https://tools.wmflabs.org/hub/isbn:0-224-01168-5 | grep Location
Location: https://en.wikipedia.org/wiki/High-Rise_%28novel%29

~ curl -s -I  https://tools.wmflabs.org/hub/viaf:9842556 | grep Location

Location: https://en.wikipedia.org/wiki/J._G._Ballard

@atomotic
atomotic / himalayandatabase.md
Last active December 5, 2021 13:31
himalayandatabase - from dbf to json api

himalayandatabase

from a Visual FoxPro GUI to json api with datasette

http://himalayandatabase.com

The Himalayan Database is a compilation of records for all expeditions that have climbed in the Nepalese Himalaya. The database is based on the expedition archives of Elizabeth Hawley, a longtime journalist based in Kathmandu, and it is supplemented by information gathered from books, alpine journals and correspondence with Himalayan climbers.

The Himalayan Database is a Microsoft Visual Foxpro 9 program.

@atomotic
atomotic / gpx-reverse-osm.sh
Created October 19, 2017 10:37
save into an sqlite database data of the first trackpoint of a gpx track using openstreetmap reverse nominatim
#!/usr/local/Cellar/bash/4.4.12/bin/bash
# sqlite3 tracks.db "CREATE TABLE tracks ( id integer primary key, gpxfile varchar, osm json)"
GPX=$1
echo "$GPX"
COORD=$(xml sel -N x=http://www.topografix.com/GPX/1/1 -t -v "//x:trkpt[1]/@*" "$GPX")
readarray -t y <<<"$COORD"
LAT=${y[0]}