Skip to content

Instantly share code, notes, and snippets.

@ebith
ebith / Unpack.ps1
Last active February 7, 2024 23:37
Script for edit equipment in Baldur's Gate 3 (https://ebith.hatenablog.jp/entry/2024/02/05/075512)
$bg3_path = "${env:ProgramFiles(x86)}\Steam\SteamApps\common\Baldurs Gate 3\Data\"
$z = "https://gist.github.com/ebith/b3a61eff5cbb8e5eecdfa2d951e54717/raw/Z.txt"
[void][System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms")
$dialog = New-Object System.Windows.Forms.OpenFileDialog
$dialog.Filter = "Divine.exe|Divine.exe"
$dialog.InitialDirectory = $(Get-Location)
if($dialog.ShowDialog() -ne [System.Windows.Forms.DialogResult]::OK){ exit }
$divine = $dialog.FileName
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ebith
ebith / I2Languages-resources.assets-71137toUBTranslationText.py
Last active March 1, 2023 13:36
Solastaの日本語化ファイルをUnfinished Businessの翻訳システムで読み込めるようにするスクリプト
import os
import re
os.makedirs('UnofficialTranslations-ja', exist_ok=True)
with open('UnofficialTranslations-ja/Translations-ja.txt', encoding='utf-8', mode='w') as w:
number = ''
with open('I2Languages-resources.assets-71137.txt', encoding='utf-8', mode='r') as r:
for line in r:
tmp = re.search(r'(\[\d+\])', line)
if tmp:
@ebith
ebith / 3D Print.py
Created February 10, 2023 13:16
詳細な名前を付けてSTLを出力するFusion 360スクリプト
#Author-ebith
#Description-Output STL with detailed name.
# 謎:
# - availablePrintUtilitiesが空っぽ
# - sendToPrintUtility = Trueとするとfilenameが無視されてGUID固定になる
# Todo:
# - ボディを選べるように
@ebith
ebith / docker-compose.yml
Last active October 8, 2022 00:37
“Traefikの設定を試行錯誤した結果を残しておく - おいら屋ファクトリー” https://ebith.hatenablog.jp/entry/2022/10/08/093118
version: '3'
services:
traefik:
network_mode: host
environment:
- TZ=Asia/Tokyo
restart: always
image: traefik:v2.9
command:
@ebith
ebith / main.cpp
Created January 1, 2021 01:09
M5 ATOM(ESP32)で温度・湿度・気圧(BME280)をInfluxDBに投げるやつ
#define FASTLED_INTERNAL
#include <Arduino.h>
#include <WiFi.h>
#include <FastLED.h>
#include <Adafruit_BME280.h>
#include <InfluxDbClient.h>
const int NUM_LEDS = 1;
const int LED_PIN = 27;
@ebith
ebith / main.cpp
Last active December 31, 2020 13:36
M5 ATOM(ESP32)でWiFiに常時接続してHTTP POSTするやつ
#define FASTLED_INTERNAL
#include <Arduino.h>
#include <WiFi.h>
#include <HttpClient.h>
#include <FastLED.h>
#include <ArduinoJson.h>
const int NUM_LEDS = 1;
const int LED_PIN = 27;
@ebith
ebith / main.cpp
Created November 30, 2020 10:19
ATOM Liteで作るPCの電源スイッチ
#include <Arduino.h>
#include <WiFi.h>
#include <FastLED.h>
#include <WebServer.h>
#include <ESPmDNS.h>
const int NUM_LEDS = 1;
const int LED_PIN = 27;
static CRGB leds[NUM_LEDS];
@ebith
ebith / app.ini
Last active October 22, 2020 18:19
Keypirinha configuration
[main]
scan_desktop = no
scan_env_path = no
@ebith
ebith / main.cpp
Last active March 1, 2022 04:18
M5 ATOM(ESP32)でインターホンが押されたらDiscordに通知を飛ばすやつ
#define FASTLED_INTERNAL
#include <Arduino.h>
#include <WiFi.h>
#include <HttpClient.h>
#include <FastLED.h>
#include <ArduinoJson.h>
const int NUM_LEDS = 1;
const int LED_PIN = 27;