搜尋此網誌

網頁

2013年11月4日 星期一

MongoDB shell usage


1. Install mongodb.

2. excute mongo

        ==>   show dbs.

3. mongo xxx  ==> connect to xxx database.

2013年10月21日 星期一

The authenticity of host can't be established issue



when using ssh connect to 192.168.0.xxx would meet this issue:

  ssh  -o StrictHostKeyChecking=no  192.168.0.xxx

2013年10月19日 星期六

git commit 常用指令

修正 commit 過的版本歷史紀錄 : http://ithelp.ithome.com.tw/question/10138791

* git reset --hard "HEAD^"
* git reset --soft "HEAD^"
* git reset --hard ORIG_HEAD
* git commit --amend

設定 .gitignore 忽略清單: http://ithelp.ithome.com.tw/question/10138831

2013年9月16日 星期一

Start Learning Grunt Task manager



Source: slide 1

             slide 2

 hello grunt sample code:

   github

2013年9月12日 星期四

Vim 取代所有字串



當需要替換大量字串時,可以於套用以下命令:

str1 : 需要被替換掉的字串

str2: 欲替換的新字串

:g/str1/s//str2/g

2013年9月7日 星期六

AddThis Sharing Button API


新增social button:
      http://support.addthis.com/customer/portal/articles/381263-addthis-client-api#.UiwFXMZmiSo

Ubuntu 12.04 解決無法安裝sun-java6-jdk 問題


原文出處: http://witmax.cn/install-sun-java6-jdk.html

2013年9月4日 星期三

How to fix MongoDB connect fail



Steps as shown below:

 sudo rm /var/lib/mongodb/mongod.lock   
sudo -u mongodb mongod -f /etc/mongodb.conf --repair 
sudo service mongodb start

2013年6月7日 星期五

Use java tool to generate class and jni header file



1. cd source folder of java:

    type: "javac xxx.java" => generate xxx.class

2. change folder to package folder:

   type "javah -jni yyy.xxx" => generate yyy_xxx.h