Jim Cheung

Sunday, March 02, 2014

I've been watching coding casts last two days, I really like Jeffrey Way's casts, he always has some nice tricks. he has a new site Laracasts, and I heard about it from PHP Town Hall Podcast. these are what I've watched these two days:


some tricks I learned (windows shortcut keys)

here's a pbcopy for cygwin after googling:

if [ -e /dev/clipboard ]; then
    alias pbcopy='cat >/dev/clipboard'
    alias pbpaste='cat /dev/clipboard'
fi

(updated: cygwin has build-in functions on windows, install the cygutils-extra package, putclip and getclip commands)

Friday, March 28, 2014

I'm totally dive into golang, it will be my primary language from now on.

see how clean it is:

type ByteSize float64
const (
    _ = iota  // ignore first value by assigning to blank identifier
    KB ByteSize = 1<<(10*iota)
    MB
    GB
    TB
    PB
    EB
    ZB
    YB
)

for editor, desktop environment I use LiteIDE (updated, it was removed by my antivirus program), and waiting for the netbeans plugins.

under terminal go already provided an vim plugin (in misc/vim/), add these lines to .vimrc

filetype off
filetype plugin indent off
set runtimepath+=$GOROOT/misc/vim
filetype plugin indent on
syntax on
autocmd BufWritePre *.go :silent Fmt
au FileType go map <leader>r :!go run %<CR>
Blog Archive