Monthly Archives: October 2011

install Plone 4.1.x

Ubuntu: 11.10Install all the required package sudo apt-get install build-essential sudo apt-get install libssl-dev sudo apt-get install libxml2-dev sudo apt-get install libbz2-dev sudo apt-get install libjpeg62-dev sudo apt-get install libreadline6-dev ./install.sh –target=/home/vyang/opt/plone –with-python=/usr/bin/python2.6 standalone

Posted in plone | Leave a comment

Install RVM and Ruby

rvm, virutualenv Remove ubuntu’s ruby-rvm sudo apt-get –purge ruby-rvm Install  curl -L https://get.rvm.io | bash -s stablervm list knownrvm install 1.9.3-head Configuration (.bashrc)  PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting source /home/victor.yang/.rvm/scripts/rvm

Posted in ruby | Leave a comment

Install sproutcore

 Ubuntu 11.10 Step 1 has be done before step 2, otherwise the ruby will complain about “zlib not installed” apt-get install zlib1g-dev libssl-dev libreadline5-dev libxml2-dev libsqlite3-devFollow steps in install sproutcore on linux

Posted in ruby, sproutcore, ubuntu | Leave a comment

install sun-jdk 6, 7 on Ubuntu 12.04

http://www.devsniper.com/ubuntu-12-04-install-sun-jdk-6-7/ sudo update-alternatives –config java sudo update-alternatives –config javac sudo update-alternatives –install “/usr/bin/java” “java” “/usr/lib/jvm/jdk1.7.0/bin/java” 1 sudo update-alternatives –install “/usr/bin/javac” “javac” “/usr/lib/jvm/jdk1.7.0/bin/javac” 1 sudo update-alternatives –install “/usr/bin/javaws” “javaws” “/usr/lib/jvm/jdk1.7.0/bin/javaws” 1

Posted in java, ubuntu | Leave a comment

mysqladmin

mysqladmin cmd  mysql -u uid -p blah_db <blah.sql

Posted in mysql | Leave a comment

Python study notes

python overview abstraction:  type: dynamic binding, strong type(for catching bugs) object is first class:objects can be freely passed around, inspected, and placed in various data structures (e.g., lists or dictionaries) at run-time. organizing code: package, module, class,method, function.  flow control: … Continue reading

Posted in python | Leave a comment

cpython source code study note

http://www.python.org/dev/peps/pep-0339/ http://eli.thegreenplace.net/articles/ Python compiler Python 2.7.2 source code main():Modules/python.c  Py_Main():Modules/main.c Py_Initialize(): Python/pythonrun.c PyRun_SimpleFileExFlags PyRun_FileExFlags PyParser_ASTFromFile returns AST module Parser build CST: PyParser_ParseFileFlagsEx: Parser/parsetok.c Transform CST to AST: PyAST_FromNode(): Python/ast.c run_mod(mod)  PyAST_Compile(mod) compile AST into byte code PyEval_EvalCode runs the byte … Continue reading

Posted in python | Leave a comment