Skip to content

Instantly share code, notes, and snippets.

View atomotic's full-sized avatar

raffaele messuti atomotic

View GitHub Profile
@atomotic
atomotic / .zshrc
Last active February 21, 2018 10:45
check if Software Heritage archive contains your code
function swh-check() { curl -s --data "q=$(sha1sum $* | cut -d " " -f 1)" https://archive.softwareheritage.org/api/1/content/known/search/ | jq . }
~ mediawiki=$(curl -s https://raw.githubusercontent.com/wikimedia/mediawiki/master/index.php | gsha1sum | cut -d " " -f 1)

~ curl -s --data "q=$mediawiki" https://archive.softwareheritage.org/api/1/search/ | jq .
{
  "search_stats": {
    "nbfiles": 1,
    "pct": 100

},

➜ Downloads unzip -l extension_0_0_129.crx
Archive: extension_0_0_129.crx
warning [extension_0_0_129.crx]: 566 extra bytes at beginning or within zipfile
(attempting to process anyway)
Length Date Time Name
-------- ---- ---- ----
0 05-13-16 22:41 icons/
7952 05-13-16 22:41 icons/icon128.png
759 05-13-16 22:41 icons/icon16.png
2858 05-13-16 22:41 icons/icon48.png
@atomotic
atomotic / wget-lua.sh
Created May 3, 2016 09:28
install wget-lua on osx
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 / # scantailor - 2015-12-04_21-22-47.txt
Created December 4, 2015 20:26
scantailor (homebrew/x11/scantailor) on OS X 10.11.1 - Homebrew build logs
Homebrew build logs for homebrew/x11/scantailor on OS X 10.11.1
Build date: 2015-12-04 21:22:47

conf.ttl

    conf:publicUrlPrefix <http://mylodview/id/>; 

nginx

    location /id {
            proxy_pass http://127.0.0.1:8080/lodview;
            proxy_set_header  X-Real-IP $remote_addr;
            proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header Host $http_host;

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