Skip to content

Instantly share code, notes, and snippets.

View espresso3389's full-sized avatar

Takashi Kawasaki espresso3389

View GitHub Profile
@espresso3389
espresso3389 / motion-detector.py
Created January 30, 2026 00:54
Face tracking with Insta360 Link on Linux
#!/usr/bin/env python3
"""
Motion Detector with MobileNet-SSD Object Detection
動体検知 + 物体認識 + PTZ追跡
"""
import cv2
import subprocess
import time
import numpy as np
@espresso3389
espresso3389 / WebBinaryEditor.md
Last active November 22, 2025 18:23
Web Binary Editor Core Logic Design

Binary Editor

Features

  • Local file support by File System API and file drag-and-drop
  • Create New file
  • Multi-carets/selections
  • Redo/Undo
  • Canvas based fast hex/ascii rendering
  • Search/Replace (design later)
@espresso3389
espresso3389 / noto_google_fonts.dart
Created July 30, 2025 18:30
Obtaining Noto Sans/Serif Google Fonts Download URL for pdfrx
// The code is based on the following code from Google Fonts:
// https://github.com/material-foundation/flutter-packages/blob/main/packages/google_fonts/lib/src/google_fonts_parts/part_n.dart
//
// Noto Sans/Serif is licensed under the SIL Open Font License, Version 1.1 .
// https://fonts.google.com/noto/specimen/Noto+Sans/license
import 'package:pdfrx/pdfrx.dart';
class GoogleFontsFile {
GoogleFontsFile(this.faceName, this.weight, this.expectedFileHash, this.expectedLength);
@espresso3389
espresso3389 / openssh-server-win11.md
Last active February 8, 2026 06:58
Enable SSH Server on Windows 11

NOTE: Open Administrative PowerShell (not pwsh.exe) and run the every steps below.

Install OpenSSH Server

Firstly check the actual component name:

Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'
@espresso3389
espresso3389 / android_sdk_headless_ubuntu_24.04.md
Last active June 11, 2025 05:29
How to install Android SDK Headless on Ubuntu 24.04

Installation

# prerequisites
sudo apt update
sudo apt install unzip wget openjdk-21-jdk-headless

# https://developer.android.com/studio#cmdline-tools
CMDTOOLS_ZIP=commandlinetools-linux-13114758_latest.zip
@espresso3389
espresso3389 / wsl2-bitwarden-ssh-agent.md
Last active October 3, 2025 07:17
Bitwarden SSH Agent relay to WSL2
@espresso3389
espresso3389 / genesis-wsl2.md
Last active January 24, 2025 13:10
Run Hello, Genesis on WSL2 (Ubuntu 24.04)

Run Hello, Genesis on WSL2 (Ubuntu 24.04)

image

Install Python and venv

sudo apt install python python3-venv
@espresso3389
espresso3389 / find_cert.rb
Created December 10, 2024 18:42
Find a signing certificate of serial number from keychain
#!/usr/bin/env ruby
require 'openssl'
def print_usage
puts "Usage: #{File.basename($0)} [-s|-S|-C component] <serial_number> [keychain]"
puts "Options:"
puts " -s Show only certificate subject (single line)"
puts " -S Show only certificate subject (one parameter per line)"
puts " -C component Show only specified component (e.g., -C CN for Common Name)"
@espresso3389
espresso3389 / provprof.rb
Created December 10, 2024 18:41
Get info. such as signing certificate's serial number from provisioning profile
#!/usr/bin/env ruby
require 'openssl'
def print_usage
puts "Usage: #{File.basename($0)} <provisioning_profile_path>"
puts "Example: #{File.basename($0)} /path/to/profile.mobileprovision"
exit 1
end
@espresso3389
espresso3389 / winrt_formatters.h
Created December 9, 2024 03:08
C++23 std::formatter implementations for WinRT classes
#ifndef WINRT_FORMATTERS_H
#define WINRT_FORMATTERS_H
#include <windows.h>
#include <winrt/base.h>
#include <string>
#include <format>