0%

ssh no password

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);
}
})();