Skip to content

Instantly share code, notes, and snippets.

View todashuta's full-sized avatar
👋
(  ̄ ♢  ̄ )

todashuta todashuta

👋
(  ̄ ♢  ̄ )
View GitHub Profile
@todashuta
todashuta / SKILL.md
Created November 8, 2026 08:25
skills/popquiz
name popquiz
description プロジェクト理解度を調べるクイズを提示する

プロジェクトへの理解度を調べるために、ユーザーに対しこのプロジェクトの仕様と技術面に関するクイズを5問提示してください。 選択式のクイズを4問(選択肢は4つ)と、記述式のクイズを1問。

@todashuta
todashuta / Blender_BUILD_ARM64.md
Last active October 24, 2026 12:27
Blender 4.5.15 を DGX Spark (arm64 Ubuntu 24.04) でビルドする

Blender 4.5 / 5.2 を arm64 (Ubuntu 24.04) でビルドする

2026-10-24 に Blender 4.5.15 と 5.2.3 の make deps と本体ビルドを通したときの記録。5.2 固有の差分は末尾にまとめてある。

環境

項目 値
OS Ubuntu 24.04.5 LTS
CPU aarch64 (20 コア)
@todashuta
todashuta / place_by_csv.py
Last active September 16, 2026 15:29
CSVの座標からモデル配置
# エクスプローラーで Ctrl-Shift-C でCSVファイルのパスをコピーして
# ''' と ''' の間の行に貼り付ける
FILEPATH = r'''
"C:\Users\user\path\to\file.csv"
'''.strip().strip('"')
COLLECTION_NAME = "test"
import bpy
@todashuta
todashuta / cursor_orientation_bbox.py
Created July 28, 2026 16:19
3Dカーソルの座標系を基準としたバウンディングボックス寸法を取得する
import bpy
import numpy as np
context = bpy.context
ob = context.object
cursor = context.scene.cursor
vs = [ob.matrix_world @ v.co for v in ob.data.vertices]
vs = [cursor.matrix.inverted() @ v for v in vs]
arr = np.array(vs)
:%s/\c=?utf-8?B?\([^?]\+\)?=/\=blob2str(base64_decode(submatch(1)))[0]/g
@todashuta
todashuta / collatz_generator.py
Created December 30, 2025 10:18
コラッツの問題の数列ジェネレーター
def collatz_gen(n):
yield n
while n > 1:
if n % 2 == 0:
n = n // 2
else:
n = n * 3 + 1
yield n
#print(list(collatz_gen(6)) == [6, 3, 10, 5, 16, 8, 4, 2, 1])
@todashuta
todashuta / ubuntu.sources
Created September 7, 2025 06:40
/etc/apt/sources.list.d/ubuntu.sources for Ubuntu 24.04 LTS
Types: deb deb-src
#URIs: http://jp.archive.ubuntu.com/ubuntu
#URIs: https://ftp.jaist.ac.jp/pub/Linux/ubuntu
URIs: https://ftp.udx.icscoe.jp/Linux/ubuntu
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Types: deb deb-src
URIs: https://security.ubuntu.com/ubuntu
@todashuta
todashuta / redmine-puma.service
Created June 29, 2025 15:04
/etc/systemd/system/redmine-puma.service
[Unit]
Description=Redmine Puma Server
After=network.target
[Service]
Type=simple
User=foo
WorkingDirectory=/home/foo/redmine
Environment=RAILS_RELATIVE_URL_ROOT=/redmine
ExecStart=/usr/bin/bundle exec puma -b tcp://127.0.0.1:3000 -e production -w 3 --preload
@todashuta
todashuta / redmine-unicorn.service
Created June 29, 2025 15:02
/etc/systemd/system/redmine-unicorn.service
[Unit]
Description=Redmine Unicorn Server
After=network.target
[Service]
Type=simple
User=foo
WorkingDirectory=/home/foo/redmine
ExecStart=/usr/bin/bundle exec unicorn_rails --listen=127.0.0.1:3000 --env=production --path=/redmine
Restart=always
on run argv
do shell script "~/bin/run-usdview"
end run
on open objects
do shell script "~/bin/run-usdview " & quoted form of POSIX path of (item 1 of objects)
end open