Skip to content

Instantly share code, notes, and snippets.

View huahuayu's full-sized avatar
🎯
Focusing

Shiming huahuayu

🎯
Focusing
View GitHub Profile
@huahuayu
huahuayu / main.go
Created September 7, 2022 13:37 — forked from miguelmota/main.go
Golang Solidity "abi.encodePacked" example
package main
import (
"bytes"
"encoding/hex"
"fmt"
"math/big"
"github.com/ethereum/go-ethereum/common/math"
)
@huahuayu
huahuayu / install-tmux.sh
Created March 16, 2020 15:52 — forked from pokev25/install-tmux.sh
Install tmux 2.8 on centos 7
# Install tmux 2.8 on Centos
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -LOk https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
tar -xf libevent-2.1.8-stable.tar.gz
cd libevent-2.1.8-stable
./configure --prefix=/usr/local
@huahuayu
huahuayu / cache.go
Created February 11, 2019 06:58 — forked from zemirco/cache.go
golang database layer with cache
type CacheInterface interface {
Get(key string) ([]byte, error)
Set(key string, value interface{}) error
}
// Cache implements CacheInterface.
type Cache struct {
// wrap redis pool connection
// or whatever you need
}