2015-02-12 聚會手記

上一週 || 下一週

Table of Contents

blue119

查看連往某位址會走的路由

$ ip route get 8.8.8.8

qerter

# iptables -t nat -A POSTROUTING --source 192.168.2.0/24 --destination 10.1.2.0/24 -j MASQUERADE

yan

Compile 32-bit program on 64-bit system

# apt-get install lib32z1-dev
$ gcc -m32 -o output32 hello.c

nm - list symbols from object files

$ nm libxxx.so

在 golang 使用 C static library
How do you statically link a c library in go using cgo? - Stack Overflow
http://stackoverflow.com/questions/16747021/how-do-you-statically-link-a-c-library-in-go-using-cgo

在 64 位元系統編譯 32 位元 golang 執行檔 (不支援 cgo)

$ GOARCH=386 go build

windows - Compile 32 bit binary on 64 bit system - Stack Overflow
http://stackoverflow.com/questions/16552754/compile-32-bit-binary-on-64-bit-system


X Window rotate screen
旋轉 180 度

$ xrandr -o inverted
or 
$ xrandr --output LVDS1 --rotate inverted

恢復正常

$ xrandr -o normal
or
$ xrandr --output LVDS1 --rotate normal

SourcecodeBrowser
會分析變數、函式,還有 call graph
http://sourcecodebrowser.com/

除非特別註明,本頁內容採用以下授權方式: Creative Commons Attribution-ShareAlike 3.0 License