hexo更换电脑

hexo更换电脑

拷贝文件到新目录

/public
/scaffolds
/source
/themes
/_admin-config.yml
/_config.yml
/package.json

阅读全文

Ubuntu 安装 nodejs

Ubuntu 安装 nodejs

1
2
3
4
5
6
7
8
9
10
#下载
wget https://nodejs.org/dist/v8.12.0/node-v8.12.0-linux-x64.tar.xz
#解压
tar xf node-v8.12.0-linux-x64.tar.xz -C /usr/local/
#环境变量配置增加
sudo vi /etc/profile

export NODE_HOME=/usr/local/node-v8.12.0-linux-x64
export PATH=$PATH:$NODE_HOME/bin
export NODE_PATH=$NODE_HOME/lib/node_modules

阅读全文

深度学习---之pooling层的作用与缺陷(转载)

作者:谢志宁

链接:https://www.zhihu.com/question/36686900/answer/130890492
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

阅读全文

google voice 申请脚本

选择好号码后在带有continue按钮的界面(下图),以chrome浏览器为例,选中你需要的号码,按f12键弹出浏览器开发者工具,点击console,在开发者工具console界面,粘贴下面的脚本,回车,你会看到按钮自动点击,接下来等待就可以了。。。
本脚本从别人博客转载的,注意事项什么的,大家自行百度搜索吧。

JS脚本:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
var sleep = delay => new Promise(resolve => setTimeout(resolve, delay));

var composeClick = function x(btn) {
var rect = btn.getBoundingClientRect();
var x = rect.left + rect.width * Math.random();
var y = rect.top + rect.height * Math.random();
const mousedown = new MouseEvent("mousedown", {
screenX: x + window.screen.availLeft,
screenY: y + window.screen.availTop,
clientX: x,
clientY: y,
});
const click = new MouseEvent("click", {
screenX: x + window.screen.availLeft,
screenY: y + window.screen.availTop,
clientX: x,
clientY: y,
});
const mouseup = new MouseEvent("mouseup", {
screenX: x + window.screen.availLeft,
screenY: y + window.screen.availTop,
clientX: x,
clientY: y,
});
btn.dispatchEvent(mousedown);
return sleep(150 + Math.random() * 30)
.then(() => {
btn.dispatchEvent(click);
return sleep(30 + Math.random() * 30);
}).then(() => {
btn.dispatchEvent(mouseup);
});
}

function task() {
var btn = document.querySelector(".continueButton");
if (!btn) {
alert("Finish");
return;
}
composeClick(btn)
.then(() => {
// 在此调整点击时间间隔
return sleep(50 + Math.random() * 600);
})
.then(() => {
task();
});
}
task();

阅读全文

Xkcptun 改版的 kcptun

github 项目地址

https://github.com/liudf0716/xkcptun

阅读全文

Spring多事务绑定

1、maven 使用 spring-data-commons
1
2
3
4
5
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<version>1.13.6.RELEASE</version>
</dependency>

阅读全文

Nginx安装反向代理配置

1、安装Nginx

1
2
3
apt-get update
apt-get install nginx
/etc/init.d/nginx start

阅读全文

Springboot注册linux服务

1、设置jar|war权限
1
2
3
4
5
# 确保jar文件有执行权限
chmod 500 demo.jar
# 创建jar文件到/etc/init.d/的软连接
ln -s /home/demo.jar /etc/init.d/demo.conf配置文件

阅读全文

开启Docker远程访问

编辑文件 vi /etc/default/docker
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Here in Debian, this file is sourced by:
# - /etc/init.d/docker (sysvinit)
# - /etc/init/docker (upstart)
# - systemd's docker.service

# Use of this file for configuring your Docker daemon is discouraged.

# The recommended alternative is "/etc/docker/daemon.json", as described in:
# https://docs.docker.com/v1.11/engine/reference/commandline/daemon/#daemon-configuration-file

# If that does not suit your needs, try a systemd drop-in file, as described in:
# https://docs.docker.com/v1.11/engine/admin/systemd/#custom-docker-daemon-options
# 增加

DOCKER_OPTS="-H=unix:///var/run/docker.sock -H=0.0.0.0:2375"

阅读全文

Docker 容器镜像删除

1.停止所有的container,这样才能够删除其中的images:
1
docker stop $(docker ps -a -q)

阅读全文