Skip to content

Instantly share code, notes, and snippets.

View jfut's full-sized avatar

Jun Futagawa jfut

View GitHub Profile
@jfut
jfut / wget-mirror-adjust
Last active August 7, 2023 07:31
wget-mirror-adjust
#!/bin/bash
#
# Mirror the page without extensions as it is.
#
# Copyright (c) 2023 Jun Futagawa (jfut)
#
# This software is released under the MIT License.
# http://opensource.org/licenses/mit-license.php
set -uo pipefail
@jfut
jfut / aws-secret-cli
Last active March 26, 2023 09:14
aws-secret-cli
#!/bin/bash
#
# AWS Secrets Manager CLI for role based release files
#
# Copyright (c) 2023 Jun Futagawa (jfut)
#
# This software is released under the MIT License.
# http://opensource.org/licenses/mit-license.php
# - ENV/release/secret.conf
@jfut
jfut / aws-login
Created December 29, 2022 01:30
aws-login
#!/bin/bash
#
# AWS login to the management console or instance with Session Manager or SSH
#
# Require: aws-vault
#
# Copyright (c) 2022 Jun Futagawa (jfut)
#
# This software is released under the MIT License.
# http://opensource.org/licenses/mit-license.php
@jfut
jfut / monit-slack-notify
Created May 14, 2022 01:29
monit-slack-notify
#!/bin/bash
#
# Monit alert to Slack Webhook
#
# Configuration:
#
# - touch /etc/monit-slack-notify.conf
# - chmod 600 /etc/monit-slack-notify.conf
# - vi /etc/monit-slack-notify.conf
#
@jfut
jfut / aws-security-group-dump
Created April 19, 2022 12:55
aws-security-group-dump
#!/bin/bash
#
# AWS Security Group dump
#
# Supported name resolution targets:
#
# - EC2
# - RDS
# - RDS Procy
# - ElastiCache
@jfut
jfut / robocopy-backup-full.bat
Created October 6, 2021 04:45
Robocopy Backup
@echo off
::
:: フルバックアップ
::
:: 1. robocopy バックアップ
:: 2. バックアップ元のすべてのファイルのアーカイブ属性を Off に設定
:: 3. バックアップ先ディレクトリの隠し属性削除
:: 注意: 1. 実行後、2. の実行までに更新されたファイルは、
:: バックアップから漏れますが許容することにします。
::
@jfut
jfut / scoop-list-for-migration
Last active June 16, 2021 06:43
scoop-list-for-migration
#!/bin/bash
#
# scoop list for migration
APP_FAILED=""
APP_UNKOWN=""
APP_GLOBAL=""
APP_USER=""
IFS='
@jfut
jfut / moodle-v3.1.17-dbtransfer-retry.patch
Last active March 16, 2021 08:17
moodle-v3.1.17-dbtransfer-retry.patch
diff --git a/admin/tool/dbtransfer/cli/migrate.php b/admin/tool/dbtransfer/cli/migrate.php
index 0d32e2ae..dea01740 100644
--- a/admin/tool/dbtransfer/cli/migrate.php
+++ b/admin/tool/dbtransfer/cli/migrate.php
@@ -49,6 +49,10 @@ Options:
--dbport=NUMBER Database port.
--prefix=STRING Table prefix for above database tables.
--dbsocket=PATH Use database sockets. Available for some databases only.
+--dbcollation=COLLATION Use database collation for mysql/mariadb
+-r, --retry=BOOLEAN Retry to copy tables. If the number of records is the
@jfut
jfut / settings.json
Last active October 5, 2021 23:14
Windows Terminal settings.json
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"copyFormatting": "none",
"copyOnSelect": true,
"defaultProfile": "{5d7ce2e3-c26e-47a1-b9e6-fe449aaf75d0}",
"initialCols": 150,
"initialRows": 40,
// Add custom keybindings to this array.
// To unbind a key combination from your defaults.json, set the command to "unbound".
// To learn more about keybindings, visit https://aka.ms/terminal-keybindings
@jfut
jfut / manifest.json
Created September 3, 2019 06:23
manifest.json for nextcloud-filelink Thunderbird 68.0 extension
{
"manifest_version": 2,
"name": "Nextcloud for Filelink",
"description": "Nextcloud provider for Thunderbird Filelink",
"version": "1.8",
"author": "Olivier Paroz",
"homepage_url": "https://github.com/nextcloud/nextcloud-filelink",
"legacy": {
"type": "xul",
"options" : {