hello pages
...
mongodump --host 127.0.0.1 --port 37017 --username username --db db --collection collection --out /data/collection_2017_06_08
mongorestore --host 127.0.0.1 --port 37017 /data/collection_2017_06_08
$.ajax({
type: "post",
async: false,
url: '/api/v1/demo.json',
data: {a:1,b:1,c:1},
dataType: "json",
success: function (rsp) {
alert('success');
}
});
# 整站下载
wget -p -np -k http://www.jd.com
# 从文件获取下载url
wget -p -np -k -i input_url.txt
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
location / {
proxy_pass http://127.0.0.1:8080;
index index.html index.htm;
}
location /v1 {
#deny all;
#allow 127.0.0.1;
proxy_pass http://127.0.0.1:9090;
index index.php index.html index.htm;
}
}
import com.alibaba.fastjson.TypeReference;
List list = JSON.parseObject("...", new TypeReference>() {});
git config --global user.name "username"
git config --global user.email "email@email.com"
mkdir pc-battery2
cd pc-battery2
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin https://github/xxx.git
git branch --set-upstream-to=origin/master
git pull --allow-unrelated-histories
git push
GRANT ALL PRIVILEGES ON *.* TO root@"%" identified by "123456";
alter user 'root'@'localhost' identified by '123456';
#本地转发 remote 9090 to local 9090
ssh -L 9090:remote-secret.com:8080 my-remote-host.com
#远程转发 local 9090 to remote 8080
ssh -R 9090:local-secret.com:8080 my-remote-host.com
#允许外部访问
sshd_config GatewayPorts:true
#动态转发
ssh -D 9090 my-remote-host.com
if( Pattern.matches(".*@.*", text) ){
return "match!";
}
-Dsun.jnu.encoding=utf-8 -Dfile.encoding=utf-8
character-set-server=utf8mb4s