- create a new redis .conf file
$ cp /etc/redis.conf /etc/redis-xxx.conf
- edit /etc/redis-xxx.conf, illustrated as below
...
$ cp /etc/redis.conf /etc/redis-xxx.conf
...
** Add repository and install bitcoind ** | |
sudo apt-get install build-essential | |
sudo apt-get install libtool autotools-dev autoconf | |
sudo apt-get install libssl-dev | |
sudo apt-get install libboost-all-dev | |
sudo add-apt-repository ppa:luke-jr/bitcoincore | |
sudo apt-get update | |
sudo apt-get install bitcoind | |
mkdir ~/.bitcoin/ && cd ~/.bitcoin/ |
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
#!/usr/local/bin/node | |
const readline = require('readline'); | |
var exec = require('child_process').exec; | |
var path = require('path'); | |
const rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}); |
var Web3 = require('web3'); | |
var util = require('ethereumjs-util'); | |
var tx = require('ethereumjs-tx'); | |
var lightwallet = require('eth-lightwallet'); | |
var txutils = lightwallet.txutils; | |
var web3 = new Web3( | |
new Web3.providers.HttpProvider('https://rinkeby.infura.io/') | |
); | |
var address = '0x8D68583e625CAaE969fA9249502E105a21435EbF'; | |
var key = '1ce642301e680f60227b9d8ffecad474f15155b6d8f8a2cb6bde8e85c8a4809a'; |
const N = 1000000; | |
function simpleConcat() { | |
let str = ''; | |
for (let i = 0; i < N; i++) { | |
str += 'a'; | |
} | |
return str; | |
} |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
.