Pages

Monday, February 20, 2012

[Android] Android + Eclipse on Mac

1.Download JDK
  
  developer.apple.com

  Click the 'Resource' at the top bar to find the package suit your os

  install it, we assume the path (JDK)is:

  /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Commands



2. Download Android SDK
   
    http://developer.android.com/sdk/

   Choose the suitable version


   Extract it, here, we assume you put the extracted file under : '/Library/android-sdk-macosx'
  $ cd  /Library/android-skd-macosx/tools
  $ ./android

  Choose those version of Android SDK you wish to develop on, then 'Accept all'


3. Download Eclipse and android ADT plug-in
    http://www.eclipse.org/downloads/

    Install and open Eclipse

    Click Help -> Install New Software...

    Click and 'Add...' button on the right side of 'With with'

    Enter you self-description in Name field, say, 'Android Development Kit (ADT)'
    fill the location filed with: 'https://dl-ssl.google.com/android/eclipse/'

    Install 'Android DDMS' and 'Android Development tools' at least
    (If there are error messages under Win7, try running your eclipse as Administrator)

    Click Eclipse -> Preferences -> Android    and set the SDK location as:
    /Library/android-sdk-macosx

Sunday, February 19, 2012

[Git] Git on your MAC

[By macport]
1. Install macport at http://www.macports.org/install.php

sudo port selfupdate 

sudo port install git-core

For default, it will be installed in
/opt/local/bin/git

Note:
Xcode package include git also, its path is:
/usr/bin/git


GUI for git
http://www.sourcetreeapp.com/
or on AppleStore
http://itunes.apple.com/us/app/sourcetree/id411678673


[w/o macport]
 Download the installer for OSX
 http://code.google.com/p/git-osx-installer/


Initialize the current directory:
git init
Add the current directory to tracking repository
git  add .
Commit all the file under the current directory with message 'XXX'
git commit -a -m 'XXX'
Modify the commit message
git commit --amend -m 'new message'
Name the last commit file as 'ver1.0' (branch)
git tag ver1.0
Show all file whose version is 'ver1.0'
git show ver1.0[:[spec file]]
Show the message
git show HEAD
show last message
git show HEAD^
Checkout (restore) all the files to commit 'ver1.0'
git reset ver1.0
Checkout (restore) to last commit
git reset HEAD^

Work with a remote repository
http://spencerimp.blogspot.tw/2013/10/git-how-to-use-git-on-bitbucket.html


You can use option -h to know detail about the command


reference
http://tkg.im.ncue.edu.tw/?p=755