快轉到主要內容

文章

2015


JWT

·2 分鐘

OAuth2 現在已經很多的網站都有實作了,像是 Twitter, Google, Facebook, Github 等網站本身都有支援 OAuth2 的驗證與授權機制

最近因為專案需求,特地去研究了一下有關 Web API 做驗證授權的機制,看到網路上有很多的範例,在講解 AngularJS SPA 的登入作法,想說可以把類似的機制放到 RESTful Service 的驗證上面

2014


Docker service behind proxy - Ubuntu

·1 分鐘

編輯 /etc/default/docker
把以下 export http_proxy 的那一行 unmark, 然後改成你的 proxy 設定

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Docker Upstart and SysVinit configuration file

# Customize location of Docker binary (especially for development testing).
#DOCKER="/usr/local/bin/docker"

# Use DOCKER_OPTS to modify the daemon startup options.
#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"

# If you need Docker to use an HTTP proxy, it can also be specified here.
export http_proxy="http://127.0.0.1:3128/"

# This is also a handy place to tweak where Docker's temporary files go.
#export TMPDIR="/mnt/bigdrive/docker-tmp"

重新啟動 docker service — service docker restart

Git-Tf 協同作業,Git 的一些小設定

·1 分鐘

本身有用 Windows, Mac 在開發系統,我其實是偏好在 Mac 編輯,因為我喜歡 Sublime Text !!!

不過,在 Windows 中用 Visual Studio 2013, 公司內部是規定使用 TFS (老實說我不是很喜歡,不過整個團隊以及公司都是這樣,也不得不用~)

有些時候,不想使用笨重的 VS2013,像是開發 Web Project,我還是喜歡用 Sublime Text 編輯,像是 javascript/html 都有不錯的開發經驗~ 所以只好用 git-tf 來做界接~