0%

local

1
ssh-keygen -t rsa

SSH密钥会保存在home目录下的.ssh/id_rsa文件中.SSH公钥保存在.ssh/id_rsa.pub文件中

upload key 2 server

ssh-copy-id username@remote-server

反过来

server {
listen 80;
server_name blog.guoshuang.com;
charset utf-8;
location / {
root /usr/share/nginx/html/blog;
index index.html index.htm;
}
}

Check the fingerprint for the ECDSA key sent by the remote host

添加了重复的 主机

1
2
3
ssh-keygen -R <remote-system-ip-address>


用CSS给SVG 的内容添加样式

https://www.w3cplus.com/svg/styling-svg-use-content-css.html

js add style

1
2
3
4
5
6
7
8
9
10
11
12
13
var css = 'h1 { background: red; }',
head = document.head || document.getElementsByTagName('head')[0],
style = document.createElement('style');

head.appendChild(style);

style.type = 'text/css';
if (style.styleSheet){
// This is required for IE8 and below.
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}

Create and append style sheets to document using JavaScript

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(function() {
var css = [
'/css/default.css',
'/css/section.css',
'/css/custom.css'
],
i = 0,
link = document.createElement('link'),
head = document.getElementsByTagName('head')[0],
tmp;
link.rel = 'stylesheet';

for(; i < css.length; i++){
tmp = link.cloneNode(true);
tmp.href = css[i];
head.appendChild(tmp);
}
})();

78.141.222.176

ssh root@78.141.222.176


curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

python get-pip.py

pip install shadowsocks

vi /etc/shadowsocks.json

{
“server”:”0.0.0.0”,
“server_port”:443,
“local_port”:1080,
“password”:”1234567890”,
“timeout”:600,
“method”:”aes-256-cfb”
}

vi /etc/systemd/system/shadowsocks.service

[Unit]
Description=Shadowsocks
[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/ssserver -c /etc/shadowsocks.json
[Install]
WantedBy=multi-user.target

设置开机自启命令

systemctl enable shadowsocks

启动命令

systemctl start shadowsocks

#查看状态命令
systemctl status shadowsocks

firewalld(centos7)

systemctl stop firewalld

https://www.4spaces.org/centos-open-porter/

find server ip

1
ip addr

default directory

1
/usr/share/nginx/html

global configuration

1
/etc/nginx/nginx.conf

ss install

默认有防火墙,需要关闭

virtual host

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
server {
listen 80;
listen [::]:80;

root /guoshuang/demo;

index index.html;

server_name demo.guoshuang.com;

access_log /var/log/nginx/demo.guoshuang.com.access.log;
error_log /var/log/nginx/demo.guoshuang.com.error.log;

location / {
try_files $uri $uri/ =404;
}
}

css

flex 排版

bootstrap

svg

1
2
3
4
<svg viewbox="0 0 10 50">
<path d="M1 49 V5 Q1 1 5 1 H9 V49z"
fill="rgba(255, 122, 0, 0.8)" />
</svg>

d3

-d3 tooltips

测试

Integrity

1
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css" integrity="sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ" crossorigin="anonymous">

生成 (1.js)Integrity

1
openssl dgst -sha384 -binary 1.js | openssl base64 -A

“摸”一下,就好

1
touch abc

或者 指定日期 2018 0712 12:00

1
touch -mt 201807121200  abc/

1
this.map.getView().fit(c.extent, this.map.getSize());


var bb = bm.map.getView().calculateExtent(bm.map.getSize());
console.log(bb);
bm.map.getView().fit(bb, bm.map.getSize());

1
ol.extent.getIntersection(extent1, extent2,opt_extent)
1
bm.map.getView().fit([109.88221343277776, 33.515607112547585, 111.90703702710506, 34.256566724741006], bm.map.getSize());