Skip to content

Instantly share code, notes, and snippets.

View dickolsson's full-sized avatar

Dick Olsson dickolsson

View GitHub Profile
@dickolsson
dickolsson / private.json
Created December 23, 2017 21:44
Example genesis file for a private Ethereum network
{
"config": {
"chainId": 99,
"homesteadBlock": 1,
"eip150Block": 2,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 3,
"eip158Block": 3,
"byzantiumBlock": 4,
"clique": {
0xebec4e59a2546674ec73f40deb79f9785f31cb00
@dickolsson
dickolsson / rinkeby02.txt
Created August 17, 2017 06:40
rinkeby02.txt
0x63d1ece57d61fa56c849db63f4648d9a40b25581
@dickolsson
dickolsson / rinkeby01.txt
Last active August 17, 2017 06:40
rinkeby01.txt
0xF6B1B6fC5e9280B7b39546e31a7C40EA08DeBfd3
@dickolsson
dickolsson / 2_deploy_contracts.js
Created July 14, 2017 21:58
Example contract migration
var IronDoers = artifacts.require(“./IronDoers.sol”);
module.exports = function(deployer, network, accounts) {
deployer.deploy(IronDoers);
};
@dickolsson
dickolsson / 3_local_ens.js
Last active July 18, 2017 19:18
Example deployment of ENS
const ENS = artifacts.require("./ENS.sol");
const FIFSRegistrar = artifacts.require('./FIFSRegistrar.sol');
const PublicResolver = artifacts.require('./PublicResolver.sol');
const namehash = require('../node_modules/eth-ens-namehash');
const Web3 = require('web3');
const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
module.exports = function(deployer, network, accounts) {
var domain = 'irondoers';
@dickolsson
dickolsson / dapp.js
Last active July 11, 2017 07:33
Example dapp UI written in JS
var Web3 = require("web3");
var contract = require("truffle-contract");
var IronDoers = contract(require("../build/contracts/IronDoers.json"));
require("bootstrap");
var account;
window.Dapp = {
start: function() {
this.setDoerCount();
},
@dickolsson
dickolsson / webpack.config.js
Created July 9, 2017 20:03
Example webpack.config.js for a dapp UI
var webpack = require("webpack");
var path = require("path");
const www = path.resolve(__dirname, "www");
module.exports = {
entry: "./src/app.js",
output: {
filename: "bundle.js",
path: www
},
@dickolsson
dickolsson / package.json
Last active July 11, 2017 07:29
Example package.json for a dapp UI
{
"name": "irondoers",
"version": "0.0.1",
"description": "Decentralised application made to incentivise doers in a democratic autonomous organisation.",
"repository": "https://github.com/dickolsson/irondoers",
"scripts": {
"build": "webpack",
"dev": "webpack-dev-server"
},
"author": "Dick Olsson",
@dickolsson
dickolsson / install_iprvpn_owrt.sh
Last active January 1, 2018 17:05
Install IPredator VPN on OpenWrt. Source credit: https://ipredator.se/guide/openvpn/router/openwrt
#!/bin/sh
#
# Version: 1
# Tested on Barrier Breaker 15.05.01
#
# Install IPredator VPN on OpenWrt
# Requirements
# - newly flashed OpenWrt device