2012年2月22日 星期三

RHEL initial Environment Setup SOP

I. Delete default firewall

VNC connection will not establish success if the default RHEL firewall exists.
1. list existed rule.

# iptables --list
output:
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination
1    RH-Firewall-1-INPUT  all  --  0.0.0.0/0            0.0.0.0/0

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination
1    RH-Firewall-1-INPUT  all  --  0.0.0.0/0            0.0.0.0/0

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination

Chain RH-Firewall-1-INPUT (2 references)
num  target     prot opt source               destination
1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
2    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           icmp type 255
3    ACCEPT     esp  --  0.0.0.0/0            0.0.0.0/0
4    ACCEPT     ah   --  0.0.0.0/0            0.0.0.0/0
5    ACCEPT     udp  --  0.0.0.0/0            224.0.0.251         udp dpt:5353
6    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           udp dpt:631
7    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:631
8    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
9    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22
10   REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited
2. Temporarily delete all the firewall rules

# iptables --flush
2a. (Option) Permanently remove all the default firewall rules
The permanent routting rule  stores in /etc/sysconfig/iptables file
# service iptables save

II. Setup DNS
Edit /etc/resolve.conf




III. Edit etc/hosts
Add a new mapping rule:    .

Reason: 
1. Due to jmx bundle will use getHost() to get ip address. 
2. Tibco message will not broadcast success without this setting.



IV. Add a sudo user and add the new user to /etc/sudoers
funkie ALL=(ALL)              ALL  //Syntax: user MACHINE=COMMANDS 

IV. Setup VNC
1. Uncomment the two line in  ~/.vnc/xtartup

unset SESSION_MANAGER 
exec /etc/X11/xinit/xinitrc

2. start vncservice with the new user that created in part V.

# vncserver :9527 -geometry 1440x880

VI. Create new yum repository

 1. copy the content that listed as below into /etc/yum.repo.d/centos.repo

[c5base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=os gpgcheck=1 enabled=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#released updates [c5updates] name=CentOS-$releasever - Updates mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=updates gpgcheck=1 enabled=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released [c5addons] name=CentOS-$releasever - Addons mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=addons gpgcheck=1 enabled=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful [c5extras] name=CentOS-$releasever - Extras mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=extras gpgcheck=1 enabled=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages [c5plus] name=CentOS-$releasever - Plus mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=centosplus gpgcheck=1 enabled=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
2. Clean yum cache

# yum clean all

VI. Check code from svn repository


svn command is already exists.




VII. Install JDK


To download rpm from official site and install it.
We can use the command as below to check the each file installation location.

# rpm -ql <rpm-package-name>



VIII. Install Tibco

1. The installation path should be(i.e., this just private convention).
2.a. setup LD_LIBRARY_PATH in /virgo/bin/startup.sh
2.b. setup LD_LIBRARY_PATH in ~/bin/springsource.sh
3. "chown" after installation
4. put the license file in one of $PATH

IX. Install MySQL


1. install though yum
# yum install mysql-server<mysql-server>
2. Auto activate mysqld when booting.

# vim /etc/rc.local
3. Grant remote connection

mysql > GRANT ALL PRIVILEGES ON *.* TO <username>@'%' IDENTIFIED BY '' WITH    GRANT OPTION;

4. Create fixhub db manually and quickfix db through quickfix sql tool


X. Checkout virgo from SVN

2011年7月8日 星期五

Use Cygwin as SSH server

Install Cygwin

• Download Cygwin from http://www.cygwin.com/
• Create c:\cygwin
• locate the setup.exe to c:\cygwin
• execute setup.exe
• Choose A Download Source → Install from Internet
• Select Root Install Directory → c:\cygwin
  Install For → All Users
  Default Text File Type → Unix / binary

• Select Local Package Directory → Local Package Directory: c:\cygwin
• Select Your Internet Connection → Direct Connection
• Choose A Download Site → ftp://ftp.nctu.edu.tw or ftp://ftp.ntu.edu.tw/

Necessary packages:

 • Admin → cygrunsrv
 • Net → openssh
 • Web → squid

Setup sshd service
 ssh-host-config

  Should privilege separation be used? (yes/no) no
  Do you want to install sshd as service? (yes/no) yes
  CYGWIN= (directly press "Enter key" to accept default value "ntsec")

 cygrunsrv --start sshd //start sshd service

 

2011年2月9日 星期三

am related command note

1. start Activity
$am start -n <package-name>/.<class-name> // e.g., idv.funkie.pkg/.MyClass

2011年2月4日 星期五

無心插柳,更讓我堅信~~~~~"改變"是對的

兔年(2011)大年初二晚上,不是在電視前或牌桌上, 竟然是在急診室(這次躺在病床上的不是我...)用手機寫部落格,這感覺真的挺妙的.

老實說, 對於自己目前的生活模式一直抱持著懷疑的態度: 這兒的薪水不錯, 工作內容不算無趣或太操, 加上住家裡和老爸雄厚的後盾, 短時間內, 工作一年半時就存到人生的第一桶金。 說真的,覺得自己很幸運, 若加上吳興街的房子改建,自己好像什麼都不用太努力就水到渠成。 然, 自己深深覺得這不是長久之道, 若不改變,彷彿此時此刻就看得到自己30年後的未來,(終其一生朝九晚八才得以換取堪用的生活費), 人生的腳步不會停滯不前,老爸不會永遠不退休, 自己不會永遠是個單身的羅漢咖, 總有一天會有小孩老婆要養,想到這,不禁懷疑,如果不改變現狀,走進"老鼠賽跑"的牢籠裡只是遲早的事。 自己似忽又找到當研究所創業的那種初衷跟動力。我不想被別人規定早上幾點要到公司; 晚上想走時還要擔心是不是太早走; 不想分紅時跟別人比較自己拿的是多是少; 不想再站在磅秤上給人秤斤論兩看自己值多少,可以領多少績效獎金,為什麼我的價值要由主管決定。 這次怎麼看自己都好像是既得利益者, 原本一點都不在乎可以拿多少,因為自認為這裡不會是屬於我的戰場, 我終究只會是個過客。 人生有太多不由自主的無奈, 我要搶回自己人生的發球權,這次的無心插柳,將更堅定我的信念。
Published with Blogger-droid v1.6.6

2011年1月18日 星期二

Git Server setup SOP

Setup user call "git"

1. Installing git
$ apt-get install git-core
2. Add "git" user and create ssh dir in his home.
$ sudo adduser git
$ su git // change role to "git" user
$ cd
$ mkdir .ssh
3. Append somebody's (e.g., funkie) public key to authorized_keys which is in /home/git/.ssh/ to let the user (e.g., funkie) has authorization to access git repository on server. P.S. the public key can be generated by "ssh-keygen -t rsa" on funkie's computer.
$ cat id_rsa.funkie.pub >> /home/git/.ssh/authorized_keys

Setup Gitosis



0. Change role to administrator
$ exit // change role to administrator
1. Installing Gitosis
$ apt-get install python-setuptools
2. Clone and install Gitosis from the project’s main site.
$ git clone git://eagain.net/gitosis.git
$ cd gitosis
$ sudo python setup.py install
3. Gitosis is going to manage your keys for you, so you need to remove the current file, re-add the keys later, and let Gitosis control the authorized_keys file automatically. For now, move the authorized_keys file out of the way:
$ mv /home/git/.ssh/authorized_keys /home/git/.ssh/ak.bak
4. Now it’s time to initialize Gitosis. You do this by running the gitosis-init command with your personal public key. If your public key isn’t on the server, you’ll have to copy it there:
$ sudo -H -u git gitosis-init < id_rsa.pub
Initialized empty Git repository in /home/git/repositories/gitosis-admin.git/
Reinitialized existing Git repository in /home/git/repositories/gitosis-admin.git/
5. This lets the user with that key modify the main Git repository that controls the Gitosis setup. Next, you have to manually set the execute bit on the post-update script for your new control repository.
$ sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
6. Let’s do an actual Git command — you’ll clone the Gitosis control repository:
$ rm gitosis //remove the dir that you clone from project’s main site before.
$ git clone git@gitserver:gitosis-admin.git


Setup Gitweb

1. Installing Git Web
$ apt-get install apache2
$ apt-get install gitweb
2. Setup project through
$ vi /etc/gitweb.conf

2010年12月29日 星期三

2010年12月27日 星期一

我相信


想飛上天
和太陽肩並肩
世界等著我去改變
想作的夢從不怕別人看見
在這裡我都能實現
大聲歡笑
讓你我肩並肩
何處不能歡樂無限
拋開煩惱勇敢的大步向前
我就站在舞台中間

我相信我就是我
我相信明天
我相信青春沒有地平線
在日落的海邊
在熱鬧的大街
都是我心中最美的樂園
我相信自由自在
我相信希望
我相信伸手就能碰到天
有你在我身邊
讓生活更新鮮
每一刻都精彩萬分 I Do Believe

想飛上天
和太陽肩並肩
世界等著我去改變
拋開煩惱勇敢的大步向前
我就站在舞台中間
我相信(我就是我)
我相信(自由自在)
我相信(我相信我相信)I believe

Java在Linux中文顯示問題

於java安裝目錄(i.e., ubuntu 10.10為/usr/lib/jvm/java-6-sun/)下的jre/lib/fonts新增fallback目錄
$ mkdir fallback
接下來就是把想要的字型,看是用複製的或是symbolic link到fallback目錄下

$ ln -s /usr/share/fonts/truetype/ttf-droid/DroidSansFallback.ttf .
搞定!!!

2010年12月21日 星期二

Install sun jdk on ubuntu 10.10


Android requires JDK5.0 to build the source code (at the time of writing).
(When build Android, the java and javac version is checked by */build/core/main.mk)
So, you need to: download and install the JDK5.0 from Sun's (Oracle's) website, or, use the old repositories:

1a. For Java 5, Add Jaunty to repositories
$ sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse"

1b. For Java 6, Add Jaunty to repositories
$ sudo add-apt-repository ppa:sun-java-community-team/sun-java6
2. Update source list  
$ sudo apt-get update
3. Install 
$ sudo apt-get install sun-java6-jdk (or sun-java5-jdk)

2010年12月20日 星期一

NetBeans相關設定

現在寫Java code所用的IDE不外乎兩種~~1. Eclipse 2. NetBeans, (n年前那紅透半邊天的JBuilder早就不知哪去了)。原本由於SUN近幾年的努力,NetBeans的使用者數量有後起直追之勢,可惜,我猜因為對於Android開發的支援程度,使用者數量應該又拉開了吧,當然,就算連身為SUN死忠支持者的我,遇到要寫Android也是只能乖乖的用eclipse。

但,為了表達對SUN魂的力挺,如要用JAVA開發(扣除開發Android外),基本上我仍是選擇使用NetBeans。

1. 設定JavaDoc
tool > java platforms > (tab)javadoc choose javadoc file, i.e., "jdk-6u23-docs.zip"

2. Look And Feel

NetBeans最為人所詬病的應該莫過於Linux上醜陋不堪的Swing UI吧~~~
上面這種UI,老實說,就連我都受不了......囧,不過還好可以透過以下套用Look and Feel的方式來設定

Netbeans start command in menu editor
/bin/sh "/home/funkie/netbeans-6.9/bin/netbeans" --fontsize 15 --laf Nimbus
透過上面方法修改之後的UI如下:
至於字型方面,一開始我選擇的是"Droid Sans Mono 15",這字型的確好看很多,所以也就用了一陣子,可惜它並不支援中文。原本想說coding基本上都是用英文,即使comment也不會用中文,所以也不以為意。但,最近在trace一個國人寫的軟體,結果~~~~~~幾乎所有註解都使用英文,看到那麼多無法顯示的方格真的是~~~~~囧。

不過就在google大神指引之下,終於讓我找到了完美字型~~~"WenQuanYi Micro Hei Mono"
这个字体的英文部分就是Droid Sans Mono中文部分是Droid Sans字体的中文补全
以上完整的引用自小弟找到的網頁。
重點是,這字型在ubuntu 10.10就有內建!!!!

2010年12月17日 星期五

Blogger-droid初體驗

這是剛從android market上下載的AP,讓你可以隨時隨地,走到哪裡,噗到哪裡,畢竟現實生活周遭處處有感動,若只能在有電腦的情況下才能發表文章,到有電腦的時候,火都熄了,也或許再也找不回當下那泉湧已現的想法,刻骨銘心的感動。看到這應用程式,不禁回想到當年CHT比賽作品中的一主打功能~~~~行動部落格......感觸良多啊~~~~~~~~
Published with Blogger-droid v1.6.5

2010年7月7日 星期三

MySQL備忘錄

懶的每次要用到的時候都得重查,就寫在這吧~~~~

1. 連線
$ mysql -u <username> -h <host-name> -p
Account Management

1. 新增帳號 (密碼可空白, i.e., 空字串)
$ GRANT ALL PRIVILEGES ON *.* TO <username>@<domainname> IDENTIFIED BY '<password>' WITH GRANT OPTION;
$ GRANT ALL PRIVILEGES ON *.* TO <username>@'%' IDENTIFIED BY '<password>';
As you see in the latest example we use '%' instead of localhost, which means that our user can use all the privileges from every host.


2. Modify password
$ mysqladmin -u <user> -p <old-passwd> password <new-passwd>;
or
$mysqladmin -u <user> password <new-passwd>;

New and delete database

1.. 新增database (i.e., 用``將database-name包起來可避免含有特殊字元的問題,如dash(i.e., - ))
$ CREATE DATABASE `<database-name>`
2.. 刪除database
$ DROP DATABASE `<database-name>`


2010年5月12日 星期三

KUBUNTU 10.04 setup

這裡拜終於把螢幕二度掛掉的公司notebook給拿回來,所以就順便重灌了KUBUNTU 10.04囉,基本上裝完並沒什麼太大的問題,而且的確也比以前進步很多,至少跟ASUS M50A相容多了

1. 可以用hard key鎖touch pad
2. 插耳機時,什麼都不用額外設定,聲音就會乖乖從耳機出來而不會像之前一樣,audio path依然 是從喇叭出來
3. 剛開機時,螢幕backlight是亮的,不用像之前一樣需要透過echo 15到etc下某個檔案中

不過美中不足的是,在此版本的gcin有問題,常打到一半,就不會出現注音了,因此現在改用新出來的ibus輸入中文(雖然說,我真的覺得ibus不好用...囧),安裝步驟如下,

1. install ibus and related packages
$ sudo aptitude install ibus ibus-qt4 ibus-chewing
2. 設定ibus
$ ibus-setup
3. 選擇ibus當作預設輸入法
$ sudo im-switch -s ibus
4. 將以下內容貼到~/.bashrc
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
5. 設定ibus開機啟動
Settings > System Settings > Advanced > Autostart > Add Program
填入『ibus-daemon -x -r -d』,然後重新登入。
基本上這樣就搞定了。

但怪的是預設安裝的AMAROK竟然沒辦法聽MP3,查了一下http://amarok.kde.org/wiki/MP3:Kubuntu ,發現只要裝下列的package就OK了
$ sudo apt-get install libxine1-ffmpeg gstreamer0.10-plugins-ugly
至於神奇的chrom 無法顯示噗浪訊息的問題,我的解法是~~~~就放棄它吧,
我最後改用chromium了.......XD

基本上搞定上述這些小問題,10.04還算是不錯用啦(雖然我最終的夢想是用gentoo....囧)~~~

2010年4月15日 星期四

Java Web Programming 開發環境建置

WebContainer Hosting

1. 下載Tomcat (環境為ubuntu 9.10,所以下載tar.gz)

2. 設定環境變數:
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
3. 執行 $CATALINA_HOME/bin/startup.sh,到這裡Tomcat就起來了(可以用browser連 http://localhost:8080,可以看到經典的湯姆貓網頁)

Web Project Configuration

1. 先將eclipse裝上wtp plugin

2. New Dynamic Web Project

3. eclipse會產生3個資料夾project所在的目錄:
 i. build:eclipes預設以此dir當作build output dir.
 ii. src: 存放source code
 iii. WebContent : 會自動產生WEB-INF, META-IN兩個資料夾, 網頁檔(jsp, html)會放在此處

4. 由於tomcat預設classes是在WEB-INF底下,所以在eclipse裏面剛new 出來的project設定property以 將output path改為WebContent/WEB-INF/classes

5. 在$CATALINA_HOME/conf/server.xml的中增加內容如下
Context path="/test" docBase="/home/funkie/data/document/eclipse_workspace/DMServer/WebContent"
debug="0" reloadable="true" crossContext="true" />
docBase: 為project 網頁的實體路徑
path: 為append在url的路徑名稱,如http://localhost:8080/test/ 就會連到 <略>/DMServer/WebContent/index.html

基本上這樣開發環境就搞定啦~~~~


Servlet

先寫個servlet來小試身手一下,在eclipse中的project按左鍵就有new servlet的選項可以選啦~~

基本上一個servlet要能work必須:
1. extends HttpServlet及implement doGet()和doPost().
2. 於WEB-INF/web.conf中declare該servlet,如下
<display-name>ServletTest</display-name>
<servlet-name>ServletTest</servlet-name>
<servlet-class> MyServlet2.ServletTest</servlet-class>
<servlet-mapping>
<servlet-name>ServletTest</servlet-name>
<url-pattern>/ServletTest</url-pattern>
</servlet-mapping>
3. compile的時候要include $CATALINA_HOME/lib/servlet-api.jar

最後用http://localhost:8080/test/ServletTest就可以連到該servlet了。其中,test為$CATALINA_HOM/conf/server.xml設定的context path,ServletTest為WEB-INF/web.conf設定的url-pattern


P.S.
  今天遇到一個白爛問題害我搞超久,由於平常都在寫android,所以一直使用jdk1.5 (因此tomcat也是使用1.5,i.e., 我有export JAVA_HOME),可是今天在web的project中用1.6 compile servlet,結果在啟動tomcat時就這樣起都起不來。

除了設定eclipse project的compiler外,還有個叫作"Project Facets"裏面的java選項也要改成1.5,
就是這東西害我今天搞超久.....囧。

2010年2月20日 星期六

2010.2.20.10:54---我在美國西雅圖~~~~~

從來沒想到我會來到一個這麼遙遠及陌生的地方,還記得一直到大學的時候才生平第一次做飛機勒,現在回想起來,現在已經去過

1. 馬來西亞基隆坡(第一次出國, 亞洲)
2. 大陸天津、北京(挑戰杯比賽, 亞洲)
3. 韓國釜山(conference論文報告, 亞洲)
4. 長灘島(自費旅遊, 亞洲)
5. 美國西雅圖(公司出差, 美洲)

  這樣離空中飛人當然還天差地遠啦,不過真的讓自己挺訝異的,我竟然會去過那麼多國家(對我自己而言啦~~),雖然專程去玩的也才兩次,跟團的就只有長灘島那次。
疑????寫著寫著西雅圖的天已經亮了(現在是西雅圖的清晨7點鐘),話說半小時候還要跟大頭中的大頭討論RC2測試的事情。

  差不多要下去飯店一樓吃早餐然後準備報告(我住SIERRA,這裡的櫃台小姐金髮碧眼,服務也很親切喔,離開的時候似乎應該跟她照一張....XD)啦,稍微說一下目前為止對這次美國行的感想好了,ㄜ~~~~~~~~~~簡單來說,美國就是~~~~~"大"!!!!什麼都大!!!漢堡車位車子人的身高等都特大~~~這幾天每次跟美國人去吃飯,吃完的下場就是撐,撐到一個不行,而且他們很重口味(昨天吃的那個義大利麵.....我的媽呀,怎麼可以那麼鹹)。雖然什麼都很大很漂亮(有空的話,我會多照幾張相片的)。
  由於時間不多,又怕回去之後自己有懶的寫blog,所以趕快趁現在紀錄一下(說真的,出國時,如果是自己去玩,要有NB再身邊還挺難的吧)。總之,目前我對這次美國行最大的感想就是~~~~~~~~~~~~英文超重要

2009年12月21日 星期一

台北房市未來一片大好?????

  最近看到了小豬代言"台北fun house"的訊息


  基本上,從一家公司的產品代言人可以看出,該公司主要想抓住哪些客源。然,不難猜出(雖然我不是他的粉絲),小豬的粉絲主要應該是遍布在國中(可能也有國小吧)到大學(我猜大三以上的就會少很多了)之間。換言之,此建案主打的消費族群是10幾歲到20出頭的女性,到底是建設公司策略錯誤,還是從2006至今已漲了50~200%的北部房市到了山窮水盡的窘境???
如果是後者,加上明年預期的央行升息,你還願意一廂情願相信"房價未來只會更高"的鬼話嗎?

2009年11月21日 星期六

難搞的grub menu.lst

  想說i7買了那麼久,也應該好好來裝一下gentoo了,基本上不是太難裝,最後gentoo是裝好了,雖然問題還是一堆。但最大的問題是,裝好gentoo後,我的windows竟然進不去了...囧。

環境:
目前有兩顆sata硬碟(/dev/sda為原本的windows,/dev/sdb為gentoo),grub是安裝在sdb(i.e., 在gentoo的live cd執行"grub" command進入grub的console環境並執行 "setup(hd1)")


C1: To boot any Dos or Windows from 1st bootable disk by Grub floppy
Note : For system in 2nd, 3rd or 4th primary partition use (hd0,1), (hd0,2) and (hd0,3) in the root statement. Makeactive statement is only needed if there is another system using the bootable flag in the same drive. MS System is in the first partition of the bootable drive.

Code:
root (hd0,0)
chainloader +1
makeactive
boot
C2: To boot any Dos or Windows from 2nd bootable disk by Grub floppy
Note : System installed in 1st bootable drive but later moved to 2nd drive. The two map statements let the MS system reclaim the 1st bootable disk status.

Code:
root (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1
makeactive
boot
C3: To boot multiple installations of Dos and Windows by Grub floppy
Note : System was originally installed in 1st bootable drive 2nd partition and has another MS system in front. Later the disk was moved to 4th disk position.

Code:
root (hd3,1)
hide (hd3,0)
unhide (hd3,1)
map (hd3) (hd0)
map (hd0) (hd3)
chainloader +1
boot
根據我的環境,我是用C2這個solution,最後終於開進windows了~~~~XD

2009年11月3日 星期二

Use output file of git-diff to patch

透過git-log可以看到如下git所有的commit紀錄:
commit 5619a29eaf0fa10f08ccca45f4e6942db523d212
Author: funkie_ko
Date: Tue Nov 3 18:19:24 2009 +0800

fix tt bug 139030: There will not pop up a puk unlock screen after input wrong pin three times into Settings

commit a423561d15fae91f50e66c09c741fcd9cdf58a20
Author: Merxxxcxk Hung
Date: Tue Nov 3 13:18:36 2009 +0800

Relocated strings which were created by xxxx to xxxx_strings.xml.

commit 1829bf9c370380dce1fa1145831dca668aecaa80
Merge: 897712a... 3c6bbcc...
Author: Olxxxiver Hu
Date: Sun Nov 1 12:46:54 2009 +0800

Merge remote branch 'origin/branch-xxxx' into branch-yyyy

commit 3c6bbcc7579d3723fc8ed79371ee2aaf15392b08
Author: Hxxxanes
Date: Fri Oct 30 18:47:04 2009 +0800

goal : distinguish android original strings and asus strings
modified: res/values/xxx.xml
modified: src/com/xxxx/settings/bluetooth/BluetoothSettings.java
step 1. create diff file.
$ git-diff <base-version-hash-number>..<target-version-hash-number> > output.diff
ex.
git-diff a423561d15fae91f50e66c09c741fcd9cdf58a20..5bdae902aebf45b107eac8303aea4fc5dc8208ab > ~/Settings.diff

step2. patch through the diff output file from step1.
$ patch -p1 < /home/funkie/output.diff

# patch –p[n] <>

-p[n] n , 只要取消多少條 / 及其左邊的路逕. /usr/src/linux 為例,

-p0 就是不取消任何路經

-p1 則將 / 取消, usr/src/linux

-p2 則是將 /usr/ 取消, src/linux

再以 src/linux 為例:

-p0 依然為 src/linux

-p1 則為 linux, 如此類推...

補充一下, 路徑的話,請用vim打開patch檔看

--- a/usr/src/linux 2008-04-05 18:23:00.000000000 +0800

+++ b/usr/src/linux 2008-04-05 18:24:27.000000000 +0800


2009年10月23日 星期五

以file當作swap

今天開了兩個virtual box(i.e.,一個gentoo,一個windows),再加上build Android,整個記憶體加上遠本的swap都用到滿,

system_monitor

於是.....號稱高檔NB的Asus M50SA.....

死當!!!!

因此利用file來增加swap空間,step 如下

step 1.

dd if=/dev/zero of=swap_file bs=1024k count=1024

step 2..

mkswap swap_file && swapon swap_file

搞定!!!

在msn writer上的奮力一噗

這是用msn writer post文章的第一篇.....

test...

     test...

           test...