This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ehdKey = require("@hawkingnetwork/ed25519-hd-key-rn") | |
var EdDSA = require('elliptic').eddsa | |
// test vector from https://github.com/satoshilabs/slips/blob/master/slip-0010.md | |
var seed = new Buffer('fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c999693908d8a8784817e7b7875726f6c696663605d5a5754514e4b484542', 'hex') | |
var ed25519 = new EdDSA('ed25519') | |
var derived = ehdKey.derivePath("m/0'/2147483647'", seed.toString('hex')) | |
var keys = ed25519.keyFromSecret(derived.key) | |
// expected test vector outputs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var KeyEncoder = require('key-encoder') | |
var VirgilCrypto = require('virgil-crypto').VirgilCrypto | |
var HDKey = require('hdkey') | |
const secp256k1 = require('secp256k1') | |
var keyEncoder = new KeyEncoder('secp256k1') | |
var hdKey = HDKey.fromMasterSeed(Buffer.from(SEED, 'hex')) | |
var childKey = hdKey.derive(PATH) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in zenodo ui create a deposition. get the id | |
curl -H "Accept: application/json" -H "Authorization: Bearer $TOKEN" "https://www.zenodo.org/api/deposit/depositions/$DEPOSITION" | |
# get the bucket id from above | |
curl --progress-bar -o /dev/null --upload-file ./$FILE https://www.zenodo.org/api/files/$BUCKET/$FILE?access_token=$TOKEN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alsa-firmware 1.0.29-2 | |
alsa-oss 1.1.6-1 | |
alsa-utils 1.1.6-1 | |
android-file-transfer 3.4-1 | |
arch-backup 0.8.11-2 | |
arch-install-scripts 19-1 | |
asoundconf 1:1.2-1 | |
autoconf 2.69-4 | |
automake 1.15.1-1 | |
bind-tools 9.13.2-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh | |
bash Miniconda2-latest-Linux-x86_64.sh | |
source ~/.bashrc | |
conda config --add channels conda-forge | |
conda install poppler | |
export IFOLDER="/mnt/bigdisk/miniconda2/include" | |
export LFOLDER="/mnt/bigdisk/miniconda2/lib" | |
export LD_LIBRARY_PATH=${LFOLDER}:$LD_LIBRARY_PATH | |
./configure --with-python --with-poppler=/mnt/bigdisk/miniconda2 --with-spatialite --with-pg --with-curl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// tar.gz browser storage import test | |
// | |
// RESULTS: | |
// test 1: 233mb zipped, 22 files, 10MB per file, jpg | |
// sw cache: 6s | |
// idb: did not finish (froze browser) | |
// | |
// test 2: 55mb zipped, 600 files, ~100kb per file, map tiles | |
// sw cache: 5s | |
// idb: 49s |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// proxies 239.255.42.42:5004 from eth0 239.1.2.3:6666 wlan0 | |
var dgram = require('dgram') | |
var os = require('os') | |
var socket = dgram.createSocket({ type: 'udp4', reuseAddr: true }) | |
socket.bind(5004, function () { | |
socket.addMembership('239.255.42.42', getIpForInterface('eth0')) | |
socket.setMulticastTTL(255) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# enable multicast route so ffmpeg can resolve 2nd interface data | |
sudo route add -net 239.0.0.0/8 dev eth0 | |
# grab 1 frame of video as jpg | |
run-every 60 ffmpeg -i udp://@239.255.42.42:5004 -f image2 -frames:v 1 -strftime 1 "%F-%H-%M-%S.jpg" | |
# convert jpgs to movie | |
rm -rf cropped | |
mkdir cropped | |
mogrify -path cropped/ -extract 1400x990+0+0 *.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path') | |
var fs = require('fs') | |
var ytdl = require('youtube-dl') | |
function playlist (url) { | |
var video = ytdl(url) // add , ['--audio-format=mp3'] for mp3 only | |
video.on('error', function error (err) { | |
console.log('error 2:', err) | |
}) |