Skip to content

Instantly share code, notes, and snippets.

View shiena's full-sized avatar

KOGA Mitsuhiro shiena

View GitHub Profile
@shiena
shiena / main.swift
Created August 17, 2024 21:05
print active ime on macOS
import Foundation
import Carbon
import AppKit
func checkInputMonitoringPermission() -> Bool {
let options: NSDictionary = [kAXTrustedCheckOptionPrompt.takeRetainedValue() as NSString: true]
let isTrusted = AXIsProcessTrustedWithOptions(options)
return isTrusted
}
@shiena
shiena / build-error.txt
Last active February 1, 2023 09:13
Unity2021.3.17f1とMessagePack-For-C# v2.4.59でhololens2向けにUWP/ARM64でビルドするとエラー
Severity Code Description Project File Line Suppression State
Error C2664 'String_t *Strings_WeakIntern_mC72EF2A3C712D84A4E92074BC83E711414D7F0BD(ReadOnlySpan_1_t0846CD1BEF355AE12F9A41FFB292AA4A85F072F3,const RuntimeMethod *)': cannot convert argument 1 from 'ReadOnlySpan_1_t59614EA6E51A945A32B02AB17FBCBDF9A5C419C1' to 'ReadOnlySpan_1_t0846CD1BEF355AE12F9A41FFB292AA4A85F072F3' Il2CppOutputProject F:\Builds\Il2CppOutputProject\Source\il2cppOutput\MessagePack2.cpp 21785
@shiena
shiena / material-maker-ja-v1.0.1.csv
Created September 24, 2022 05:08 — forked from meko3/material-maker-ja-v1.0.1.csv
Material Maker v0.99の日本語化用ファイルです。Edit > Preferences > Languageからインストールして使えます。
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
id|ja
Material Maker|Material Maker
Powered by|搭載
File|ファイル
New material|新しいマテリアル
New paint project|新しいペイントプロジェクト
Load|ロード
Load material from website|ウェブサイトからマテリアルを読み込む
Load recent|最近ロードします
Save|保存
@shiena
shiena / PrefabVariantGenerator.cs
Last active December 15, 2023 06:14
Unityでupm内にあるreadonlyなprefabのvariantを作るエディタ拡張
// Copyright 2022 KOGA Mitsuhiro Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
using System.IO;
using UnityEditor;
using UnityEngine;
public class PrefabVariantGenerator : EditorWindow
{
@shiena
shiena / NewBehaviourScript.cs
Last active August 9, 2021 18:43
[Unity] UniRxを使ってアナログスティックで十字キーのGetKeyDownをエミュレートする
using System.Collections.Generic;
using UniRx;
using UniRx.Triggers;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
private enum DPadDirection
{
None,
@shiena
shiena / build.sh
Created May 21, 2021 19:22
Unityから利用できるsqlcipherライブラリをconanでビルドする
conan install . --build=openssl --build=sqlcipher
@shiena
shiena / my-uBlackList.txt
Last active May 10, 2021 17:51
my uBlackList filter
*://*.idahotvep.org/*
*://*.naver.jp/*
*://*.vtuber-matome.com/*
*://*.waldorf-am-see.org/*
*://*.sejuku.net/*
*://*.programmerstart.com/*
*://*.codetd.com/*
*://*.ipentec.com/*
*://bleepcoder.com/*
*://tech-ja.netlify.app/*
@shiena
shiena / uBlacklist.txt
Last active October 20, 2021 02:37
uBlacklist.txt for programmer
*://*.366service.com/*
*://*.alwaysemmyhope.com/*
*://*.answer-id.com/*
*://*.askdev.info/*
*://*.code-examples.net/*
*://*.codeflow.site/*
*://*.coder.work/*
*://*.fixes.pub/*
*://*.gitmemory.com/*
*://*.i-harness.com/*
public class Callback : AndroidJavaProxy, IDisposable
{
private Action action;
private Disposable disposable;
public Callback(Action a) : base("any.java.CallbackInterface")
{
action = a;
}
@shiena
shiena / IContainerBuilderExtension.cs
Created November 29, 2020 13:40
VContainer extension
using UnityEngine;
using VContainer.Unity;
namespace VContainer
{
public static class IContainerBuilderExtension
{
public static RegistrationBuilder RegisterComponentInGameObject<T>(this IContainerBuilder builder,
GameObject gameObject = default)
where T : MonoBehaviour