Skip to content

Instantly share code, notes, and snippets.

View SherryQueen's full-sized avatar
😶
Learning.

MySherry SherryQueen

😶
Learning.
  • china
  • shanghai
View GitHub Profile
@SherryQueen
SherryQueen / .zshrc
Last active June 23, 2019 03:23
zsh相关
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
function bash_center_print {
strlen=${#1}
blanklen=$(((COLUMNS - strlen) / 2))
echo "$(tput cuf $blanklen) $1"
}
function bash_center_print_red {
server {
listen 80; # 监听80端口
server_name your_domain; # 监听的域名
# 挂载的应用1
# ^~ 表示匹配后不再向下寻找
location ^~ /app1 {
alias /data/app1; # 应用所在文件地址, alias 表示所有查询以对应的相对路径开始进行
index index.html inde.htm; # 默认的 index 文件
try_files $uri $uri/ /index.html =404 # 尝试寻找对应的文件. 根据 /app1/xxx 中的 /alias/xxx 进行查询匹配, 若未匹配到 返回 /index.html 若无 则 返回 404状态
<code_scheme name="Default" version="173">
<HTMLCodeStyleSettings>
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
</HTMLCodeStyleSettings>
<JSCodeStyleSettings version="0">
<option name="FORCE_SEMICOLON_STYLE" value="true" />
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
<option name="USE_DOUBLE_QUOTES" value="false" />
<option name="FORCE_QUOTE_STYlE" value="true" />
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
@SherryQueen
SherryQueen / AntiMissing.tsx
Created March 27, 2019 09:21
react 防误触实现
import React from 'react';
export type AntiMissingProps = {
once?: boolean;
timeout?: number;
eventName?: string;
};
const defaultOption = { eventName: 'onClick', timeout: 1000, once: false };
@SherryQueen
SherryQueen / There be
Last active October 8, 2019 03:07
英语学习
#### There be
There be+名词主语(人或物)+地点 主要用来表示“人或事物的存在”或“某地有某物”
##### 一般用法
###### 一般:
当be后面接的是单数可数名词,则采用is;当be后面接的是复数可数名词,则采用are。如:
1. There is a man under the tree.
2. There are some apples on the table.
registry="https://registry.npm.taobao.org"
disturl="https://npm.taobao.org/dist"
nvm_nodejs_org_mirror="http://npm.taobao.org/mirrors/node"
nodejs_org_mirror="http://npm.taobao.org/mirrors/node"
sass_binary_site="http://npm.taobao.org/mirrors/node-sass"
electron_mirror="http://npm.taobao.org/mirrors/electron/"
SQLITE3_BINARY_SITE="http://npm.taobao.org/mirrors/sqlite3"
profiler_binary_host_mirror="http://npm.taobao.org/mirrors/node-inspector/"
node_inspector_cdnurl="https://npm.taobao.org/mirrors/node-inspector"
selenium_cdnurl="http://npm.taobao.org/mirrors/selenium"