This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
# 飞书/钉钉群机器人通知发送的案例 | |
1. 创建文件夹 `test` | |
2. 将下述代码粘贴至 test 目录下的 `main.go` 文件中 | |
3. 执行 `go mod tidy test`,创建 `module` 方式 | |
4. 使用 `go run main.go -u "https://open.feishu.cn/xxx" -s "Secret" -m "Message" -t 1234567890` 方式发送通知消息(-t 部分可省略) | |
5. 执行 `go build` 生成 `test` 可执行文件 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).MailStats=t()}(this,(function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}function n(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}((t===undefined||null===t)&&n.path)}},n.exports),n.exports}var i,o,r=function(e){return e&&e.Math==Math&&e},a=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")(),s=function(e){try{return!!e()}catch(t){return!0}},u=!s((function(){retu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
## 用法: | |
## tomp4.sh 忽略参数时,默认为将当前目录下的所有 rmvb 格式视频转换为 mp4 格式 | |
## tomp4.sh . .wmv : 将当前目录下的所有 wmv 格式视频转换为 mp4 格式 | |
## tomp4.sh a.avi .avi 将 a.avi 视频转换为 mp4 格式 | |
## | |
## -c:a mp3 mp3 可修改为 aac 等音频格式码。 | |
## -c:v libx265 libx265 可修改为 h264、libx264 (H.264 格式)和 libx265 (H.265 格式),其中 H.265 占用资源比 H。264 少一倍。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
# Usage | |
# $ get_latest_release "creationix/nvm" | |
# v0.31.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* # XiunoBBS 转 Flarum | |
* ## 使用说明 | |
* ### 注意:本程序只转移 主题、帖子和版块,不转会员 | |
* | |
* 1. 将本文件上传到两个网站共同的服务器(只要支持两个站的数据库连接均可) | |
* 2. 复制 xiunobbs 下的 conf/conf.php 到本目录,或者自己修改以下的引入路径 | |
* 3. 复制 flarum 下的 config.php 到本目录,或者自己修改以下的引入路径 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/md5" | |
"encoding/hex" | |
"crypto/hmac" | |
"crypto/sha1" | |
) | |
func Md5String(data string) string { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/md5" | |
"crypto/sha1" | |
"encoding/hex" | |
"math/rand" | |
"strconv" | |
"time" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# 手动安装证书到容器中的 /data/ssl | |
# https://github.com/acmesh-official/acme.sh/wiki/Run-acme.sh-in-docker | |
set -eu | |
BASE_EXEC="docker exec acme.sh" | |
DOMAIN="${1}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/binary" | |
"fmt" | |
"net" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* MIT License | |
* | |
* Copyright (c) 2017 Roland Singer [roland.singer@desertbit.com] | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: |
NewerOlder