Linux
常用操作
Proxy
export ALL_PROXY=socks5h://127.0.0.1:6156/
export ALL_PROXY=socks5h://127.0.0.1:6156/
:ve
:set paste
:set nu
;(function () { | |
var step = 0 | |
function load (url, callback) { | |
var script = document.createElement('script'); | |
script.src = url; | |
script.onload = callback; | |
document.body.appendChild(script); | |
} | |
function summonEruda (e) { | |
if (e.target.dataset && e.target.dataset.summonEruda) { |
/** | |
* Follow the description from wiki https://en.wikipedia.org/wiki/Email_address | |
* | |
* Valid test address: | |
* | |
simple@example.com | |
very.common@example.com | |
disposable.style.email.with+symbol@example.com | |
other.email-with-hyphen@example.com | |
fully-qualified-domain@example.com |
/^1[3-9](\d{9})$/.test(phone) |
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your location block(s): | |
# | |
# include cors_support; | |
# | |
# For more information on CORS, please see: http://enable-cors.org/ |
/** | |
* Score password | |
* | |
* Usage: | |
* var score = scorePassword(password); | |
* if (strength >= 80) { | |
* // strong | |
* } else if (strength >= 60) { | |
* // good | |
* } else { |
if (!String.prototype.format) { | |
/** | |
* Add format function to String | |
* | |
* Usage: | |
* "{0} is dead, but {1} is alive! {0} {2}".format("ASP", "ASP.NET") | |
* returns ASP is dead, but ASP.NET is alive! ASP {2} | |
* | |
* Come from: http://stackoverflow.com/a/4673436/4472903 | |
*/ |
# 如果有需要,根据系统版本将 vivid 替换为 utopic, trusty, precise 等即可 | |
# 163, sohu, aliyun 三者开启其一即可,个人测试觉得 163 最快 | |
# aliyun | |
deb http://mirrors.aliyun.com/ubuntu/ vivid main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ vivid-security main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ vivid-updates main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ vivid-proposed main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ vivid-backports main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ vivid main restricted universe multiverse |
<?php | |
return [ | |
'unique' => ':attribute 已存在', | |
'accepted' => ':attribute 是被接受的', | |
'active_url' => ':attribute 必须是一个合法的 URL', | |
'after' => ':attribute 必须是 :date 之后的一个日期', | |
'alpha' => ':attribute 必须全部由字母字符构成。', | |
'alpha_dash' => ':attribute 必须全部由字母、数字、中划线或下划线字符构成', |