Skip to content

Instantly share code, notes, and snippets.

View ralphtheninja's full-sized avatar
🏠
Working from home

ralphtheninja

🏠
Working from home
View GitHub Profile
const level = require('level-browserify')
const db = level('./foo')
db.put('key', 'value', err => {
db.get('key', (err, value) => {
console.log('value=', value)
})
})
Compiling serde_json v1.0.13
error: failed to run custom build command for `openssl-sys v0.9.28`
process didn't exit successfully: `/home/lms/src/DATRS/hypercore/target/debug/build/openssl-sys-f9857b73d48368b4/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
cargo:rerun-if-env-changed=OPENSSL_DIR

Title

test bla bla

# title

lets write some text that [references a section](#section)

## section
sudo apt-get install apt-transport-https -y
wget -qO - https://apt.z.cash/zcash.asc | sudo apt-key add -
echo "deb https://apt.z.cash/ jessie main" | sudo tee /etc/apt/sources.list.d/zcash.list
sudo apt-get update && sudo apt-get install zcash -y
zcash-fetch-params
mkdir -p ~/.zcash
echo "addnode=mainnet.z.cash" >~/.zcash/zcash.conf
echo "rpcuser=username" >>~/.zcash/zcash.conf
echo "rpcpassword=`head -c 32 /dev/urandom | base64`" >>~/.zcash/zcash.conf
@ralphtheninja
ralphtheninja / foo.js
Created December 11, 2017 12:52
node-errno
const create = require('.').create
const CustomError = require('.').custom.CustomError
const inherits = require('inherits')
// inherits from CustomError (which inherits from Error)
const MyError = create('MyError')
const MyError3 = create('MyError3', MyError)
// same but using traditional inheritance
function MyError2 (message, cause) {
module levelup
version
downloads in the
last 30 days
total downloads
level-sublevel ~0.19.0 151,300 1,226,226
pouchdb 1.3.8 124,983 1,162,731
browserify-fs ^0.18.2 100,027 458,142
pouchdb-adapter-leveldb-core 1.3.8 97,566 419,461
level-packager ~1.3.0 74,165 758,119
merkle-patricia-tree ^1.2.1 13,231 127,025
dynalite ^1.3.3 10,553 258,090
mosca ^1.3.8 9,513 171,844

🇸🇪

:world:

:global:

🇩🇰

:europe:

@ralphtheninja
ralphtheninja / readme.md
Created July 20, 2017 14:51 — forked from max-mapper/readme.md
DIY DAT DYNDNS

for ubuntu, to set up a dynamic dns service that tells you what the external ip of some machine is

  • npm install dat lil-pids run-every add-to-systemd -g
  • mkdir ipdat; cd ipdat; dat create; cd ..;
  • edit file services with this:
cd ipdat && dat sync
cd ipdat && run-every 3600 curl ipinfo.io/ip > ip.txt