Skip to content

Instantly share code, notes, and snippets.

*filter
# Allow all loopback (lo0) traffic and reject traffic
# to localhost that does not originate from lo0.
-A INPUT -i lo -j ACCEPT
-A INPUT ! -i lo -s 127.0.0.0/8 -j REJECT
# Allow ping.
-A INPUT -p icmp -m state --state NEW --icmp-type 8 -j ACCEPT
alias what_i_did_today='git log --pretty="%s" --author="Roc Yu" --no-merges --since="15 hours ago" | tail -r'
@rociiu
rociiu / gist:1460fffd1b07967c08447bd8207ce15c
Created October 21, 2018 23:33
convert private key from hex string
package main
import (
"crypto/ecdsa"
"encoding/hex"
"fmt"
"log"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/crypto"