Skip to content

Instantly share code, notes, and snippets.

Meng Zhuo mengzhuo

Block or report user

Report or block mengzhuo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mengzhuo /
Last active Jun 1, 2019 — forked from julianxhokaxhiu/
How to build minimal ARM QEMU Static from sources with EXECVE
# At the moment this script is forged only for Debian ( tested on 8.x release ).
# Although my efforts were put on building this also on Arch Linux or Alpine, at the moment only Debian seems to be able to build it.
# Also, not sure why these instructions where nowhere on the internet, therefore I leave them here for whoever need them.
# Add Backports repo support
View vadd.go
package vadd
func addGeneric(dst, src []uint8) {
for i, s := range src {
dst[i] += s
func addVector(dst, src []uint8)
View decode-nostd-base64.go
package main
import (
var table = []byte{'v', 'w', 'x', 'r', 's', 't', 'u', 'o', 'p', 'q', '3', '4', '5', '6', '7', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'y', 'z', '0', '1',
'2', 'P', 'Q', 'R', 'S', 'T', 'K', 'L', 'M', 'N', 'O', 'Z', 'a', 'b', 'c', 'd', 'U', 'V', 'W', 'X', 'Y', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', '8', '9',
'+', '/'}
mengzhuo / md5sum.go
Created Mar 22, 2018
Simple parallel md5sum compatible to GNU md5sum
View md5sum.go
package main
// go build md5sum.go
// ./md5sum ~/*.log
// # or
// ./md5sum << EOF
import (
mengzhuo / bench.log
Created Dec 20, 2017
ARM64 benchmark
View bench.log
│BenchmarkAmove-4 20000000 102 ns/op 1881.62 MB/s
│BenchmarkBmove-4 50000000 34.5 ns/op 5563.29 MB/s
mengzhuo /
Last active Dec 16, 2017
scw bench go source
set -e
apt-get update -y -qq
apt-get install build-essential git golang -y -qq
git clone godev --depth=50
cd $GODEV/src
mengzhuo / ntp_offset_test.go
Last active Apr 15, 2018
Test NTP offset from NIST
View ntp_offset_test.go
package main
import (
mengzhuo / fib_test.go
Created Jun 12, 2017
Fibnacci by Quick Pow Matrix
View fib_test.go
package mfib
import "testing"
func TestFib(t *testing.T) {
target := []struct{ a, b int }{
{1, 1},
{2, 1},
{3, 2},
{4, 3},
mengzhuo / 00README
Created Dec 28, 2015
Generic LRU cache in Go
Retired in favor of
mengzhuo / .vimrc
Last active Sep 9, 2018
Vimrc of mine
View .vimrc
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
You can’t perform that action at this time.