Simple Git Commands

1. configure up git account
$ git config –global “John Doe”
$ git config –global

2. add a remote git
$ git remote add [local_git_name] [remote_git_url]

3. fetch the remote repository
$ git fetch [remote_git_name]

step 2, 3 can be done use clone
$ git clone [remote_git_url] [local_git_name]

4. create a branch named newfeature to work on
$ git branch newfeature
$ git checkout newfeature

or $ git checkout -b newfeature

5. add  all changes
$ git add -A

6. commit changes
$ git commit -m ‘comments’

7. change to master and update master
$ git checkout master
$ git pull

8. merge newfeature with master
$ git merge newfeature

9. push to origin
$ git push origin master

10. resolve conflicts
$ git diff

11. change remote git uri
$ git remote set-url [new_uri]

12. create a new git repository
$ git init

13. add a remote git
$ git remote add [remote_uri]

14. check all remote in repository
$ git remote -v

15. see git logs
$ git log

16. want undo commits
$ git checkout [commit-log-hash-num] .   (this . is necessary for all trees commit)

17. rollback to a point
$ git reset –hard [commit-log-hash-num]
$ git push -f [origin] [branch]

Reference :

Install ArcGIS for Server 10.1 in latest Cent OS

I have successfully installed ArcGIS Server 10.1 in CentOS 6.5 recently.

Steps are as mostly the same as installation in Linux, please see:

for details.

Before installation, better to follow the steps below:

Give your host machine a good hostname, don’t use @, .(dot), etc special characters

Configure your hosts file, make sure your hostname is accessible through the domain network

Cent OS version should be 6.5 and above: cat  /etc/*release*

Internet connection

Follow the steps in the guide, in step 6, using online Authorize method, and you will be required to input authorization code obtained from ESRI and your contact details.

After authorization, the arcgis/manager website should be available on firefox, and hence installation for this current user is done.

Configure ArcGIS for Server to be started with the operating system, treat Cent OS as RHEL.

Common OSX/Unix Commands

Common OS X/Unix Commands

Navigation Commands

1. cd: change directory

cd – : go back to previous directory

cd .. : go up to the parent of the current directory

cd ../..: go up two levels, to the parent’s parent directory

cd /: go to the top of the boot volume

cd /Users

cd ~ : go to home directory

cd ~/Documents

2. pwd: print working directory, the current path

3. ls: just list the names of the files in the current directory

ls –l: (long) list the files with their characteristics

ls –lo : list the files with their flags

ls –a: list all files in the current directory

ls –F: list filenames with a special character at the end that tells you what kind of file

it is

ls *.jpg: list the names of all files with names ending in ‘.jpg’

ls a*: list the names of all files start with ‘a’

ls *arr*: list the names of all files with names containing ‘arr’

File & Folder Manipulation Commands

1. cp: copy a file or directory

cp foo bar: copy a file named foo in current directory, and name the copy bar

cp foo ~/Documents: copy foo to Documents directory

cp foo ~/Documents/bar: copy foo to Documents, and name the copy bar

cp *.jpg ~/Documents: copy all jpg images to Documents

cp –R Documents “Documents backup”: back Documents, and name it Documents backup

sudo cp –Rp /Users “/Users backup”: copy entire Users directory preserving as much

as possible of the files information

2. mv: move of rename a file or folder

mv foo bar: rename foo to bar

mv foo ~/Documents: move foo to Documents directory

mv foo ~/Documents/bar: move foo to Documents and rename it to bar

mv *.jpg ~/Documents: move all jpg images to Documents

rm: remove a file /folder

rm foo: delete foo

rm a*: delete all files name start with a

rm *.jpg: delete all jpg images

rm –R temp: delete temp folder and all its contents

3. mkdir: make directory

mkdir foo: create a new directory foo

4. rmdir: remove an empty directory

5. ditto: copy a directory, preserving many characteristics of the enclosed files

6. chmod: change protection mode on files and folders, deal with complex access right with files

7. chflags: change a file or folder’s flags: arch, opaque, nodump, sappnd, schg, uappnd, uchg

chflags uchg foo: lock file or folder named foo against changes

chflags uappnd foo: make the file ‘foo’ append-only

chflags –R nouchg ~/Documents: unlock Documents and everything in it

8. chown: change the owner or group of a file or folder, must be root

sudo chown eva /Users/Shared/meeting-notes.txt: switch to root and assign eva as

the owner of meeting-notes.txt

sudo chown –R eva:staff /Users/Shared/temp: assign eva as the owner and staff as

the group for folder temp

9. chgrp: change the group of file or folder

chgrp staff /Users/Shared/meeting-notes.txt: Assign staff as the group of the file

chgrp –R staff /Users/temp: assign staff as the group of temp

Working with Text files

1. more and less: display the contents of a text file

2. tail: display the last few lines of a text file, useful for examining logs

tail -100 /var/log/system.log | more: use more to display last 100 lines of system.log

tail –f /var/log/system.log: print the last screenful of entries from system.log then

follow changes to file

3. vi, emacs, nano: other text editors, see man accordingly

4. tr ‘r’ ‘n’ <macfile.txt> unixfile.txt: convert Mac-format file to Unix-format file


1. su: set user, allow you to become another user, use ‘exit’ to back to normal

2. sudo: set user and do. Execute a single command as another user

sudo –u geoger ls ~geoger/Documents: become geoger and view his Documents

3. ps: list the processes running on the system

ps –ax: list all running processes

ps –aux: list all running processes with additional information about resource usage

4. top: list top CPU consuming processes running

top –us5 display processes sorted by CPU usage, updating 5 s

5. kill: kill process

kill 220: terminate process #220

6. ifconfig: configure network interfaces

ifconfig –a: list all network ports and their settings

7. man: display online documentation

man ls: display commands ls usages

8. apropos: list the manual pages relating to a particular keyword.

Apropos file: list manual pages mention ‘file’ in their summary file

9. clear: clear current screen

10. open: open a file in GUI

open ~Documents/foo: open folder foo

open –a /Applications/ ~/Documents/foo: use TextEdit to open foo

11. find: scan a directory structure for files matching certain criteria

find / -name foo: search entire file structure for files named exactly ‘foo’

find . –name foo: search current directory for foo

find .-mtime -2: search current directory for files modified within 2 days

find . –name *att*: searc h for files names contained ‘att’ in current directory

12. zip/unzip: package and compress files/decompress

13. gzip/ungzip

14. exit

15. reboot

16. shutdown –h now

UX Papers

10 Usability Heuristics for User Interface Design
First Principles of Interface Design
User Interface Engineering



Boxes and Arrows

Learning JavaScript from the wide web

Learning JavaScript from the wide web, a summary of my own path.

Getting Started
w3schools JavaScript Tutorials 
MDN JavaScript
MSDN JavaScript
ECMA JavaScript Definition

Books (entry to prof, ebooks available on request )
1. JavaScript: The Definitive Guide
2. Professional JavaScript for Web Developers
3. Pro JavaScript Techniques
4. JavaScript: The Good Parts
5. JavaScript Patterns
6.  High Performance JavaScript

JavaScript Libraries
1. Helpers: jQuery /Dojo/YUI/ExtJS/Bootstrap/foundation
2. MVCs: Amber.js /Angular.js/Knockout.js/Backbone.js

Online Articles
1. Guide to Learning JavaScript
2. Google Guide to JavaScript Coding Style
3. JavaScript Concepts
4. Unobtrusive JavaScript
5. JavaScript Design Patterns
7. JavaScript Mixins
8. Minification v Obfuscation
9. Patterns for Large-Scale JavaScript Project
10. JSON

Someone’s blogger to follow
1. Douglas Crockford
2. John Resig
3. Nicholas C. Zakas

JavaScript Quiz Online
1. Learning Advanced JavaScript
2. So you think you know JavaScript (ans)
3. JavaScript Quiz

Practice doesn’t make perfection without a proper methodology.