Skip to content

Instantly share code, notes, and snippets.

View umireon's full-sized avatar

Kaito Udagawa umireon

  • Monoxer
  • Tokyo, Japan
  • 20:14 (UTC +09:00)
  • X @umireon
View GitHub Profile
@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
<?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 / .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
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;
}
}
@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
@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.

@umireon
umireon / github_user_repo_from_git.sh
Created December 1, 2016 07:46
Extract the user name and repository name on GitHub from `origin`
REPOURL=$(git remote get-url origin | grep '^https://github.com') || {
echo error: origin is not on github
exit 1
}
GITHUB_USER=${REPOURL#https://*/}
GITHUB_USER=${GITHUB_USER%/*}
GITHUB_REPO=${REPOURL#https://*/*/}
GITHUB_REPO=${GITHUB_REPO%.git}
@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 / remove-xcode-clt8.sh
Last active December 5, 2016 13:29
Xcode Command Line Tools (CLT) remove script for macOS Sierra
#!/bin/bash
## # Usage
## 1. Boot with Recovery OS and open Terminal.app
## 2. cd "/Volumes/Macintosh HD"
## 3. Execute this script
## When the network connection is available, this script can be executed by:
## curl -fsSL https://gist.github.com/umireon/68d7edbe7fa22055f6da3b5d64d8705c/raw/remove-xcode-clt8.sh | bash
# sanity check
if [[ ! -d Users ]] && [[ $1 != -f ]]; then