Skip to content

Instantly share code, notes, and snippets.

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]}
@atomotic
atomotic / readme.md
Last active October 19, 2017 04:29
poor man's WARC viewer
@atomotic
atomotic / gist:6821aded25864548dd4a578fbe1fa8b1
Created October 9, 2017 08:37
ffmpeg to save radioradicale stream
ffmpeg -i http://video.radioradicale.it/store-83/_definst_/mp3:roma/2016/12/MP909393.mp3/playlist.m3u8 -c copy archivi.mp3
➜ tika -m -j http://www.anvur.org/rapporto-2016/files/Area01/VQR2011-2014_Area01_Tabelle.pdf | jq .
ERROR OpenType Layout tables used in font ABCDEE+Cambria,Bold are not implemented in PDFBox and will be ignored
ERROR OpenType Layout tables used in font Times New Roman are not implemented in PDFBox and will be ignored
ERROR OpenType Layout tables used in font Times New Roman,BoldItalic are not implemented in PDFBox and will be ignored
ERROR OpenType Layout tables used in font Times New Roman,Italic are not implemented in PDFBox and will be ignored
ERROR OpenType Layout tables used in font ABCDEE+Calibri,BoldItalic are not implemented in PDFBox and will be ignored
{
"Author": "Andrea Gordiani",
"Content-Length": "9651618",
"Content-Type": "application/pdf",
➜ ~ pip install wdmapper
➜ ~ wdmapper get P2748 P3266
#FORMAT: BEACON
#NAME: LocFDD ID
#DESCRIPTION: Mapping from PRONOM file format identifiers to LocFDD IDs
#PREFIX: https://www.nationalarchives.gov.uk/pronom/
#TARGET: http://www.loc.gov/preservation/digital/formats/fdd/{ID}.shtml
#SOURCESET: http://www.wikidata.org/entity/Q235557
#TARGETSET: http://www.wikidata.org/entity/Q235557
A_Blok_1917
AgentVA_1917
Bolsheviks_1917
BritishEmb1917
Bublikov_1917
CaptZeitlin1917
DukeMikhail1917
EmpressAlix1917
ErvinGrimm_1917
FarmAndrey_1917