Skip to content

Instantly share code, notes, and snippets.

View DaveAppleton's full-sized avatar

Dave Appleton DaveAppleton

View GitHub Profile
@DaveAppleton
DaveAppleton / server1.go
Created April 1, 2020 23:46
Simple server used to demonstrate CADDY
package main
import (
"fmt"
"net/http"
"time"
)
func main() {
http.HandleFunc("/api/test",func(w http.ResponseWriter, r * http.Request){ fmt.Fprintf(w,"test")})
@DaveAppleton
DaveAppleton / server1.go
Created April 1, 2020 23:46
Simple server used to demonstrate CADDY
package main
import (
"fmt"
"net/http"
"time"
)
func main() {
http.HandleFunc("/api/test",func(w http.ResponseWriter, r * http.Request){ fmt.Fprintf(w,"test")})
@DaveAppleton
DaveAppleton / Verifying my Peepeth
Created August 30, 2018 05:40
Verifying my Peepeth
Verifying my identity on Peepeth.com 0x31efd75bc0b5fbafc6015bd50590f4fdab6a3f22
@DaveAppleton
DaveAppleton / hitme.json
Last active March 4, 2018 23:30
Contracts for Gophercon.in : 0x1f3aa7b716c9537262dd7450404e28ae7923e715 on Rinkeby Network / 0x7F3A19eDC1fFBd3fC2b4fc978b0d8f8C19316186
[
{
"constant": true,
"inputs": [],
"name": "numTargets",
"outputs": [
{
"name": "",
"type": "uint256"
}
@DaveAppleton
DaveAppleton / kovan then main.md
Last active February 21, 2018 17:02
Kovan : 0xa7b7a53d02b45eb11081f65de6dc3b35c685dbce vs main : 0x4CC19356f2D37338b9802aa8E8fc58B0373296E7

From Etherscan

Kovan

0x60606040526003805460a060020a60ff02191690556005805460ff19169055341561002957600080fd5b604051602080610ded8339810160405280805160038054600160a060020a03191633600160a060020a031617905560045550610d8190508061006c6000396000f30
0x6060604052600436106101065763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b811461010b57806306fdde0314610132578063095ea7b3146101bc57806318160ddd146101de57806323b872dd14610203578063313ce5671461022b578063355274ea1461023e57806340c10f191461025157806342966c6814610273578063661884631461028b57806370a08231146102ad5780637d64bcb4146102cc5780638da5cb5b146102df57806395d89b411461030e578063a9059cbb14610321578063af35c6c714610343578063d73dd62314610356578063dd62ed3e14610378578063f2fde38b1461039d575b600080fd5b341561011657600080fd5b61011e6103bc565b604051901515815260200160405180910390f35b341561013d57600080fd5b6101456103cc565b60405160208082528190810183818151815260200191508051906020019080838360005b83811015610181578082015183820152602001610169565b5
@DaveAppleton
DaveAppleton / storage.sol
Last active February 16, 2018 17:22
Memory vs Storage
pragma solidity ^0.4.19;
contract TestStorage {
struct St {
uint256 amountPaid;
uint256 amountOut;
bool registered;
}
mapping(address => St) store;
@DaveAppleton
DaveAppleton / keybase.md
Created November 17, 2017 19:24
keybase.md

Keybase proof

I hereby claim:

  • I am daveappleton on github.
  • I am daveappleton (https://keybase.io/daveappleton) on keybase.
  • I have a public key ASAVcU2wvdlNMNxvx2si_khdceGASLO5RsvwoHAVug6Jiwo

To claim this, I am signing this object:

@DaveAppleton
DaveAppleton / ABIencoding.sol
Last active August 25, 2017 20:48
smart contract to encode ABI keys
pragma solidity ^0.4.11;
contract ABIparams{
// call this with the function name and types but not variable names
// make sure there are no spaces
// e.g. "transfer(address,uint256)"
function hash(string str) public constant returns (bytes4) {
return (bytes4(sha3(str)));
}
@DaveAppleton
DaveAppleton / DaveCoin.ABI
Created April 7, 2017 00:01
DaveCoin at - 0x9090C02e86402E4D5A6a302a08673A0EE5567C91 on Kovan Network
[
{
"constant": false,
"inputs": [
{
"name": "_numCoins",
"type": "uint256"
}
],
"name": "addCoins",
@DaveAppleton
DaveAppleton / parityclient.go
Created March 7, 2017 19:30
A drop in replacement for ethclient.go if you are using a parity backend. (getPendingNonceAt has changed) - not a lot tested yet.
// Copyright 2016 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// The go-ethereum library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of