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 |
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
#!/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
#!/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
# 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 | |
# SCRIPT_DIR is the directory for scripts without considering symbolic links | |
SCRIPT_DIR=$(cd $(dirname $0); pwd) | |
# SCRIPT_DIR is the real directory for scripts with considering symbolic links | |
REAL_SCRIPT_DIR=$(cd $(dirname $(realpath $0)); pwd) |
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 | |
curl -fsSL https://get.docker.com -o get-docker.sh | |
sudo sh get-docker.sh | |
# 不要 | |
# DOCKER_COMPOSE_LATEST_URL=https://api.github.com/repos/docker/compose/releases/latest | |
# DL_URL=$(curl $DOCKER_COMPOSE_LATEST_URL -fsSL | \ | |
# jq -Mr '.assets[].browser_download_url' | \ | |
# grep -e docker-compose-linux-x86_64\$) | |
# sudo curl $DL_URL -fsSL -o /usr/local/lib/docker/cli-plugins/docker-compose | |
# sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose |
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 FindProxyForURL(url, host) { | |
if(dnsDomainIs(host, "jump1.nttcloud.net")||dnsDomainIs(host, "jump2.nttcloud.net")){ | |
return "DIRECT"; | |
} if(dnsDomainIs(host, "bastion01.nw6.jp")){ | |
return "DIRECT"; | |
} | |
if(dnsDomainIs(host, "nttcloud.net")){ | |
return "SOCKS localhost:10081; DIRECT"; |
NewerOlder