Phonetic Notations

Google Dictionary Google dictionary uses a phonetic notation same as NORD (New Oxford American Dictionary). To figure out an unknown phonetic notation, the simple way is to look up a few words that you know how to pronounce: church, hat, which, judge, game, thing, ship, thin, this, yes, pleasure cat, pay, care, father, arm, let, see, here, city, my, pot, no, caught, war, force, boy, put, tour, boot, out, cut, word, item, rabbit, winner, pupil ...

June 30, 2015

Notes on the Design of Go

Refusing new features Avoid leaky abstraction as much as possible. If an abstraction is not solid enough, you’d rather not use them at all. Go is designed like this, the features are carefully selected. If a feature is not solid enough, it will not be allowed to enter Go. No implicit string concatenation Rob: That used to be in the language but was dropped when the semicolon insertion rules went in. You need the + to be able to span lines, and if you can’t span lines operatorless concatenation is close to pointless. ...

June 29, 2015

What Go cannot Do

This is a list about the corner cases that Go cannot do, and their work arounds. Run all deferred functions of other goroutines when a goroutine panics Uncaught panicking of one goroutine will exit the program without executing deferred functions of other goroutines. Workaround: this is the standard behavior, C++ with RAII also has the same problem. Persist your data in a way that crashing will not cause data integrity issue. ...

June 16, 2015

Ebook Manipulation Tools

Ebook manager: Calibre Kindle PDF optimizer: k2pdfopt PDF Border Cropper Briss CHM File Extractor archmage PDF editing Xournal convert images to PDF sudo apt-get install imagemagick convert *.jpg pictures.pdf convert between different formats: sudo apt-get install calibre ebook-convert xxx.mobi xxx.txt --unsmarten-punctuation

June 4, 2015

Schemata: database scheme extractor & code generator in Go

Database scheme extractor & code generator in Go. Supported database: MySQL SQLite

May 19, 2015

How to "go get" Behind a Proxy

Proxy for “go get” https_proxy=http://user:pass@proxy_host:port go get ... Proxy for Git In $HOME/.gitconfig: [https] proxy = proxy_url Proxy for Mercurial In $HOME/.hgrc: [http_proxy] host = host:port user = ... passwd = ...

May 6, 2015

Tips on SSH

Generate SSH keys ssh-keygen -C [email protected] Authorize public key at remote server ssh-copy-id user@host On Mac OSX, ssh-copy-id should be installed first. brew install ssh-copy-id Generate PEM ssh-keygen -f ~/.ssh/id_rsa -e -m pem > ~/.ssh/id_rsa.pem Copy file by base64 On remote session, run base64 < myfile and copy the output. On local terminal, run base64 -d > myfile, paste the content and press ctrl+D.

April 28, 2015

How to Generate XSD Schema from XML?

Apache XMLBeans is an old tool but still functioning. Download and uncompress the latest binary release, then run inst2xsd under bin folder (needs JDK). inst2xsd xxx.xml

April 23, 2015

A Developer's Guide to Password Management

This article is intended to be a comprehensive recipe to password management, assuming: You are a developer You have to manage dozens of passwords, ssh key pairs and possibly some secret documents You want strong security on each of them You do not want to forget any of them but do not either want to spend too much time memorizing them You want to access your passwords from both your computers and mobile devices The proposed solution includes: ...

February 18, 2015

A Brief Note on Scientific Web Surfing

Knowledge is power. Information is liberating. — by Kofi Annan. VPS CloudsVM Vultr DigitalOcean BandwagonHOST Client Area -> Services -> Order New Services 64MB RAM is enough for running both ShadowSocks and pdnsd Install Ubuntu LTS 32bit (x86, i686) or CentOS 7. CentOS Install CentOS 7 (64bit) Shadowsocks cd /etc/yum.repos.d/ wget https://copr.fedorainfracloud.org/coprs/librehat/shadowsocks/repo/epel-7/librehat-shadowsocks-epel-7.repo yum update yum install shadowsocks-libev cd /etc/shadowsocks-libev/ vim config.json # server should be 0.0.0.0 vi /usr/lib/systemd/system/shadowsocks-libev.service # replace all $variables to constant values to fix the bug systemctl enable shadowsocks-libev systemctl start shadowsocks-libev pdnsd wget http://members.home.nl/p.a.rombouts/pdnsd/releases/pdnsd-1.2.9a-par_sl6.x86_64.rpm yum localinstall pdnsd-1.2.9a-par_sl6.x86_64.rpm vim /etc/pdnsd.conf pdnsd.conf (replace the port) ...

February 14, 2015