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
| 概要 | |
| bad-asn-list にある AS の IP アドレスの範囲を、nftables のリストとして読み込める形式に出力するスクリプト。 | |
| https://github.com/bountyyfi/bad-asn-list | |
| AI に書かせたが、動作には問題はなさそうだった。 | |
| ただし、bgpq4 の処理の繰り返しで1時間近くかかり、それを何回も行うのは面倒であるため、出力されたリストを貼っておく。 | |
| また、軽量化 python スクリプトを使用しないと、nftables に、"Error: conflicting intervals specified" として怒られることに注意が必要である。 | |
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 | |
| header('Content-Type: application/json; charset=UTF-8'); | |
| // 元のJSONファイルのパス | |
| $originalJsonUrl = 'https://www.jma.go.jp/bosai/forecast/data/forecast/130000.json'; | |
| // 元のJSONデータを読み込む | |
| $originalJson = file_get_contents($originalJsonUrl); | |
| $data = json_decode($originalJson, true); |
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
| using UnityEngine; | |
| using UnityEditor; | |
| using TMPro; | |
| namespace Praecipua.EE | |
| { | |
| [InitializeOnLoad] | |
| public static class TMP_NameUpdater | |
| { | |
| private static GameObject lastSelectedObject = null; |
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
| <!DOCTYPE html> | |
| <html lang="ja"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>サンライズ検索</title> | |
| <style> | |
| body { | |
| font-family: Arial, sans-serif; | |
| background-color: #f4f4f4; |
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
| # 日付時刻と、id(int) の主キーがある場合のファイル | |
| import re | |
| import argparse | |
| import os | |
| def process_files(file1, file2): | |
| # 拡張子を取得 | |
| base1, ext1 = os.path.splitext(file1) | |
| base2, ext2 = os.path.splitext(file2) |
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
| # 証明書のドメイン名 | |
| $domain = "example.com" | |
| # PFX のパスワード | |
| $pfxPassword = "P@sSw0rD" | |
| # WSLでスクリプトを実行し、PFXファイルのパスを取得 | |
| $runWSL = & wsl bash -c "~/rdp-wsl-certbot.sh" | |
| $line = $runWSL -split "`n" | Where-Object { $_ -match "PFX_WINDOWS_PATH:" } | |
| $pfxWindowsPath = $line -replace "PFX_WINDOWS_PATH:\s*", "" |
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
| using System.Diagnostics; | |
| using UnityEditor; | |
| using UnityEngine; | |
| using UnityEngine.Diagnostics; | |
| namespace Praecipua.EE | |
| { | |
| public class UnityCrasher : EditorWindow | |
| { | |
| [MenuItem("Window/Praecipua/[Danger] Crash Unity")] |
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 os | |
| import argparse | |
| import shutil | |
| import tarfile | |
| def extract_tar_to_folder(unitypackage_file, copy_meta, force_overwrite): | |
| # Unitypackage ファイルの名前から拡張子を取り除いたフォルダを作成 | |
| folder_name = os.path.splitext(unitypackage_file)[0] | |
| # 上述のフォルダがすでに存在するかチェック |