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 node | |
| import { readFileSync, writeFileSync, readdirSync } from 'fs'; | |
| import path from 'path'; | |
| const SRC_DIR = 'src'; | |
| /** | |
| * 再帰的にファイルを検索 | |
| */ |
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 -euo pipefail | |
| API="https://api.github.com/repos/ViaVersion/ViaProxy/releases/latest" | |
| echo "🔍 ViaProxy の最新版を確認中..." >&2 | |
| # 最新リリースの JSON から Java8 を含まない .jar の URL を抜き出す | |
| asset_url="$( | |
| curl -fsSL "$API" | | |
| grep -o '"browser_download_url": *"[^"]*ViaProxy-[^"]*\.jar"' | |
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
| #!/bin/bash | |
| # AppDataのパスを取得 | |
| # 参考: https://gist.githubusercontent.com/andsens/2ebd7b46c9712ac205267136dc677ac1/raw/574f8c96fc3961fa8f953ee9335a9de3388ba256/gpg-agent-relay | |
| winhome=$(cmd.exe /c "<nul set /p=%UserProfile%" 2>/dev/null || true) | |
| slashwinhome=$(wslpath -m $(wslpath -u $winhome)) # C:/Users/ユーザー名 の形式に変換 | |
| # WindowsのGPGを使う設定 | |
| # https://qiita.com/Ouvill/items/4d96c3e1fd955fd95cf8 | |
| wsl2_ssh_pageant_bin="$HOME/.ssh/wsl2-ssh-pageant.exe" |
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 | |
| # retention-sql.sh - バックアップの世代管理(GFS)を行う最小構成スクリプト | |
| # 対象ファイル: /mnt/gdrive/database/sqlbackup-YYYY-MM-DDTHHMMSSZ.sql (UTC想定) | |
| # 使い方: | |
| # ドライラン: script/retention-sql.sh | |
| # 削除実行 : script/retention-sql.sh --apply | |
| # | |
| # 固定の保持ポリシー(変更不可): | |
| # - Hourly : 直近 48 時間 → 各「時」に最新 1 件 | |
| # - Daily : 直近 30 日 → 各「日」に最新 1 件 |
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
| export const config = { | |
| db: { | |
| host: "127.0.0.1", | |
| user: "root", | |
| password: "password", | |
| database: "test", | |
| }, | |
| discord: { | |
| botToken: "XXXXXXXXXXXXXXXXXXXXXXXX.XXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXX", | |
| guildId: "000000000000000000", |
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
| -- Copyright (c) 2025 Kamesuta | |
| -- This software is released under the MIT License. | |
| -- https://opensource.org/licenses/MIT | |
| -- MIDI PLAYER | |
| -- MIDI converter: https://colab.research.google.com/drive/1Ase5m22dPecz4FB-B3lyyWQhVkksm8gy?usp=sharing | |
| -- Get the speaker peripheral. | |
| local speaker = peripheral.find("speaker") | |
| local term = peripheral.find("monitor") or term.current() |
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
| package mods.kamesuta.elevator; | |
| import com.destroystokyo.paper.event.player.PlayerJumpEvent; | |
| import org.bukkit.Location; | |
| import org.bukkit.Material; | |
| import org.bukkit.block.Block; | |
| import org.bukkit.block.BlockFace; | |
| import org.bukkit.entity.Player; | |
| import org.bukkit.event.EventHandler; | |
| import org.bukkit.event.Listener; |
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
| package com.kamesuta.easydisplayeditor.util; | |
| import com.comphenix.protocol.utility.MinecraftReflection; | |
| import org.bukkit.World; | |
| import org.bukkit.block.data.BlockData; | |
| import org.bukkit.entity.Entity; | |
| import org.bukkit.util.BoundingBox; | |
| import org.bukkit.util.RayTraceResult; | |
| import org.joml.Vector3f; |
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
| @setlocal enableextensions enabledelayedexpansion & set "SELF=%~f0" & PowerShell.exe -Command "& (Invoke-Expression -Command ('{#' + ((Get-Content -Encoding UTF8 '!SELF:'=''!') -join \"`n\") + '}'))" %* & exit /b !errorlevel! | |
| <# | |
| 対話形式で特定のバージョンのJavaを「java8」のようなコマンドで呼び出せるようにするツールです。 | |
| 使い方 | |
| 1. フォルダを作成する | |
| ちゃんとした場所に配置することをおすすめします (例: C:\software\java_cmds\ など) | |
| 注意: このフォルダを削除、または移動するとコマンドが使えなくなります | |
| 2. このbatファイルを1で作成したフォルダに配置する |
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
| import com.mysql.cj.jdbc.MysqlConnectionPoolDataSource; | |
| import com.mysql.cj.jdbc.MysqlDataSource; | |
| import java.sql.Connection; | |
| import java.sql.PreparedStatement; | |
| import java.sql.ResultSet; | |
| import java.sql.SQLException; | |
| import java.text.SimpleDateFormat; | |
| import java.util.Date; |
NewerOlder