国庆感冒进修

  1. 工具如下:
    捕获.JPG
  2. 必须往usb插入一个东西,防止卡在菜单界面。
  3. 几个应用: qq文件助手、docker:shadowsocks-privoxy。
  4. 用了gsuit和onedrive才知道百度云是多么的烂。

frp客户端的配置以及Padavan 设置

  1. frp客户端配置:
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

#客户端配置:
cat > "/tmp/frp/myfrpc.ini" <<-\EOF
[common]
server_addr = freenat.club
#frps服务端地址
server_port = 7000
token = frp888
log_file = frpc.log
log_level = info
log_max_days = 3
login_fail_exit = false
protocol = kcp

[http_dsmdeffyc]
type = http
local_ip = 192.168.3.3
local_port = 5000
use_compression = true
use_encryption = true
custom_domains = xx1.xx.xx

[http_routedeffyc]
type = http
local_ip = 192.168.123.1
local_port = 81
use_compression = true
use_encryption = true
custom_domains = xx2.xx.xx

EOF

7ghost从iis迁移至nginx配置:

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
server {
listen 81; # 访问端口1
server_name localhost;
root /opt/www/default/;
index index.html index.htm index.php default.php tz.php;
error_page 500 502 503 504 /50x.html;
charset gbk;//编码
location = /50x.html {
root html;
}

location ~* ^.+\.php(\/.*)*$ {
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/tmp/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

location ~* \.html$ {
rewrite ^(.*)$ /index.php last;
}

location ~* \.*$ {
set $tmp "/tmp";
try_files $tmp$uri $uri /index.php;
}

location / {
#root /tmp
#autoindex on;
#autoindex_localtime on;
#autoindex_exact_size off;
rewrite ^(.*)$ /index.php last;
}

}

php发送udp远程唤醒

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
<?php
function wakeOnLan($ip, $mac, $port) {
$addr_byte = explode(':', $mac);
$hw_addr = '';
for ($i = 0; $i < 6; $i++) $hw_addr.= chr(hexdec($addr_byte[$i]));
$msg = chr(255) . chr(255) . chr(255) . chr(255) . chr(255) . chr(255);
for ($i = 1; $i <= 16; $i++) $msg.= $hw_addr;
$socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
if ($socket == false) {
echo "create socket failed!\n";
echo "error:'" . socket_last_error($socket) . "' - " . socket_strerror(socket_last_error($socket));
return FALSE;
} else {
$opt_ret = socket_set_option($socket, SOL_SOCKET, SO_BROADCAST, TRUE);
if ($opt_ret < 0) {
echo "setsockopt() failed, error: " . strerror($opt_ret) . "\n";
return FALSE;
}
if (socket_sendto($socket, $msg, strlen($msg) , 0, $ip, $port)) {
echo "唤醒数据包发送成功!";
socket_close($socket);
return TRUE;
} else {
echo "唤醒数据包发送失败!";
return FALSE;
}
}
}
function actionTestWakeOnLan() {
$mac = '00:11:32:0E:36:74';
$ip = '192.168.3.3';
wakeOnLan($ip, $mac, 2304);
};
actionTestWakeOnLan();
?>

静态路由设置

共3级路由,除了光猫无法登陆,2级、3级路由设置如下:

  1. 磊科
类型 目标地址 掩码 网关 接口
NET 192.168.123.0 255.255.255.0 192.168.3.2 LAN
  1. Padavan
网络/主机 IP 网络掩码 网关 接口
192.168.3.0 255.255.255.0 192.168.3.1 WAN

修改prose使之支持hexo

图片路径完美解决,gatekeeper地址在gh-pages处更新,编译master时才获取配置文件。

感受东西

  1. 英语学习停了4天
  2. 感冒快好了
  3. 休息比较少
  4. 陪伴家人较少