Skip to content

Instantly share code, notes, and snippets.

View ghprince's full-sized avatar
🎯
Focusing

Gordon Gao ghprince

🎯
Focusing
View GitHub Profile
@ghprince
ghprince / Preferences.sublime-settings
Created September 26, 2012 15:06
Sublime Text 2 User Config
{
"color_scheme": "Packages/User/Railscasts.tmTheme",
"tab_size": 2,
"translate_tabs_to_spaces": true,
"vintage_start_in_command_mode": true,
@ghprince
ghprince / .vimrc
Created October 11, 2012 09:02
Vim User Config
" Turn of Vi compatibility
set nocompatible
set encoding=utf-8
set backspace=2
" Universal map leader
let mapleader = ","
" Plugin pathogen setting
call pathogen#infect()
@ghprince
ghprince / isu.vim
Created October 12, 2012 09:59
ISU syntax file for VIM
" Vim syntax file
" Language: ISU
" Maintainer: Gordon Gao <gordon.gao@oracle.com>
" Last Change: 2012 Oct 11
" Add the following line into your ~/.vimrc for auto detection
" autocmd BufRead,BufNewFile *.isu set filetype=isu
" Based on expect.vim and tcl.vim
" For version 5.x: Clear all syntax items
@ghprince
ghprince / configure_vim.md
Last active October 11, 2015 15:18
Configure VIM in Solaris 10 for test code development

Configure VIM in Solaris 10

#####for test code development by Gordon Gao 10/12/2012

install vim and gvim using pkgutil

install following plugins (all from Github)

  • Pathogen https://github.com/tpope/vim-pathogen
  • NERDTree https://github.com/scrooloose/nerdtree
@ghprince
ghprince / patch_process.md
Created October 12, 2012 10:04
Patch Process on Solaris

###How to make patches for test packages (or any Solaris packages) by Gordon Gao (gordon.gao@oracle.com)

Creat a folder for your patch and create the following structure (please substitube O000003-03 with your own patch id):

gogao/g3-patches/O000003-03% find .
.
./tmp
./tmp/O000003-03
./src
@ghprince
ghprince / cck.vim
Created October 13, 2012 10:25
CCK syntax file for VIM
" Vim syntax file
" Language: CCK
" Maintainer: Gordon Gao <gordon.gao@oracle.com>
" Last Change: 2012 Oct 13
" Please move it to ~/.vim/syntax/cck.vim
if version < 600
syntax clear
elseif exists("b:current_syntax")
@ghprince
ghprince / script.vim
Created October 13, 2012 10:28
CCK filetype detection for VIM
" Vim support file to detect file types in scripts
"
" Maintainer: Gordon Gao <gordon.gao@oracle.com>
" Last change: 2012 Oct 17
" This file is a user customized script file to detect CCK filetype.
" Only do the rest when the FileType autocommand has not been triggered yet.
if did_filetype()
finish
@ghprince
ghprince / .bashrc
Created November 14, 2013 08:41
my .bashrc used for test code development in Solaris 10
function in_svn() {
if $(svn info >/dev/null 2>&1); then
return 0
fi
return 1
}
function get_svn_project_and_branch() {
svn info 2> /dev/null | \
awk -F/ \
@ghprince
ghprince / .bashrc
Created January 27, 2015 05:50
svn prompt in bashrc
function in_svn() {
if $(svn info >/dev/null 2>&1); then
return 0
fi
return 1
}
function get_svn_project_and_branch() {
svn info 2> /dev/null | \
awk -F/ \
@ghprince
ghprince / tieupgrade.sh
Created January 28, 2015 03:44
TIE package upgrade in Solaris 10
#!/opt/csw/bin/bash
#requires bash 4+
#TIEfile format must be "<PKGNAME> <VERSION>" in each line, e.g.
#SUNWt1tsk 4.33
#SUNWt1ato 2.7
#SUNWtuact 1.10
usage() {
echo "Usage : $0 <TIEfile>" 1>&2
exit 1