Skip to content

Instantly share code, notes, and snippets.

View chichunchen's full-sized avatar

Chi-Chun, Chen chichunchen

  • HPE/Cray
  • Minnesota
View GitHub Profile
Compiling:
Pthread:
In Mac: g++ -o name name.c (the same as non-pthread program)
In Ubuntu: g++ -o name name.c -lpthread
OpenMP:
@chichunchen
chichunchen / qt_config
Last active August 29, 2015 14:07
C++ notes
// qt confit in yosemite
Qt/5.3/clang_64/mkspecs
vim qdevice.pri: macosx10.10
@chichunchen
chichunchen / .vimrc
Last active August 29, 2015 14:07
Vim configuration
" Version:
" 5.0 - 29/05/12 15:43:36
"
" Blog_post:
" http://amix.dk/blog/post/19691#The-ultimate-Vim-configuration-on-Github
"
" Awesome_version:
" Get this config, nice color schemes and lots of plugins!
"
" Install the awesome version from:
@chichunchen
chichunchen / .tmux.conf
Last active August 29, 2015 14:07
Tmux Configuration
set -g default-terminal "screen-256color"
# Our .tmux.conf file
# Setting the prefix from C-b to C-a
# START:prefix
# END:prefix
# Free the original Ctrl-b prefix keybinding
# START:unbind
unbind C-b
# END:unbind
" 補齊括弧
" 語法
" inoremap triger_char mapping_str
" 映射指令 觸發字元 映射字串
"
" 註:<LEFT> 為向右鍵字元
inoremap ( ()<LEFT> "小括號補齊,並將輸入游標左移一個字元
inoremap [ []<LEFT> "中括號補齊,並將輸入游標左移一個字元
inoremap { {}<LEFT> "大括號補齊,並將輸入游標左移一個字元
In the Terminal, use:
- Shift + Fn Up for PageUp,
- Shift + Fn Down for PageDown,
- Shift + Fn Left for Home,
- Shift + Fn Right for End
@chichunchen
chichunchen / .bash_profile
Last active August 29, 2015 14:07
Bash Profile in my mac
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
# --------------------------
@chichunchen
chichunchen / sublime text 3 tweak
Last active August 29, 2015 14:07
sublime text 3 called in mac terminal
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime
# Environment: MacOSX 10.9, 10.10 & SublimeText3 Build3065
@chichunchen
chichunchen / Basketball ScoreBox
Created September 20, 2014 13:12
Basketball-Box Database association
team.rb
class Team < ActiveRecord::Base
validates :name, :presence => true
has_many :players
has_many :games
end
----------------------------------------------------