live-server --proxy=/:http://loc.example.com/
This file contains hidden or 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"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>The HTTP access had been disabled!</title> | |
</head> |
This file contains hidden or 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
server { | |
listen 80; | |
listen 443; | |
listen [::]:80; | |
listen [::]:443; | |
server_name fonts.lug.ustc.edu.cn; | |
access_log /var/log/nginx/revproxy_access.log; | |
error_log /var/log/nginx/revproxy_error.log; | |
This file contains hidden or 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
var fs = require('fs') | |
var http = require('http'); | |
var https = require('https'); | |
/** | |
* @param {String} url 下载链接 | |
* @param {String} localFile 本地保存路径 | |
* @param {function} callback | |
*/ |
This file contains hidden or 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
const superagent = require('superagent'); | |
const url = { | |
'login_url': 'http://example.com' | |
} | |
let loginInfo = { | |
"IsRemember": "true", | |
"loginName": "admin", | |
"loginPwd":'123456' |
This file contains hidden or 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
location / { | |
root /var/www/lidong.me/www; | |
index index.html index.htm index.php; | |
# 配置允许cors跨域 | |
if ($http_origin ~ '^https?://(lidong.me)') { | |
add_header 'Access-Control-Allow-Origin' "$http_origin"; | |
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; | |
} | |
} |
This file contains hidden or 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
# BEGIN WordPress | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
# uploaded files | |
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L] | |
# add a trailing slash to /wp-admin | |
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] |
This file contains hidden or 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
registry=https://registry.npm.taobao.org | |
#registry=https://npmreg.mirrors.ustc.edu.cn |
This file contains hidden or 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
# ~/.pip/pip.conf | |
[global] | |
index-url = https://mirrors.ustc.edu.cn/pypi/web/simple | |
# index-url = https://pypi.douban.com/simple | |
# index-url = https://mirrors.aliyun.com/pypi/simple | |
[install] | |
trusted-host=mirrors.aliyun.com |
This file contains hidden or 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
"引号为注释 | |
"设置显示行号 | |
set nu | |
"设置在命令行界面最下面显示当前模式 | |
set showmode | |
"在右下角显示光标所在的行数等信息 | |
set ruler | |
"设置每次单击Enter键后,光标移动到下一行时与上一行的起始字符对齐 | |
set autoindent | |
"设置TAB宽4个空格 |