Skip to content

Instantly share code, notes, and snippets.

@onionmk2
onionmk2 / LICENSE
Created July 21, 2026 05:54 — forked from tegnike/LICENSE
Conversation-centered handoff skill for Codex: move long tasks to a fresh task without losing intent or history
MIT License
Copyright (c) 2026 tegnike
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@onionmk2
onionmk2 / 1_srp.md
Created February 20, 2025 02:26 — forked from matarillo/1_srp.md
SOLID原則はソリッドではない

SOLIDはソリッドではない - 単一責任原則を検証する

https://naildrivin5.com/blog/2019/11/11/solid-is-not-solid-rexamining-the-single-responsibility-principle.html

2019年11月11日

最近、SOLIDの原則について考えていて、その有用性に疑問を感じている。 SOLIDの原則は曖昧で、範囲が広すぎて、混乱を招き、場合によっては完全に間違っている。しかし、これらの原則の動機は正しい。問題は、ニュアンスの異なる概念を簡潔な文に落とし込もうとすることにあって、翻訳の過程で価値の大部分を失っているのだ。 これはプログラマーを間違った道へと導いてしまう(私にとっては確かにそうだった)。

おさらいとして、SOLIDの原則は以下の通りである:

@onionmk2
onionmk2 / .cpp
Last active June 29, 2024 22:11
https://www.udemy.com/course/unreal-engine-5-gas-top-down-rpg 44. Infinite Effect Application and Removal
UAbilitySystemComponent* ASC = UAbilitySystemBlueprintLibrary::GetAbilitySystemComponent(TargetActor);
if (!IsValid(ASC))
{
return;
}
// Create a Query to specify the GE to be removed.
// Similar to the implementation of UAbilitySystemComponent::RemoveActiveGameplayEffectBySourceEffect, but with additional check by SourceObject.
FGameplayEffectQuery Query;
UAbilitySystemComponent* InstigatorAbilitySystemComponent = ASC;
@onionmk2
onionmk2 / DiscoverBlueprintComments.cpp
Created June 12, 2024 03:16 — forked from rdeioris/DiscoverBlueprintComments.cpp
How to extract Unreal Engine Blueprint comments via c++
FAssetRegistryModule& AssetRegistryModule = FModuleManager::LoadModuleChecked<FAssetRegistryModule>("AssetRegistry");
TArray<FAssetData> AssetData;
AssetRegistryModule.Get().GetAssetsByClass(UBlueprint::StaticClass()->GetFName(), AssetData, true);
for (FAssetData& Asset : AssetData)
{
if (Asset.ObjectPath.ToString().StartsWith("/Game/"))
@onionmk2
onionmk2 / ue.css
Created December 6, 2021 20:22
unreal c++ doc css. Regex: https:\/\/docs\.unrealengine\.com\/.+\/en-US\/API.+
th {
padding: 0;
}
td {
padding: 0;
}
table {
margin: 0 0 1em 0;
@onionmk2
onionmk2 / export step from fusion.py
Created April 30, 2020 17:52
stepをfusion360からエクスポートするスクリプト。16行目を自分の環境に合わせて変える。
import adsk.core, adsk.fusion, traceback
import os.path, sys
def run(context):
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
# get active design
@onionmk2
onionmk2 / import step to fusion360.py
Last active April 30, 2020 17:49
stepをfusion360にインポートするスクリプト。13行目を自分の環境に合わせて変える。
# FusionAPI_python Import3DCadFiles ver0.0.1
# Author-onionmk2
import adsk.core, adsk.fusion, traceback
import os.path
def run(context):
ui = None
try:
app = adsk.core.Application.get()
@onionmk2
onionmk2 / twitter stylus.css
Created March 15, 2020 23:45
stylus for twitter
/* begin------------幅を広げる------------*/
/* デフォのcssがmax-width: 600px; のような値を入れてくるせいで無駄に狭い。デフォのcssを殺して最大化。 */
[data-testid="primaryColumn"] {
max-width: -webkit-fill-available;
}
/* URLが https://twitter.com/home なら子セレクタ(>)だけに限定できる。
しかし それ以外のURLでは、 子孫セレクタで一括指定する以外修正できないので、やむなく子孫セレクタを使用。*/
[data-testid="primaryColumn"] div {
max-width: -webkit-fill-available;
}
@onionmk2
onionmk2 / show_points_.py
Last active February 16, 2020 21:33
show "control points" or "solid point" in rhono
#from typing import Any, Iterable
import Rhino
import rhinoscriptsyntax as rs
import scriptcontext as sc
doc = Rhino.RhinoDoc.ActiveDoc # type: Rhino.RhinoDoc
objectTable = doc.Objects # type: Rhino.DocObjects.Tables.ObjectTable
selected_objects = objectTable.GetSelectedObjects(includeLights=False, includeGrips=False) # type: Iterable[Rhino.DocObjects.RhinoObject]
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; ! is Alt. Alt +2 が押されるまで待機ということ。
!2::
SysGet, monitor1, Monitor, 1
SysGet, monitor2, Monitor, 2