Skip to content

Instantly share code, notes, and snippets.

View thanasik's full-sized avatar

thanasik thanasik

View GitHub Profile
@thanasik
thanasik / prepare-commit-msg.sh
Created May 4, 2018 20:49 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@thanasik
thanasik / tx_send_example.go
Created March 27, 2017 20:43
Sending an Ethereum transaction in Go
package main
import (
"fmt"
"math/big"
"context"
"io/ioutil"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/accounts/keystore"