Skip to content

Instantly share code, notes, and snippets.

View snowyu's full-sized avatar

Riceball LEE snowyu

View GitHub Profile
@snowyu
snowyu / rust-vs-go.md
Created July 24, 2019 02:13 — forked from weihanglo/rust-vs-go.md
【譯】Rust vs. Go

【譯】Rust vs. Go

本文譯自 Julio MerinoRust vs. Go。Julio Merino 目前是 G 社僱員,在 G 社工作超過 8 年,無論工作內外,都接觸開發不少 Go 語言,並撰寫 [Rust 點評][rust-review]系列文,來聽聽他對 Rust 與 Go 的想法吧。

Thanks Julio Merino for this awesome article!


@snowyu
snowyu / .block
Created September 14, 2018 14:52 — forked from mbostock/.block
Zoomable Circle Packing
license: gpl-3.0
height: 960
@snowyu
snowyu / ubuntu-cli-install-android-sdk.sh
Created August 29, 2018 13:45 — forked from zhy0/ubuntu-cli-install-android-sdk.sh
Install Android SDK on headless Ubuntu linux machine via command line, so that you can compile open source Android apps.
#!/bin/bash
# Thanks to https://gist.github.com/wenzhixin/43cf3ce909c24948c6e7
# Execute this script in your home directory. Lines 17 and 21 will prompt you for a y/n
# Install Oracle JDK 8
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install -y oracle-java8-installer
apt-get install -y unzip make # NDK stuff

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices

ASCII

@snowyu
snowyu / README.md
Created September 30, 2017 22:14 — forked from githubutilities/README.md
Shadowsocks proxy and ssh proxy

Shadowsocks Proxy

apt-get install python-pip
pip install shadowsocks

sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
@snowyu
snowyu / README.md
Created March 13, 2017 10:31 — forked from magnetikonline/README.md
Using Dnsmasq with Ubuntu 16.04LTS/14.04LTS/12.04LTS for virtual machine web application testing.

Using Dnsmasq with Ubuntu for VM web application testing

When running virtual machines under a Linux host system for testing web apps in various browsers (e.g. Internet Explorer), I found it rather tedious having to continually tweak the hosts file within each VM for the purpose of adding entries pointing back to the host machine's development web server address.

Instead the steps below will setup Dnsmasq on a Ubuntu 16.04LTS, 14.04LTS or 12.04LTS host machine for the purpose of serving both it's own DNS queries and that of virtual machine guests. Dnsmasq will parse the /etc/hosts file on your host machine where we will keep a single set of DNS entires to our test web application(s).

@snowyu
snowyu / etcd_cluster.sh
Created December 10, 2016 03:09 — forked from jolestar/etcd_cluster.sh
Run etcd cluster by docker with custom network
docker network create etcd --subnet 172.19.0.0/16
docker run -d --name etcd0 --network etcd --ip 172.19.1.10 quay.io/coreos/etcd etcd \
-name etcd0 \
-advertise-client-urls http://172.19.1.10:2379,http://172.19.1.10:4001 \
-listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
-initial-advertise-peer-urls http://172.19.1.10:2380 \
-listen-peer-urls http://0.0.0.0:2380 \
-initial-cluster-token etcd-cluster-1 \
-initial-cluster etcd0=http://172.19.1.10:2380,etcd1=http://172.19.1.11:2380,etcd2=http://172.19.1.12:2380 \
@snowyu
snowyu / introrx.md
Created August 5, 2016 11:48 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@snowyu
snowyu / _usage
Last active January 3, 2016 13:39 — forked from subosito/_usage
curl https://raw.github.com/gist/3342482/57d1f618104185aa89044f934c4f86cb74e11553/rbenv-openshift.sh | bash
@snowyu
snowyu / postsql.sql
Created May 27, 2012 12:36
PostgreSQL as JSON Document Store
-- PostgreSQL 9.2 beta (for the new JSON datatype)
-- You can actually use an earlier version and a TEXT type too
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8
-- JSON Types need to be mapped into corresponding PG types
--
-- Number => INT or DOUBLE PRECISION
-- String => TEXT