-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotes.txt
62 lines (54 loc) · 2.95 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
npm registry https://docs.npmjs.com/misc/registry
https://registry.npmjs.org/n3/0.9.1
https://skimdb.npmjs.com/registry/
https://replicate.npmjs.com/registry/
documentation https://github.com/npm/registry/tree/master/docs
replication: https://github.com/rvagg/npmjs.org/blob/6793c71165934423f1989f54a754a6691a94f3b0/README.md
SET UP ADMIN USER ON WINDOWS (and do first-time setup?)
http://www.clock.co.uk/blog/how-to-create-a-private-npmjs-repository
https://blog.nodeswat.com/what-i-learned-from-analysing-1-65m-versions-of-node-js-modules-in-npm-a0299a614318
API doc: http://docs.couchdb.org/en/2.0.0/api/
CouchDB
views: http://guide.couchdb.org/draft/views.html
views API: https://wiki.apache.org/couchdb/HTTP_view_API
https://replicate.npmjs.com/_design/app/_view/byUser?key=%22rubenverborgh%22
search: http://docs.couchdb.org/en/2.0.0/api/database/find.html
build index: https://spin.atomicobject.com/2017/01/19/utility-to-initiate-the-rebuild-of-indices-for-couchdb-design-document-views/
curl http://admin:admin@127.0.0.1:5984/_active_tasks
curl -X POST http://127.0.0.1:5984/_replicate -d "{\"source\": \"https://replicate.npmjs.com/registry/\", \"target\":\"http://test:test@127.0.0.1:5984/npm2\", \"create_target\":true}" -H "Content-Type: application/json"
node bin\exportTriples.js -c http://localhost:5984/npm2 -d http://example.org -e failed.log | sed "/^\s*$/d" | wc -l
server setup
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
apt-get install nodejs
apt-get install couchdb
edit /etc/couchdb/local.ini :
[httpd]
secure_rewrites = false
curl -X PUT http://localhost:5984/_config/admins/admin -d '"admin"'
service couchdb restart
curl -X POST -H "Content-Type:application/json" \
http://localhost:5984/_replicate -d '{"source":"https://replicate.npmjs.com/registry/","target":"http://admin:admin@127.0.0.1:5984/npm","create_target":true,"continuous":true}'
add my ssh keys to .ssh
do this: https://serverfault.com/questions/107187/ssh-agent-forwarding-and-sudo-to-another-user
git clone ssh://git@git.datasciencelab.ugent.be:4444/linked-data-fragments/npm-stuff.git /opt/npm-stuff
cd /opt/npm-stuff
npm install
screen
node bin/index.js -p 1337 -c http://localhost:5984/npm -d https://linkedsoftwaredependencies.org/
cd ~
git clone git@github.com:drobilla/serd.git
./waf configure --prefix=/usr
./waf
./waf install
cd /opt
apt-get install zlib1g-dev
apt-get install libraptor2-dev
apt-get install g++
apt-get install make
git clone git@github.com:rdfhdt/hdt-cpp.git
cd hdt-cpp/hdt-lib
make
cd ~
sudo -s
node --max_old_space_size=4096 /opt/npm-stuff/bin/exportTriples.js -c http://localhost:5984/npm -d https://linkedsoftwaredependencies.org/ -e failed.log -E errors.log -t ttl > /var/data/npm.ttl
/opt/hdt-cpp/hdt-lib/tools/rdf2hdt -f turtle /var/data/npm.ttl /var/data/npm.hdt