Skip to content

Instantly share code, notes, and snippets.

View kumabotz's full-sized avatar

Tery Lim kumabotz

View GitHub Profile
@kumabotz
kumabotz / gist:4136132
Created November 23, 2012 15:30
Build GitHub Android App Using Eclipse

app

  1. Create Android Application.
    • name: ui.user.HomeActivity
    • project: app
    • package: com.github.mobile
  2. Copy master's src, res, assets and AndroidManifest.xml to app project.
  3. Fix source path.
    • Right click src > Build Path > Remove from Build Path.
    • Right click src/main/java > Build Path > Use as Source Folder.
  4. Follow Building From Eclipse wiki.
@kumabotz
kumabotz / gist:4211225
Created December 5, 2012 01:37
Put your aliases in a separate file
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# add below into your .bashrc or .bash_profile
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
@kumabotz
kumabotz / gist:4211276
Created December 5, 2012 01:42
Stashing your changes
# Stashing is a great way to pause what you’re currently working on and come
# back to it later. For example, if you working on that awesome, brand new
# feature but someone just found a bug that you need to fix. Add your changes to
# the index using
$ git add .
# Or add individual files to the index, your pick. Stash your changes away with:
$ git stash
@kumabotz
kumabotz / gist:4211359
Created December 5, 2012 01:53
Undoing - Revert, unmodify or unstage a file or project state at any point.
@kumabotz
kumabotz / gist:4211403
Created December 5, 2012 01:58
Adding Color and Customize the Bash Prompt (PS1)
# add into .bashrc file
PS1='\[\e[0;33m\]\w\[\e[0m\] '
# update the changes
$ source ~/.bashrc
@kumabotz
kumabotz / gist:4212035
Created December 5, 2012 03:51
Git aliases
alias ga='git add'
alias gaa='git add .'
alias gb='git branch'
alias gc='git commit -m'
alias gca='git commit -am'
alias gd='git diff'
alias gh='git stash'
alias gl='git log --oneline'
alias gm='git commit --amend'
alias gn='git clone'
@kumabotz
kumabotz / gist:4217388
Created December 5, 2012 16:55
Find a file
$ find / -name 'port*'
@kumabotz
kumabotz / gist:4217600
Created December 5, 2012 17:18
Polishing your rubygems
$ sudo gem cleanup
$ gem stale
# test rvm
$ source ~/.rvm/scripts/rvm
$ type rvm | head -n 1
rvm is a function
$ rvm requirements
# use rvm
$ rvm list known
$ rvm install 1.9.2
$ rvm use 1.9.2
@kumabotz
kumabotz / gist:4221505
Created December 6, 2012 03:01
Terminal or shell command to shutdown or reboot Ubuntu Linux
# shutdown / poweroff Ubuntu Linux
$ sudo halt
# or
$ sudo shutdown -h now
# reboot Ubuntu Linux
$ sudo reboot