Skip to content

Instantly share code, notes, and snippets.

View umireon's full-sized avatar

Kaito Udagawa umireon

  • Monoxer
  • Tokyo, Japan
  • 11:50 (UTC +09:00)
  • X @umireon
View GitHub Profile
@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>
@umireon
umireon / howto_script_hook.en.md
Last active July 30, 2022 22:00
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.

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
@umireon
umireon / afflib.rb
Last active December 31, 2016 05:09
class Afflib < Formula
desc "Advanced Forensic Format"
homepage "https://github.com/sshock/AFFLIBv3"
url "https://github.com/sshock/AFFLIBv3/archive/v3.7.14.tar.gz"
sha256 "2d09340e94a72e0d62c6fdc92d6d86a70770229bee5719caca83b532638864a1"
bottle do
cellar :any
sha256 "26f676d4afb7ef30a36b72af253aa6dc04bcafbc37682057c3e3922766ac4b55" => :sierra
sha256 "723ac0e170f6ec96da14869c54ca7260c50a7bf28334c88371a171a355226f75" => :el_capitan