Simple Git Commands

1. configure up git account
$ git config –global user.name “John Doe”
$ git config –global user.email johndoe@example.com

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 : http://git-scm.com/docs

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:

http://resources.arcgis.com/en/help/install-guides/arcgis-server-unix/10.1/index.html#/Installing_ArcGIS_for_Server_on_one_machine/00sz00000008000000/

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

Miscellaneous

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/TextEdit.app ~/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

W3.org

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

西方艺术流派
走近移动设计——应用场景篇
走近移动设计——硬件设备篇
社交设计的探讨-如何有效导向商业价值
如何为细分市场设计产品

你所没有意识的你自己——浅谈下意识设计
为信息设计
以行为为中心的设计
社交型网站首页面设计分析
浅谈ipad阅读类应用设计
社交网站用户的十大心理怪习

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
6. IIFE
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.