Skip to content

Instantly share code, notes, and snippets.

TIFF Directory at offset 0x171988 (1513864)
Image Width: 1780 Image Length: 2548
Tile Width: 256 Tile Length: 256
Resolution: 300, 300 pixels/inch
Bits/Sample: 8
Compression Scheme: JPEG
Photometric Interpretation: RGB color
FillOrder: msb-to-lsb
YCbCr Subsampling: 2, 2
Orientation: row 0 top, col 0 lhs
@atomotic
atomotic / gist:78e59aecb2102d1f93bf
Created March 16, 2015 22:56
get json metadata from IA collection
% pip install internetarchive
% ia search -l collection:grafton9 > identifiers.txt
% parallel ia metadata {} :::: identifiers.txt > collection.json

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 / brainwashed-spotify.go
Last active May 8, 2017 12:34
search spotify for latest albums reviewed on brainwashed.com
package main
import (
"fmt"
"log"
"strings"
"github.com/PuerkitoBio/goquery"
"github.com/zmb3/spotify"
)
@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 / 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"