Skip to content

Instantly share code, notes, and snippets.

Yang Liu liuyangc3

Block or report user

Report or block liuyangc3

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
liuyangc3 /
Created May 29, 2020 — forked from soarez/
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

liuyangc3 /
Created Jan 3, 2020 — forked from YumaInaura/
iTerm2 — search keyword and copy and paste text

iTerm2 — search keyword and copy and paste text

Output example


Command + F to start search mode


liuyangc3 / gist:2def8aa8f2b0db8c973cc0d1aca78957
Created Jan 9, 2019 — forked from sing1ee/gist:5971946
View gist:2def8aa8f2b0db8c973cc0d1aca78957


####原题描述 两个软硬程度一样但未知的鸡蛋,它们有可能都在一楼就摔碎,也可能从一百层楼摔下来没事。有座100层的建筑,要你用这两个鸡蛋通过最少的次数确定哪一层是鸡蛋可以安全落下的最高位置。可以摔碎两个鸡蛋

####方法分析 看到这个题目,最保险的方法就是一层一层试验,但这样只需要一个鸡蛋就可以了。我们现在有两个鸡蛋,完全可以用有更快的方法。


liuyangc3 / remote network dump by nc
Last active Nov 19, 2019
dump network cap from remote
View remote network dump by nc
# windows installed Wireshark and cygwin
# open cygwin
nc -l 11233 | /c/Program\ Files/Wireshark/Wireshark -k -S -i -
# on reomote Linux box
tcpdump -i eth0 -n -s 0 not port 11233 or 22 -w -|nc <your windows ip> 11233
liuyangc3 / shadowsocks
Last active Jan 15, 2016
install shadowsocks on EC2
View shadowsocks
add_source() {
# fix apt-get update 404 not found
cat << EOF
deb lucid main multiverse universe
deb lucid-security main multiverse universe
deb lucid-updates main multiverse universe
liuyangc3 / golang .bashrc
Last active Dec 25, 2015 — forked from vsouza/.bashrc
Golang 1.5 setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell or bash.
View golang .bashrc
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
liuyangc3 /
Last active Oct 8, 2019 — forked from amr/
Find processes executing futex with FUTEX_WAIT (helps find deadlock-ed processes)
# Find all processes that are executing a futex(2) call with op=FUTEX_WAIT
# In some cases this can be helpful in finding deadlock-ed processes.
test ! $UID -eq 0 && echo -e "WARNING: Not running as root, only processes for this user are being scanned\n" >&2;
pids=$(ps -u $UID -opid --no-headers)
You can’t perform that action at this time.