Skip to content

Instantly share code, notes, and snippets.

wondering if a screenshot generated on the user side (i imagine a chrome extension that a webarchivist uses to nominate seeds, and something like https://developer.chrome.com/extensions/tabs#method-captureVisibleTab to capture the image) could be compared with a screenshot generated server side (phantomjs or similar) to spot differences and improve quality of the archive

### Keybase proof
I hereby claim:
* I am atomotic on github.
* I am atomotic (https://keybase.io/atomotic) on keybase.
* I have a public key whose fingerprint is 84EF B4A9 3159 78FC 98C6 BED1 7BEC E8BD A634 1C49
To claim this, I am signing this object:
package EPrints::Plugin::Export::DEPOSITOLEGALE;
# eprint needs magic documents field
# documents needs magic files field
use EPrints v3.3.0;
use EPrints::Plugin::Export::XMLFile;
@ISA = ( "EPrints::Plugin::Export::DEPOSITOLEGALE" );
@atomotic
atomotic / osm-it-garmin-dowload
Last active August 29, 2015 14:24
scaricare mappe openstreetmap delle regioni italiane e prepararle per il caricamento su un gps garmin.
#!/usr/bin/env bash
declare -A maps
maps=(
["osm-emr"]="http://geodati.fmach.it/gfoss_geodata/osm/output_img/emilia-romagna.tar.gz"
["osm-vdo"]="http://geodati.fmach.it/gfoss_geodata/osm/output_img/valle-aosta.tar.gz"
["osm-piemonte"]="http://geodati.fmach.it/gfoss_geodata/osm/output_img/piemonte.tar.gz"
["osm-trentino"]="http://geodati.fmach.it/gfoss_geodata/osm/output_img/trentino-alto-adige.tar.gz"
["osm-basilicata"]="http://geodati.fmach.it/gfoss_geodata/osm/output_img/basilicata.tar.gz"
@atomotic
atomotic / gist:e0e3536b8bc14737685f
Last active August 29, 2015 14:24
quote @virnatwit

"Al fondo, vedo (non certo nei curatori del progetto, ma come sottofondo ancora presente nella mente di alcuni bibliotecari italiani), l'idea che le opere conservate in una biblioteca siano in qualche modo "possedute" dalla biblioteca. Conservare (che è la mission delle biblioteche per le opere storiche) non implica acquisire diritti, quanto piuttosto, semmai, doveri, come appunto quello della massima valorizzazione delle opere. Al giorno d'oggi questo non può che significare rilasciare anche le digitalizzazioni in pubblico dominio (o CC0)."

@atomotic
atomotic / warc-formats.go
Last active August 29, 2015 14:26
warc-formats
package main
import (
"bufio"
"bytes"
"fmt"
"github.com/richardlehane/siegfried"
"github.com/slyrz/warc"
"io/ioutil"
"log"
@atomotic
atomotic / h3-new-job
Last active September 23, 2015 18:58 — forked from anonymous/h3-new-job
#!/bin/bash
. heritrix.conf
if [ -z "$1" ] || [ -z "$2" ]; then
echo usage: $0 jobname seedsfile
exit
fi
JOB=$1
@atomotic
atomotic / gist:c3d9c3c6ef8210664371
Last active September 25, 2015 16:34
get the latest snapshot url archived by internetarchive waybackmachine

add to your .zshrc/.bashrc this function (jq is required)

function ia-latest() { curl -s http://archive.org/wayback/available\?url=$* | jq -r '.archived_snapshots.closest.url' }

run

$ ia-latest http://twitter.com/atomotic
http://web.archive.org/web/20131230143739/https://twitter.com/atomotic
@atomotic
atomotic / Gemfile
Created October 23, 2012 18:47
ruby-oai seamless resumption
source "http://rubygems.org"
gem "oai", :git => "https://github.com/tjdett/ruby-oai.git", :branch => "seamless-resumption"
gem "redis"
gem "libxml-ruby"
@atomotic
atomotic / gist:17d9c43fd0db820dd95e
Last active November 4, 2015 10:19
phantomjs-warcprox
$ pip install warcprox
$ brew install phantomjs
$ warcprox -c warcprox.pem
$ phantomjs --proxy=localhost:8000 \
--ssl-certificates-path=warcprox.pem \
/usr/local/Cellar/phantomjs/2.0.0/share/phantomjs/examples/rasterize.js \
http://{URL} screenshot.png "1024px*768px"