0%

更改 Form 的 AutoScaleMode 属性值为 Dpi ,并修改 Program.cs 为以下内容。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class Program
{
[STAThread]
static void Main()
{
if (Environment.OSVersion.Version.Major >= 6)
SetProcessDPIAware();

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}

[System.Runtime.InteropServices.DllImport("user32.dll")]
private static extern bool SetProcessDPIAware();
}

标准键盘

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/**
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
* │Esc│ │ F1│ F2│ F3│ F4│ │ F5│ F6│ F7│ F8│ │ F9│F10│F11│F12│ │P/S│S L│P/B│ ┌┐ ┌┐ ┌┐
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ └┘ └┘ └┘
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
* │~ `│! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│_ -│+ =│ BacSp │ │Ins│Hom│PUp│ │N L│ / │ * │ - │
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{ [│} ]│ | \ │ │Del│End│PDn│ │ 7 │ 8 │ 9 │ │
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ + │
* │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│" '│ Enter │ │ 4 │ 5 │ 6 │ │
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ ├───┼───┼───┼───┤
* │ Shift │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│? /│ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │
* ├─────┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ E││
* │ Ctrl│ │Alt │ Space │ Alt│ │ │Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │←─┘│
* └─────┴────┴────┴───────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
*/
阅读全文 »

准备工作

GitHub

注册一个 GitHub 账号,创建一个新的仓库,仓库名称严格命名为todest.github.iotodest为用户名,修改成你自己的。

Git

从此处 Git官网 下载并安装,右键打开Git Bash

阅读全文 »

以当前时间备份文件

sample是待备份文件夹

windows

1
2
@echo off
if "%time:~0,1%" EQU " " (

linux

1
2
time=$(date '+%Y%m%d%H%M%S' )
tar -cvf ./backup/$time.tar ./sample/

使用nginx的反向代理缓存,将frp用户的http和https静态资源缓存到服务器本地,从而减少frp网络资源请求,直接加速静态资源访问。

新建缓存目录

1
2
mkdir -pv /home/nginx/cache
chmod -R 777 /home/nginx/cache

修改 nginx.conf

在 http{} 里添加

1
proxy_cache_path /home/nginx/cache levels=1:2 keys_zone=frp_cache:50m max_size=5g inactive=3d;

在 server{} 里添加
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
location / {
proxy_pass http://127.0.0.1:8080;
proxy_redirect http://$host/ http://$http_host/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
location ~* \.(jpg|jpeg|gif|png|svg|css|scss|js|ico|xml|woff|woff2|ttf|otf|eot)$ {
proxy_pass http://127.0.0.1:8080;
proxy_redirect http://$host/ http://$http_host/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_cache frp_cache;
proxy_cache_key $uri$is_args$args;
proxy_cache_valid 200 206 301 302 304 3d;
expires 3d;
}