Skip to content

Instantly share code, notes, and snippets.

View umireon's full-sized avatar

Kaito Udagawa umireon

  • Tokyo, Japan
  • 13:24 (UTC +09:00)
  • X @umireon
View GitHub Profile
@umireon
umireon / Task.hpp
Created December 23, 2025 15:46
KaitoTokyo Async: Zero-overhead, Allocation-aware C++20 Coroutines
/*
* KaitoTokyo Async Library
* Copyright (C) 2025 Kaito Udagawa umireon@kaito.tokyo
*
* 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:
@umireon
umireon / howto_script_hook.en.md
Last active December 15, 2024 14:48
CotEditor: Help for Scripting hook

Adding scripting hooks for CotEditor scripts

Scripting hooks allows CotEditor scripts to be executed on certain events. The following events are available with CotEditor:

  • document opened: after you opened the file and then the contents was loaded
  • document saved: after you saved the file and then the contents was stored

See CotEditor Event Handler suite section on AppleScript Dictionary for further information.

@umireon
umireon / jxa-timeout.js
Created November 30, 2016 17:52
setTimeout, setInterval, clearTimeout, and clearInterval on JXA (JavaScript for Automation) on macOS
if (typeof exports === 'undefined') exports = {}
function timer (repeats, func, delay) {
var args = Array.prototype.slice.call(arguments, 2, -1)
args.unshift(this)
var boundFunc = func.bind.apply(func, args)
var operation = $.NSBlockOperation.blockOperationWithBlock(boundFunc)
var timer = $.NSTimer.timerWithTimeIntervalTargetSelectorUserInfoRepeats(
delay / 1000, operation, 'main', null, repeats
)
@umireon
umireon / cookpad_to_evernote.user.js
Created October 22, 2014 12:33
クックパッドをEvernoteに送るボタン
// ==UserScript==
// @name クックパッドをEvernoteに送るボタン
// @description クックパッドのレシピにEvernoteでクリップボタンを追加します。
// @namespace https://github.com/umiiro/gmscripts
// @match http://cookpad.com/recipe/*
// @run-at document-end
// @require http://static.evernote.com/noteit.js
/*
Exception: syntax error
@Scratchpad/2:1
@umireon
umireon / .SRCINFO
Last active February 18, 2024 13:15
obs-ocr
pkgbase = obs-ocr
pkgdesc = OCR Plugin for OBS based on Tesseract
pkgver = 0.0.5
pkgrel = 1
url = https://github.com/occ-ai/obs-ocr
arch = x86_64
license = GPL2
makedepends = cmake
depends = obs-studio
depends = opencv
@umireon
umireon / .SRCINFO
Created January 25, 2024 17:49
obs-localvocal PKGBUILD for Arch Linux
pkgbase = obs-localvocal
pkgdesc = OBS plugin for local speech recognition and captioning using AI
pkgver = 0.1.0
pkgrel = 1
url = https://github.com/occ-ai/obs-localvocal
arch = x86_64
license = GPL2
makedepends = cmake
makedepends = ninja
depends = obs-studio
<?xml version="1.0" encoding="UTF-8"?>
<component type="addon">
<id>com.obsproject.Studio.Plugin.Ocr</id>
<extends>com.obsproject.Studio</extends>
<name>Ocr</name>
<summary>Remove the background from your camera video</summary>
<description>Remove the background from your camera video without a green screen. Optimized for person portrait views.</description>
<url type="homepage">https://github.com/occ-ai/obs-ocr</url>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0</project_license>
import dis
from dataclasses import dataclass
from typing import TypedDict
@dataclass
class MyDataclass:
field1: str
field2: int
class MyTypedDict:
@umireon
umireon / TestTrait.java
Created April 30, 2021 05:26
Scala trait ABI
package main;
public interface TestTrait {
public default int method(int x) {
return x * 2;
}
}
This file has been truncated, but you can view the full file.
$ ls -lR /usr.txt
total 0
drwxr-xr-x 3 root wheel 102 10 20 13:24 adic
drwxr-xr-x 1058 root wheel 35972 11 25 18:49 bin
drwxr-xr-x 280 root wheel 9520 11 25 18:49 lib
drwxr-xr-x 204 root wheel 6936 11 25 18:49 libexec
drwxr-xr-x 2 root wheel 68 7 31 05:49 local
drwxr-xr-x 246 root wheel 8364 11 25 18:49 sbin
drwxr-xr-x 46 root wheel 1564 11 25 18:49 share
drwxr-xr-x 5 root wheel 170 10 21 17:55 standalone