Skip to content

Instantly share code, notes, and snippets.

@tgerring
tgerring / geth-develop.sh
Last active August 18, 2021 07:55
Geth installation Ubuntu
#!/bin/bash
#######################################################################
# Install base dependencies (required)
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install -y git build-essential
# Install Go binaries
GOVERSION="1.7.3"
@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
// 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 / 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
@tgerring
tgerring / geth-posh-build.ps1
Last active February 5, 2022 20:21
Geth build script for Windows Powershell
<#
.SYNOPSIS
Geth build script for Windows
.DESCRIPTION
A Powershell script to install dependencies for Windows and build go-ethereum binaries.
Make sure to run `Set-ExecutionPolicy RemoteSigned` in an Adminisrative Powershell window first
if you intend to run this as a script instead of in a console
.NOTES
File Name : geth-posh-install.ps1
Author : Taylor Gerring (taylor.gerring@gmail.com)
#REQUIRES -Version 2.0
<#
.SYNOPSIS
Geth build script for Windows
.DESCRIPTION
A Powershell script to install dependencies for Windows and build go-ethereum binaries.
Make sure to run `Set-ExecutionPolicy RemoteSigned` in an Adminisrative Powershell window first.
.NOTES
File Name : geth-posh-install.ps1
Author : Taylor Gerring (taylor.gerring@gmail.com)
#!/bin/bash
# Set versions
ETHTAG="release"
# System information
UBUNTUVER=`lsb_release -r|awk '{print $2}'`
# Ensure the latest version of cmake
if [[ $UBUNTUVER == "14.04" ]];
{
"nonce": "0",
"difficulty": "0x0",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x",
"gasLimit": "0x2FEFD8",
"alloc": {}
}
[
{
"constant": false,
"inputs": [
{
"name": "_owner",
"type": "address"
}
],
"name": "removeOwner",
@tgerring
tgerring / gist:50d9a5f01db32c252e4aa2dfd42a539d
Created February 8, 2017 23:36
golang setup & geth installation ubuntu/debian
For YouTube video located at https://youtu.be/1VjcrPGXY2E
# SETUP GOLANG
GOVERSION="1.7.5"
[[ `uname -m` = "x86_64" ]] && GOARCH="amd64" || GOARCH="386"
wget https://storage.googleapis.com/golang/go$GOVERSION.linux-$GOARCH.tar.gz
sudo rm -rf /usr/local/go/ && sudo tar -C /usr/local -xzf go$GOVERSION*.tar.gz
echo 'export GOPATH=$HOME/go' >> ~/.bashrc
echo 'export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin' >> ~/.bashrc
source ~/.bashrc && go version