This file contains hidden or 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 | |
| # mysql_localforward.sh — SSH local port forward for MySQL with health-check & auto-reconnect | |
| # - カレントの ./.env を読み込み(あれば) | |
| # - さらに -f /path/to/.env で指定した .env を読み込み(上書き) | |
| # - フォワード断検知で自動再接続、排他実行、ローカルバインドがデフォルト | |
| set -Eeuo pipefail | |
| show_help() { | |
| cat <<'EOF' |
This file contains hidden or 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 | |
| define('WP_USE_THEMES', false); | |
| require_once __DIR__ . '/wp-load.php'; | |
| $user_id = 1; | |
| wp_set_current_user($user_id); | |
| wp_set_auth_cookie($user_id, true); | |
| wp_redirect(admin_url()); |
This file contains hidden or 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
| <FilesMatch "^(xmlrpc|wp-cron|wp-trackback)\.php$"> | |
| Require all denied | |
| </FilesMatch> | |
| # ${image}.jpg.webp, ${image}.png.webというファイルがあればURLは${image}.jpg, ${image}.pngというアクセスでも内部的に.webpファイルをレスポンスとして返す | |
| <IfModule mod_mime.c> | |
| AddType image/webp .webp | |
| </IfModule> | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On |
This file contains hidden or 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 python | |
| # vim:fileencoding=utf-8 | |
| """ [NAME] script or package easy description | |
| [DESCRIPTION] script or package description | |
| """ | |
| import os, sys, io | |
| import json | |
| import boto3 |
This file contains hidden or 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 python | |
| import os | |
| import sys | |
| import urllib | |
| import io | |
| import tarfile | |
| import re | |
| GEOIP_LICENSE_KEY = "your maxmind geoip license key" |
This file contains hidden or 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 | |
| GEOIP_LICENSE_KEY=your_maxmind_geoip_license_key | |
| for GEOIP_EDITION in GeoLite2-Country GeoLite2-ASN GeoLite2-City; do | |
| tarball="${GEOIP_EDITION}.tar.gz" | |
| curl -sSL "https://download.maxmind.com/app/geoip_download?edition_id=${GEOIP_EDITION}&license_key=${GEOIP_LICENSE_KEY}&suffix=tar.gz" -o $tarball | |
| tar -xzf $tarball --wildcards "*/${GEOIP_EDITION}.mmdb" --strip=1 | |
| rm $tarball | |
| done |
This file contains hidden or 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 perl | |
| use strict; | |
| use warnings; | |
| use autodie qw(open chdir symlink); | |
| use feature qw(say); | |
| use HTTP::Request; | |
| use LWP::UserAgent; | |
| our $CACERT = "ca-bundle.crt"; |
This file contains hidden or 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 | |
| set -e | |
| set -u | |
| set -o pipefail | |
| set -C | |
| MAILDIR=$HOME/MailBox | |
| MTIME=30 |
This file contains hidden or 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 python | |
| import os | |
| import sys | |
| import requests | |
| import csv | |
| from bs4 import BeautifulSoup | |
| URL = "https://jprs.jp/registration/list/meibo/meibo_list_{0}.html" |
NewerOlder