show code js

2012年9月9日 星期日

mac disable double .filename and .ds_store


Open terminal and command below to disable.
If you want enable them, use reverse like true => false or false => true
  • Disable .DS_Store 
defaults write com.apple.desktopservices DSDontWriteNetworkStores true

  • Disable Apple Double (.filename) 
export COPYFILE_DISABLE=true

git on mac


Server:
1.get dropbox account and download & install dropbox
2.download and install git
3.goto dropbox directory
(A)mkdir project [for all git root]
(B)cd project and mkdir new_project.git
(C)cd new_project.git and command:git init --bare [to format]

Client:
1.New directory
(A)mkdir a project
(B)cd project
(C)git init
(D)git remote add origin ~/Dropbox/project/myproj.git

2.from a project
(A)git init or git clone ~/Dropbox/project/myproj.git [to format and get code from git server]
(B)git remote add origin ~/Dropbox/project/myproj.git

3.add new document to git server
(A)git add filename.xxx
(B)git commit {-a} -m "Add a filename.xxx"
(C)first time:git push origin master, next time:git push

4.modify and update to git server
(A)git commit -m "desc:modify"
(B)first time:git push origin master, next time:git push

5.update from git server
(A)first time:git pull origin master, next time:git pull

6.add ignore:
add a .gitignore in project root directory and set
data/*
xml/*.dat
password.file

7.see log
(A)git log


8.mirror a new project :
mkdir ../new_directory
git archive master | tar -x -C ../new_directory

2012年9月8日 星期六

zend studio



  • download from www.zend.com
  • install Zend Studio trial on mac
  • open zend studio
  • change encoding
  1. open Preferences>General>Workspace
  2. see "Text file encoding" and modify it to utf-8
  • hide .svn
  1. right click item
  2. Build Path -> Configure Inclusion / Exclusion Filters… .
  3. in "Exclusion patterns" click add and keyin "**/.svn/" before click ok button
  4. click finish button
  • install language package
  1. click help and install new software
  2. keyin "http://archive.eclipse.org/technology/babel/update-site/R0.9.1/helios/" in work with and enter to waiting pending
  3. pending finish will list more package let you choose
  4. checkbox "Babel Language Packs in [language name]", click next
  5. click allow or finish to waiting for install package


2012年4月27日 星期五

cocos2d

we can use cocos2d development game on iOS


  1. install xcode
  2. goto http://www.cocos2d-iphone.org/
  3. click download tag, and download stable version
  4. create a directory on mac, set it call cocos2d
  5. uncompress and move to cocos2d directory
  6. open terminal and goto cocos2d-iphone-VER directory
  7. use "sudo ./install-templates.sh" to install
  8. when pup a window that you keyin password to contiune to finish.
  9. open xcode and click cocos2d project, and you can see three project templates
  10. choose a template to create new project and building after see a hellow world on screen
  11. if happen warning like this "uniqueIdentifier is deprecated", you can find out those line and command out. because iOS can`t create UDID, but apple have a method to create it.
add a png
  1. copy a png file to project, ex:test.png
  2. edit filename"layer".m
  3. add code and run, you can see test.png on screen and moving.
    // start
    
    // add a png at screen
    CCSprite *spacePng = [CCSprite spriteWithFile:@"test.png"];
    [spacePng setPosition:ccp(100, 100)];
    [self addChild:spacePng];
    
    // let this png moving
    id moveAction = [CCMoveTo actionWithDuration:5.0f position:ccp(300, 200)];
    [spacePng runAction:moveAction];
    
    // end

2012年4月11日 星期三

改用IP-PBX後,可以淘汰傳統交換機了

可以淘汰傳統交換機了
這次終於有發揮的地方,將二部比VIGOR2920N大一些的數位交換機作跨岸整合

  1. 分機可以互撥
  2. 可以跨區線上聯合語音會議室
  3. 本地專屬的語音會議室
  4. 可以跨區撥打外線,以市話計費,客戶回撥時可以以市話計費並可跨區至二岸分機
  5. 可以使用智慧型手機、平版、桌型電腦、筆電等作為分機,若與桌機整合則可以省去分機實機的建置費用及空間
  6. 群組共振及權限區分
  7. 還有CDR功能及LIFE CALL功能
  8. 利用Qos及頻寬的調整,語音訊息都很棒
  9. 空間只需要二個3.5吋硬碟大小的空間及網路即可
  10. 二岸整體建置費用費用不到十萬大洋哩。
Great!