Skip to content

Instantly share code, notes, and snippets.

View mingderwang's full-sized avatar

Ming-der Wang mingderwang

View GitHub Profile
@mingderwang
mingderwang / gist:264675
Created December 28, 2009 13:37
2011 projects
test
@mingderwang
mingderwang / camels3
Created August 9, 2011 10:30
camel aws component
This document will show you how to use camel 2.8.0 to access AWS S3.
@mingderwang
mingderwang / gitserver
Created August 9, 2011 15:53
how to make a git server on AWS CE2
ming@ming-laptop:~$ mkdir test
ming@ming-laptop:~$ cd test
ming@ming-laptop:~/test$ git init
Initialized empty Git repository in /home/ming/test/.git/
ming@ming-laptop:~/test$ touch README
ming@ming-laptop:~/test$ git add README
ming@ming-laptop:~/test$ git commit -m 'init'
[master (root-commit) 33baaac] init
Committer: ming <ming@ming-laptop.(none)>
Your name and email address were configured automatically based
@mingderwang
mingderwang / servicemix.log
Created August 10, 2011 12:56
Apache ServiceMix (4.3.0)
/ ___| ___ _ ____ _(_) ___ ___| \/ (_)_ __
\___ \ / _ \ '__\ \ / / |/ __/ _ \ |\/| | \ \/ /
___) | __/ | \ V /| | (_| __/ | | | |> <
|____/ \___|_| \_/ |_|\___\___|_| |_|_/_/\_\
Apache ServiceMix (4.3.0)
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
@mingderwang
mingderwang / .aliasrc
Created August 13, 2011 07:16
alias rc for aws
alias go.sling='cd /home/ming/svn/sling/launchpad/builder; java -jar target/org.apache.sling.launchpad-7-SNAPSHOT-standalone.jar'
alias go.js='java -jar /home/ming/svn/requirejs-0.24.0/build/lib/rhino/js.jar'
alias sshaws='ssh -i /home/ming/aws/xxxxx.pem ec2-user@url0.info'
@mingderwang
mingderwang / .bashrc
Created August 13, 2011 07:17
bash rc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
export PATH=$PATH:/sbin/:/usr/sbin/:/home/ec2-user/scala/bin
# User specific aliases and functions
export PS1="\e[0;35m[\u@\h \w]\$ \e[m"
@mingderwang
mingderwang / gist:1148457
Created August 16, 2011 04:52
git push origin master (again on aws)
hongzhang-shide-mac-mini:Cocos2dAnimationTest ming$ GIT_TRACE=true
hongzhang-shide-mac-mini:Cocos2dAnimationTest ming$ export GIT_TRACE
hongzhang-shide-mac-mini:Cocos2dAnimationTest ming$ git push origin master
trace: built-in: git 'push' 'origin' 'master'
trace: run_command: 'ssh' 'gti@url0.info' 'git-receive-pack '\''Cocos2dAnimationTest.git'\'''
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
hongzhang-shide-mac-mini:Cocos2dAnimationTest ming$ git push origin mastertrace: built-in: git 'push' 'origin' 'master'
trace: run_command: 'ssh' 'gti@url0.info' 'git-receive-pack '\''Cocos2dAnimationTest.git'\'''
Permission denied (publickey).
@mingderwang
mingderwang / log
Created August 16, 2011 06:11
add a public key for new host to ssh aws ec2
1. make a new public on local host (generate public key under ~/.ssh)
cd
ssh-keygen -t rsa -b 1024
2. copy the output of the following cat.
cat ~/.ssh/id_rsa.pub
3. ssh to your aws ec2 and paste it to ~/.ssh/authorized_keys2 (a new file)
@mingderwang
mingderwang / gist:1196402
Created September 6, 2011 02:19
git pull from branch not master
363 git config --global
364 git config
365 git pull
366 git branch -a
367 git checkout origin/monica
368 git branch -a
369 git checkout -b monica
371 git branch -a
372 git status
373 gitk
@mingderwang
mingderwang / gist:1196445
Created September 6, 2011 02:44
get your public key
1. make a new public on local host (generate public key under ~/.ssh)
$ cd
$ ssh-keygen -t rsa -b 1024
2. copy the output of the following cat to me.
$ cat ~/.ssh/id_rsa.pub