I hereby claim:
- I am obernardovieira on github.
- I am obernardovieira (https://keybase.io/obernardovieira) on keybase.
- I have a public key ASD5ogeLJ_QgYIR4lWIam_zmeVbIjTXcZF5tUPOLx7wkYgo
To claim this, I am signing this object:
$ mkdir -p some_dir/node1 | |
$ cd some_dir/node1 | |
$ geth - identity "my_private_net" - nodiscover - networkid 15 - datadir . init genesis.json | |
$ geth account new - datadir . | |
$ geth - mine - etherbase "result_hash_from_previous_command" -rpccorsdomain "*" - ipcpath ./geth.ipc - rpc - networkid 15 - datadir . -maxpeers 5 - minerthreads 1 | |
# (new shell in the same directory) | |
$ geth - ipcpath ./geth.ipc - datadir . attach |
$ mkdir -p some_dir/node1 | |
$ cd some_dir/node1 | |
$ geth - identity "my_private_net" - nodiscover - networkid 15 - datadir . init genesis.json | |
$ geth account new - datadir . | |
$ geth - mine - etherbase "result_hash_from_previous_command" -rpccorsdomain "*" - ipcpath ./geth.ipc - rpc - networkid 15 - datadir . -maxpeers 5 - minerthreads 1 - port 30304 - rpcport 7545 | |
# (new shell in the same directory) | |
$ geth - ipcpath ./geth.ipc - datadir . attach |
I hereby claim:
To claim this, I am signing this object:
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
// List all files in a directory in Node.js recursively in a synchronous fashion | |
var walkSync = function(dir, filelist) { | |
var fs = fs || require('fs'), | |
files = fs.readdirSync(dir); | |
filelist = filelist || []; | |
files.forEach(function(file) { | |
if (fs.statSync(dir + file).isDirectory()) { | |
filelist = walkSync(dir + file + '/', filelist); | |
} | |
else { |
. |
did:muport:QmdE65oF2PsfbwZp4Ryw6KxEU7sMDGifbzygXxwHnRzevu |
public class App | |
{ | |
// change contract-address | |
private static String contractAddress = contract-address; | |
// main method | |
public static void main(String[] args) { | |
// instantiate web3j | |
Web3j web3 = Web3j.build(new | |
HttpService("http://localhost:9545/")); | |
Credentials credentials = Credentials.create(wallet-address); |
Credentials credentials; | |
try { | |
List<String> lines = Files.readAllLines(walletPathFile); | |
credentials = WalletUtils.loadCredentials(walletPassword, new File(lines.get(0))); | |
} catch (IOException e) { | |
String walletFile = WalletUtils.generateLightNewWalletFile( | |
walletPassword, new File(WalletUtils.getDefaultKeyDirectory()) | |
); | |
String walletFilePath = WalletUtils.getDefaultKeyDirectory() + "/" + walletFile; | |
credentials = WalletUtils.loadCredentials(walletPassword, walletFilePath); |
const express = require('express') | |
const bodyParser = require('body-parser') | |
const ngrok = require('ngrok') | |
const decodeJWT = require('did-jwt').decodeJWT | |
const { Credentials } = require('uport-credentials') | |
const transports = require('uport-transports').transport | |
const message = require('uport-transports').message.util | |
let endpoint = '' | |
const app = express(); |