Skip to content

Instantly share code, notes, and snippets.

2016-11-18 21:05:02 UTC Verifier #3 INFO import Imported #2651787 98d0…b6da (88 txs, 1.94 Mgas, 74.18 ms, 10.20 KiB)
2016-11-18 21:05:07 UTC IO Worker #3 TRACE sync 2 -> Transactions (330 entries)
2016-11-18 21:05:20 UTC IO Worker #0 TRACE sync 2 -> Transactions (8 entries)
2016-11-18 21:05:23 UTC IO Worker #3 INFO import 0/ 3/25 peers 4 MiB db 443 KiB chain 0 bytes queue 21 KiB sync
2016-11-18 21:05:30 UTC IO Worker #1 TRACE sync 2 -> Transactions (1 entries)
2016-11-18 21:05:53 UTC IO Worker #3 INFO import 0/ 3/25 peers 4 MiB db 484 KiB chain 0 bytes queue 21 KiB sync
2016-11-18 21:05:58 UTC IO Worker #2 TRACE sync 2 -> Transactions (6 entries)
2016-11-18 21:06:04 UTC IO Worker #3 TRACE sync 2 -> Transactions (6 entries)
2016-11-18 21:06:10 UTC IO Worker #2 TRACE sync 2 -> Transactions (2 entries)
2016-11-18 21:06:13 UTC IO Worker #3 TRACE sync 2 -> Transactions (2 entries)
@trapp
trapp / replaysafesplit.sol
Last active July 20, 2016 19:31
Splits ETH into 2 addresses, depending on which chain it runs on.
contract ReplaySafeSplit {
// Fork oracle to use
AmIOnTheFork amIOnTheFork = AmIOnTheFork(0x2bd2326c993dfaef84f696526064ff22eba5b362);
// Splits the funds into 2 addresses
function split(address targetFork, address targetNoFork) returns(bool) {
if (amIOnTheFork.forked() && targetFork.send(msg.value)) {
return true;
} else if (!amIOnTheFork.forked() && targetNoFork.send(msg.value)) {
return true;
@trapp
trapp / replaysafeproxy.sol
Last active July 19, 2016 22:07
ReplaySafeProxy
contract ReplaySafeProxy {
// Tracks if the contract should work on this chain or not.
bool enabled = false;
// Fork oracle to use
AmIOnTheFork amIOnTheFork = AmIOnTheFork(0x2bd2326c993dfaef84f696526064ff22eba5b362);
address target;
// _target is the address this contract will forward all funds to.
// forked specifies if it should work on ETH (true) or ETHC (false)
// Any value transfer to this contract will fail on the other network.
@trapp
trapp / amionthefork.sol
Last active March 23, 2017 05:39
Ethereum Fork Oracle - Am I on the Fork?
contract AmIOnTheFork {
// Tracks whether hard fork is effective on this chain. True means the fork is passed, false it hasn't.
bool public forked = false;
// Dark DAO address
address constant darkDAO = 0x304a554a310c7e546dfe434669c62820b7d83490;
// This function should be called between block 1920000 and 1921200.
// Approximately between 2016-07-20 12:00:00 UTC and 2016-07-20 17:00:00 UTC.
// After that the status will be locked in.
import "owned";
contract TokenProxy is owned {
modifier noEther() {if (msg.value > 0) throw; _}
event TokenTransfer(address indexed tokenAddress, address indexed to, uint256 value);
function () noEther {
}
function transferToken(address tokenAddress, address to, uint256 value) onlyowner noEther {
import "owned";
contract DepositTracker is owned
{
event Deposit(address indexed from, uint value);
event Transfer(address indexed to, uint value);
function () {
Deposit(msg.sender, msg.value);
}
Verifying that +timon is my Bitcoin username. You can send me #bitcoin here: https://onename.io/timon

Keybase proof

I hereby claim:

  • I am trapp on github.
  • I am timon (https://keybase.io/timon) on keybase.
  • I have a public key whose fingerprint is 2E05 6444 BDAB 4136 CDF2 8302 AB92 AC32 C536 0BD7

To claim this, I am signing this object:

@trapp
trapp / navlist-divider.css
Created July 10, 2013 10:02
Vertical navigation divider CSS only
.nav-list .nav-item:after {
content: "";
position: absolute;
right: 0;
top: 6px;
height: 12px;
width: 1px;
background-color: #e2e2e2;
border-bottom: 1px solid #fff;
}
@trapp
trapp / mysql-grant-remote-access.sql
Created December 12, 2012 10:27
mysql grant remote access
-- Don't forget to replace »password« with a strong password.
create user 'username'@'localhost' identified by 'password';
grant all privileges on *.* to 'username'@'yourip' IDENTIFIED BY 'password' with grant option;
flush privileges;