Skip to content

Instantly share code, notes, and snippets.

@atomotic
atomotic / Readme.md
Last active September 9, 2022 09:39
Internet Archive Save Page Now
View Readme.md
View gist:e96982253136dcd253f8376ded2fd0e5
sqlite> .schema itemAnnotations
CREATE TABLE IF NOT EXISTS "itemAnnotations" (
itemID INTEGER PRIMARY KEY,
parentItemID INT NOT NULL,
type INTEGER NOT NULL,
authorName TEXT,
text TEXT,
comment TEXT,
color TEXT,
pageLabel TEXT,
@atomotic
atomotic / himalayandatabase.md
Last active December 5, 2021 13:31
himalayandatabase - from dbf to json api
View himalayandatabase.md

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 / epub-search.md
Created November 13, 2021 12:11
indexing epub content into solr
View epub-search.md

indexing epub content into solr

solr schema

  • 1 document per chapter, then collapse
  • multivalued fields: chapter_title and chapter_text, keeping order.

text extraction

how to extract structured text from epub

View docker-compose.yml
version: "3"
node-exporter:
image: prom/node-exporter
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- "--path.procfs=/host/proc"
@atomotic
atomotic / readme.md
Created October 3, 2021 10:46
export a static image from Annotorious, with annotation data embedded
View readme.md
@atomotic
atomotic / full.md
Last active December 19, 2020 16:58
opac sbn api
View full.md

full.json

http://opac.sbn.it/opacmobilegw/full.json?bid={BID}

--

➜  ~  http "http://opac.sbn.it/opacmobilegw/full.json?bid=IT%5CICCU%5CRAV%5C2002745"
HTTP/1.1 200 OK
Connection: close
Content-Type: application/json;charset=UTF-8
@atomotic
atomotic / wget-lua.sh
Created May 3, 2016 09:28
install wget-lua on osx
View wget-lua.sh
brew install lua5.1
curl http://warriorhq.archiveteam.org/downloads/wget-lua/wget-1.14.lua.LATEST.tar.bz2 | tar -xj --strip-components=1
sed -i -e s=usr/include/lua5.1=usr/local/include/lua5.1=g configure.ac
./configure
make
cp src/wget /usr/local/bin/wget-lua
wget-lua --help|grep lua
GNU Wget 1.14.lua.20130523-9a5c, a non-interactive network retriever.
Usage: wget-lua [OPTION]... [URL]...
@atomotic
atomotic / brainwashed-2017-poll.txt
Created January 13, 2018 09:07
brainwashed 2017 Readers Poll - The Results
View brainwashed-2017-poll.txt
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