Skip to content

Instantly share code, notes, and snippets.

View chevdor's full-sized avatar

Chevdor chevdor

View GitHub Profile
echo "{
"shell_cmd": "/usr/local/bin/solc \"$file\" --gas --combined-json abi,bin --optimize "
}
" >> ~/.config/sublime-text-3/Packages/User/
@chevdor
chevdor / findme.json
Last active September 7, 2017 15:19
FindMe contract
[{"constant":true,"inputs":[],"name":"number","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"}]
@chevdor
chevdor / readme.adoc
Created June 26, 2017 17:00
Sia install on Digital Ocean Ubuntu
@chevdor
chevdor / FabricStatusComponent.js
Created June 7, 2017 22:53
Fabric Status Component for React using Semantic UI
'use strict';
import React from 'react';
import $ from 'jquery';
import { Icon, Segment, Statistic, Dimmer, Loader } from 'semantic-ui-react';
require('styles/kidec/FabricStatus.css');
class FabricStatusComponent extends React.Component {
constructor(props) {
@chevdor
chevdor / Hello.java
Created June 7, 2017 22:49
Java minimalist chaincode
/**
* Created by will on 07.06.17.
*/
import org.hyperledger.java.shim.ChaincodeBase;
import org.hyperledger.java.shim.ChaincodeStub;
/**
* <h1>Hello Blockchain sample chaincode</h1>
* (java implementation of <A href="https://github.com/hyperledger/fabric/blob/master/examples/chaincode/go/chaincode_example02/chaincode_example02.go">chaincode_example02.go</A>)
@chevdor
chevdor / docker-compose.yml
Last active July 20, 2017 14:50
Fabric Docker Compose
# This container takes care of the identities
membersrvc:
container_name: membersrvc
image: hyperledger/fabric-membersrvc
expose:
- "7054"
ports:
- "7054:7054"
volumes:
- ./membersrvc.yaml:/opt/gopath/src/github.com/hyperledger/fabric/membersrvc/membersrvc.yaml
@chevdor
chevdor / Ropsten Revert.adoc
Last active March 1, 2017 17:27
Ropsten Revert

Ropsten Revert Chain

  • Stop parity if running

  • download the ropsten-543210.snapshot

    wget https://transfer.sh/jDMLZ/ropsten-543210.snapshot
  • restore parity:

    parity --chain=ropsten restore ropsten-543210.snapshot
# Start with IE or a shell:
# START http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/chevdor/8d04225bee6950546a9c/raw/2c0a780f046e93aed2a06df067b3722aaf4c4f12/BoxStarterWork
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
Set-StartScreenOptions -EnableBootToDesktop
Install-WindowsUpdate -AcceptEula
# BoxStarter
cinst Boxstarter
geth --fast --port 30303
contract RequiringFunds {
modifier NeedEth () {
if (msg.value <= 0 ) throw;
_
}
}
contract AmIOnTheFork {
function forked() constant returns(bool);
}