上一页 1 ··· 3 4 5 6 7 8 9 下一页
摘要: func Download(c *gin.Context) { c.Writer.WriteHeader(http.StatusOK) //设置文件类型 c.Header("Content-Type", "application/vnd.ms-excel;charset=utf8") // Path 阅读全文
posted @ 2023-12-04 18:24 熊先生不开玩笑 阅读(622) 评论(0) 推荐(0)
摘要: vim /etc/ssh/sshd_config RSAAuthentication yes #开启RSA验证 PubkeyAuthentication yes #使用公钥验证 AuthorizedKeysFile .ssh/authorized_keys #公钥保存位置 所以需要把公钥写到 对应用 阅读全文
posted @ 2023-11-23 19:58 熊先生不开玩笑 阅读(64) 评论(0) 推荐(0)
摘要: 在域名提供商处设置域名的DNS解析服务器为Cloudflare的DNS域名服务器。 在DNS 的Records中先为域名设置一条A记录解析,IPV4 地址可以随意填写。因为后续要做定向。 在Rules 的Page Rules中添加一条,URL为“www.yourhost.top/*”,Pick a 阅读全文
posted @ 2023-04-08 21:29 熊先生不开玩笑 阅读(631) 评论(0) 推荐(0)
摘要: 用nginx做代理用来做多媒体文件的下载,因为有些文件名后缀类型没有匹配。所以返回个请求端的响应头会是: Content-Type: application/octet-stream,给请求端造成困扰。例如:acc 文件需要是: Content-Type: audio/aac,wav 文件需要是:C 阅读全文
posted @ 2023-04-04 11:31 熊先生不开玩笑 阅读(2659) 评论(0) 推荐(0)
摘要: 注意 v1d2 最优先匹配 server { listen 80; server_name localhost; location /v1d2 { proxy_pass http://127.0.0.1:8088; } location / { root /data/dist; try_files 阅读全文
posted @ 2023-04-02 22:31 熊先生不开玩笑 阅读(665) 评论(0) 推荐(0)
摘要: apt update apt install supervisor vim /etc/supervisor/supervisord.conf 添加如下配置: command 配置成可执行文件的路径,directory为文件所在目录 [program:tempupService] command= / 阅读全文
posted @ 2023-04-02 22:24 熊先生不开玩笑 阅读(185) 评论(0) 推荐(0)
摘要: func main() { // 修改文件所属组 os.Chown( filename, uid, gid) } // 检查目录是否存在 func checkDirExist(path string) (bool, error) { s, err := os.Stat(path) if err != 阅读全文
posted @ 2023-03-30 23:56 熊先生不开玩笑 阅读(54) 评论(0) 推荐(0)
摘要: package main import ( "bufio" "encoding/csv" "flag" "fmt" "os" "regexp" "sort" "strings" "sync" "time" ) type BatteryPercent struct { Timestamp int64 阅读全文
posted @ 2023-03-19 15:29 熊先生不开玩笑 阅读(32) 评论(0) 推荐(0)
摘要: | 操作 | 键位 | |: |: | | 删除/剪切一行 | dd | | 删除/剪切当前开始的n行 | ndd | | 删除/剪切光标之后的一个字/单词部分 | dw | | 删除/剪切光标之后的n个字/单词部分 | ndw | | 删除/剪切当前字符 | x | | 删除/剪切光标到行尾 | 阅读全文
posted @ 2023-02-28 11:52 熊先生不开玩笑 阅读(48) 评论(0) 推荐(0)
摘要: 将str1批量替换成str2 , 特殊符号前用转译符 \ :%s/str1/str2/g 阅读全文
posted @ 2022-09-14 16:00 熊先生不开玩笑 阅读(14) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 下一页