Skip to content

Instantly share code, notes, and snippets.

View utensil's full-sized avatar

Utensil utensil

  • 20:28 (UTC +08:00)
View GitHub Profile
@utensil
utensil / and_blocks.md
Last active December 16, 2015 20:00
Android Building Blocks
@utensil
utensil / voice-recognition.md
Created November 2, 2012 07:44
语音识别那些事

CMU Sphinx: Open Source Toolkit For Speech Recognition

Julius: Open-Source Large Vocabulary CSR Engine

@utensil
utensil / cpp_relection.md
Created March 10, 2012 02:50
C++反射那些事

对于C++反射,我关心的使用领域包括:模版元编程可以解决的那一部分编译时反射,运行时反射在实现IoC、ORM等中可以让程序员写得更惬意的语法糖衣、DSL,在类Rspec测试和Mock中所需要的对于被测程序非侵入式的信息获取和校验。

http://www.garret.ru/cppreflection/docs/reflect.html , 我们可以了解到在C++中达成反射的基本方法:

Program was build with enabled debugging support and distributed with debugging
ApproachAdvantagesDisadvantages
Parse debugging information
  • Program should not be changed
  • It is possible to extract complete information about types used in the programs
@utensil
utensil / node-and-npm-in-30-seconds.sh
Created February 12, 2012 12:14 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh