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
# For WebSocket | |
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
proxy_cache_path /tmp/mi_cache levels=1:2 keys_zone=cache1:16m max_size=1g inactive=720m use_temp_path=off; | |
server { | |
listen 80; |
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 | |
# 第一引数がパスで第二引数以降は単純に引き渡せればいい場合は$1の代わりに$@も可 | |
PATHTO = $1 | |
if [[ "$PATHTO" = "/"* ]] || [[ "$PATHTO" = "~"* ]];then | |
PATHPREFIX="" | |
else | |
PATHPREFIX="$(pwd)/" | |
fi | |
echo "$PATHPREFIX$PATHTO" |
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 | |
#### | |
# Notice: This script must be in /usr/local/bin because the default "podman" is in /usr/bin and the shell prefers commands from /usr/local/bin over /usr/bin. | |
# | |
# How to install this script on your computer. | |
# 1. Open your terminal | |
# 2. Copy | |
# " | |
# sudo curl -Ls https://ip1.info/gist_dl/get_podman_sh.php -o /usr/local/bin/podman && sudo chmod +x /usr/local/bin/podman | |
# " |
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
# ddclinet 3.10以降向け | |
# 1. zone nameはCloudflare上の登録ドメイン | |
# www.example.com なら examle.com | |
# 2. emailはCloudflare登録メールアドレス | |
# 3. apikeyはCloudflare -> My profile -> API Tokensから発行 | |
# 4. crontabで自動化する場合 | |
# * * * * * ddclient --file <config file path> | |
# Aレコード用にIPアドレスを返すサイトをwebに指定する | |
# https://api.ipify.org/ など |
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 | |
if [ -z $(which convert) ];then | |
echo "Missing ImageMagick. Aborted." | |
exit 1 | |
fi | |
TARGET_IMAGE=${1} | |
if [ -z "${TARGET_IMAGE}" ] || [ ! -f "${TARGET_IMAGE}" ];then | |
echo "Missing image. Aborted." | |
exit 2 | |
fi |
OlderNewer