本篇是原文 Delightful Database Seeding with Docker 的摘要
流程總共區分為三個階段:
- 複製正式伺服器的資料並清理
- 打包並發佈 Seeder
- 使用 Seeder 匯入資料
export default { | |
alpha_dash: (field) => `${field} 欄位只能填寫半形英文字母、數字、底線及剪號。`, | |
alpha_num: (field) => `${field} 欄位只能填寫半形英文字母及數字。`, | |
alpha: (field) => `The ${field} 欄位只能填寫半形英文字母。`, | |
between: (field, [min, max]) => `${field} 欄位必須介於 ${min} 和 ${max} 之間。`, | |
confirmed: (field, [confirmedField]) => `${field} 欄位必須與 ${confirmedField} 欄位相同。`, | |
decimal: (field, [decimals] = ['*']) => `${field} 欄位只能填寫${decimals === '*' ? '' : '小數點 ' + decimals + ' 位以內的'}小數。`, | |
digits: (field, [length]) => `${field} 欄位只能填寫剛好 ${length} 位數的數字。`, | |
dimensions: (field, [width, height]) => `${field} 欄位只能填寫 ${width} 像素乘以 ${height} 像素。`, | |
email: (field) => `${field} 欄位的電子郵件地址不正確。`, |
本篇是原文 Delightful Database Seeding with Docker 的摘要
流程總共區分為三個階段:
aligner@1.2.4 | |
aligner-css@1.2.1 | |
aligner-javascript@1.3.0 | |
aligner-php@1.1.1 | |
atom-beautify@0.30.5 | |
atom-format-lua@0.1.5 | |
autocomplete-paths@2.8.1 | |
busy-signal@1.4.3 | |
docblockr@0.11.0 | |
duplicate-line-or-selection@0.9.0 |
apt-get install build-essential libtool libusb-dev libusb-1.0 gcc make autoconf pkg-config libudev-dev flex pcsc-tools libpcsclite-dev | |
#download pcsc lite | |
wget https://alioth.debian.org/frs/download.php/file/4225/pcsc-lite-1.8.22.tar.bz2 | |
tar xvf pcsc-lite*.tar.bz2 | |
cd pcsc* |
// https://xss-game.appspot.com/level6 | |
alert(1) |
7 4 5 | |
1 3 1 | |
3 2 2 | |
2 3 5 | |
3 4 4 | |
1 6 6 |
//: Playground - noun: a place where people can play | |
import Darwin | |
var prime = [2, 3, 5, 7] | |
func isPrime(num: Int) -> Bool { | |
let primeMax = Int(floor(sqrt(Double(num)))) | |
for i in prime { | |
if i > primeMax { | |
break | |
} |
# deb http://mirrors.aliyun.com/ubuntu trusty main restricted | |
# deb http://mirrors.aliyuncs.com/ubuntu trusty main restricted | |
# deb http://mirrors.aliyun.com/ubuntu trusty-updates main restricted | |
# deb http://mirrors.aliyuncs.com/ubuntu trusty-updates main restricted | |
# deb http://security.ubuntu.com/ubuntu trusty-security main restricted | |
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb http://mirrors.aliyun.com/ubuntu trusty main restricted |