Skip to content

Instantly share code, notes, and snippets.

@tgerring
tgerring / gource-go-ethereum.sh
Created July 22, 2015 14:25
go-ethereum gource
cd ~
rm -rf gource
git clone https://github.com/ethereum/go-ethereum.git gource
cd gource
curl https://gist.githubusercontent.com/tgerring/20384c2ad2f1f719d6fc/raw/c4e0bb1a66bfa4eacdcb2bc02c1c853c601a093d/git-gravatar.perl | perl
gource --user-image-dir .git/avatar/ -s 0.05 --hide filenames,dirnames --title go-ethereum -o gource.ppm
ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i gource.ppm -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 gource.mp4
// This is free and unencumbered software released into the public domain.
//
// Paste this function into the JavaScript console and execute like so:
// sendLots(eth.coinbase, eth.accounts[1])
// This can be saved to a file and loaded with loadScript('/path/to/sendLots.js')
sendLots = function(fromAccount, toAccount) {
loops = 5;
txcount = 2;
waitBlocks = 1;
@tgerring
tgerring / geth.conf
Last active August 29, 2015 14:18
Geth Upstart script
description "geth bootnode"
start on runlevel [2345]
stop on shutdown
respawn
respawn limit 10 5
setuid ubuntu
setgid ubuntu
@tgerring
tgerring / mistquickinstall.sh
Last active August 29, 2015 14:14
Mist install Ubuntu 14.04
# install dependencies
sudo add-apt-repository ppa:beineri/opt-qt54-trusty -y
sudo apt-get update
sudo apt-get install -y git mercurial build-essential software-properties-common golang pkg-config libgmp3-dev libreadline6-dev libpcre3-dev libpcre++-dev mesa-common-dev libglu1-mesa-dev qt54quickcontrols qt54webengine
# set environment variables
echo 'export PKG_CONFIG_PATH=/opt/qt54/lib/pkgconfig' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/opt/qt54/lib' >> ~/.bashrc
echo 'export GOPATH=$HOME/go' >> ~/.bashrc
source ~/.bashrc
@tgerring
tgerring / goethereumqt54.sh
Last active August 29, 2015 14:14
Mist installation for Ubuntu Trusty with Go 1.4.1 and QT 5.4
# set environment variables
export PATH=$HOME/golang/bin:$PATH
export GOPATH=$HOME/go
mkdir -p $GOPATH
# install base dependencies
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y git mercurial build-essential software-properties-common pkg-config libgmp3-dev libreadline6-dev libpcre3-dev libpcre++-dev mesa-common-dev libglu1-mesa-dev
@tgerring
tgerring / multisig.md
Created October 11, 2014 21:03
pybtctool multisig instructions

Init. Note the result of each step for use in signing transactions

  1. pybtctool random_key # generate private key DO NOT SHARE
  2. pybtctool privtopub # generate pubkey
  3. everyone share and record pubkeys here

  4. pybtctool mk_multisig_script # generate multisig script
  5. pybtctool scriptaddr # generate multisig address

Create transaction

  1. pybtctool preparetx | pybtctool -s setup_coinvault_tx # create transaction
@tgerring
tgerring / mitchjackbet.py
Last active August 29, 2015 14:05
Mitch Jack bet Serpent
init:
contract.storage["Mitch"] = 0xf4b7cc7faa866a2275972317598e7d936cfc9adc
contract.storage["Jack"] = 0x52c5535efae9bd86e04c627aa5c716a392358c5e
code:
BTC = msg.data[0]
if (msg.sender == contract.storage["Mitch"] or msg.sender == contract.storage["Jack"]):
if block.timestamp > 1449187200:
if BTC > 2000:
send(contract.storage["Mitch"], contract.balance, (tx.gas - 100))
else:
Verifying myself: My Bitcoin username is +taylorg. https://onename.io/taylorg
@tgerring
tgerring / gulp.config.js
Created June 28, 2014 09:33
gulp config
var GLOBSTAR = '**/*';
var basePaths = {
src: 'src/',
dest: 'build/'
};
var typeMap = {
// templates
@tgerring
tgerring / gulpfile.js
Created June 28, 2014 09:32
gulp with livereload
var gulp = require('gulp'),
gutil = require('gulp-util'),
es = require('event-stream');
var plugins = require('gulp-load-plugins')({
camelize: true
});
var config = require('./gulpfile.config');