Skip to content

Instantly share code, notes, and snippets.

@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"
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" );
### 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:

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

@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
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 / 0_reuse_code.js
Last active August 29, 2015 14:09
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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