Skip to content

Instantly share code, notes, and snippets.

View wdv4758h's full-sized avatar

Chiu-Hsiang Hsu wdv4758h

  • Taipei, Taiwan
View GitHub Profile
@wdv4758h
wdv4758h / share.md
Last active August 29, 2015 14:01
Some online sharing site
@wdv4758h
wdv4758h / 0_reuse_code.js
Created May 25, 2014 12:38
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@wdv4758h
wdv4758h / vundle.rst
Last active August 29, 2015 14:02
vim vundle

a little code that I saw long time ago

put it in your .vimrc

then vundle (vim plugin manager) will automatic install if you have git

then your can happly use vundle to mange your vim plugin :)

vundle support three source :

@wdv4758h
wdv4758h / git.md
Last active August 29, 2015 14:02
about git

Git

  • delete remote branch

    git push <remote name> --delete <branchName>
    
  • get remote repo branch as local branch

@wdv4758h
wdv4758h / .gitconfig
Created June 11, 2014 07:16
git config
[alias]
log1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
log2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
@wdv4758h
wdv4758h / pip.md
Last active August 29, 2015 14:02
some pip command

輸出已安裝的 packages 成 requirements 格式

pip freeze

從 requirements 安裝

pip install -r /path/to/requirements.txt
@wdv4758h
wdv4758h / web_storage.md
Last active September 5, 2024 08:48
HTML5 Web Storage (Local Storage, Session Storage)
  • Web Storage 是一種可讓網頁將資料儲存於本地端的技術,其作用如同 cookie,但空間更大
  • 主要有兩種
    • local storage (類似 persistent cookies)
    • session storage (類似 session cookies)
  • 原本是 HTML5 規格的一部份,後來單獨劃為一個規格
  • Web Storage 純粹運作於 client side

Web Storage 和 Cookies 不同處