使用 Traefik 配置 Docker hub 反向代理服务。
2025-04 测试有效。
前提:需要将域名 (*.example.com) 解析到本机服务器,同时需要在 traefik 里配置好 TLS。
使用 Traefik 配置 Docker hub 反向代理服务。
2025-04 测试有效。
前提:需要将域名 (*.example.com) 解析到本机服务器,同时需要在 traefik 里配置好 TLS。
// 全屏播放时,按↓(箭头下)彻底隐藏视频信息栏,以方便截图。再次按↑恢复。 | |
// 按←,→ 后退/前进5秒。按空格播放/暂停。 | |
window.addEventListener("keydown", e => { | |
if (document.activeElement && document.activeElement.tagName == "INPUT") { | |
return; | |
} | |
let v = document.querySelector("video"); | |
let a = document.querySelector(".video-js .vjs-dock-text"), | |
b = document.querySelector(".video-js .vjs-control-bar"); |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
package fuck.you.java; | |
import java.util.*; | |
public class Strtr { | |
/* | |
from php strtr | |
*/ | |
static public String strtr(String str, Map<String, String> replace_arr) { | |
int maxlen = 0; int minlen = 1024*128; |
#!/bin/bash | |
if [[ $# < 1 ]] | |
then | |
printf "Usage: transcode_append_utf8_bom <FILE>\n" | |
exit 1 | |
fi | |
UTF8_BOM=$(echo "0xef0xbb0xbf" | xxd -r) | |
FILEHEAD=$(head --bytes=3 $1) |
#!/bin/bash | |
if [[ $# < 1 ]] | |
then | |
printf "Usage: transcode_gbk <FILE>\n" | |
exit 1 | |
fi | |
FILE="$1" |
// npm -g install iconv | |
var Iconv = require('iconv').Iconv; | |
var fs=require("fs"); | |
// convert string from GBK to UTF-8 | |
var iconv = new Iconv('GBK', 'UTF-8'); | |
var filename = "file"; | |
var content_buffer = fs.readFileSync(filename); | |
var content_buffer_utf8 = iconv.convert(content_buffer); |
#!/bin/sh | |
if [ $# -lt 2 ] | |
then | |
echo "Usage: change_openvpn_port <CONF_FILE> <PORT>" | |
exit 1 | |
fi | |
sed -ire "s/^port[ \t]*[0-9]*/port $2/i" $1 | |
sed -ire "s/^remote[ \t]*\([a-zA-Z0-9\.]*\)[ \t]*[0-9]*/remote \1 $2 /i" $1 |