sudo locale-gen "en_US.UTF-8" //安装locale文件
sudo dpkg-reconfigure locales //重新设置语言文件,如果跳转到设置页面,可以选择默认的即可。
sudo vi /etc/default/locale 改为如下
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127.0.0.1 ocsp-lb.apple.com.akadns.net | |
127.0.0.1 ocsp-cn-lb.apple.com.akadns.net | |
127.0.0.1 ocsp.apple.com.download.ks-cdn.com | |
127.0.0.1 k128-mzstatic.gslb.ksyuncdn.com | |
127.0.0.1 ocsp.apple.com.cdn20.com | |
127.0.0.1 ocsp.g.aaplimg.com | |
127.0.0.1 ocsp.apple.com | |
127.0.0.1 ocsp.digicert.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
,gitclone(){ | |
if [[ "$1" =~ ^git@github.com ]]; then | |
local repo=$(echo $1 | grep -Po '(?<=git@github\.com:)[\w-]+\/[\w-]+') | |
local origin_url=$1 | |
elif [[ $1 =~ ^https://github.com ]]; then | |
local repo=$(echo $1 | grep -Po '(?<=https:\/\/github\.com\/)[\w-]+\/[\w-]+') | |
local origin_url=$1 | |
elif [[ $1 == "gh" ]]; then | |
local repo=${4} | |
local origin_url="git@github.com:$repo.git" |
$ gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
$ gem sources -l
确保只有 gems.ruby-china.org,遇到ssl证书问题,改用http
安装node-sass失败时,打开~/.npmrc,添加
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let regex; | |
/* 匹配特定的字符串 */ | |
regex = /hello/; // 查找斜杠中的字符串(大小写敏感)……匹配 "hello", "hello123", "123hello123", "123hello",但不匹配 "hell0", "Hello" | |
regex = /hello/i; // 查找斜杠中的字符串(大小写不敏感)……匹配 "hello", "HelLo", "123HelLO" | |
regex = /hello/g; // 全局查找斜杠中的字符串…… | |
/* 通配符 */ | |
regex = /h.llo/; // "." 匹配除了换行外的任何一个字符……匹配 "hello", "hallo",但不匹配 "h\nllo" | |
regex = /h.*llo/; // "*" 匹配任何字符零次或多次,如 "hello", "heeeeeello", "hllo", "hwarwareallo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let regex; | |
/* matching a specific string */ | |
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello" | |
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO" | |
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes... | |
/* wildcards */ | |
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo" | |
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* resource services of Auth page | |
*/ | |
import http from './_Http.js' | |
export default http({ | |
userInfo: { | |
url: '/api/auth/get-user', | |
type: 'json', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch('https://stackoverflow.com') | |
.then(res => { | |
console.log('step1', res) | |
}) | |
.then(res => { | |
console.log('step2') | |
throw new Error('borken here') | |
}) | |
.then(res => { | |
console.log('step3') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @func | |
* @desc 生成评分 | |
* @param {number} rate [1-5] | |
* @returns {String} | |
*/ | |
const getStar = (rate) => '★★★★★☆☆☆☆☆'.slice(5 - rate, 10 - rate) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Baymax</title> | |
<link rel="stylesheet" href="./style.css"> | |
</head> | |
<body> | |
<div class="Baymax"> |
NewerOlder