Skip to content

Instantly share code, notes, and snippets.

View 3110's full-sized avatar
🏠
Working from home

SAITO, Tetsuya 3110

🏠
Working from home
View GitHub Profile
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# generate_skk_maru_dict.py - SKK用丸数字辞書生成スクリプト
import sys
import argparse
# 丸数字のUnicode文字コードから生成(1~50)
# ①~⑳ (U+2460~U+2473)、㉑~㉟ (U+3251~U+325F)、㊱~㊿ (U+32B1~U+32BF)
CIRCLED_NUMS = ''.join([
@3110
3110 / SKK-JISYO.marusuuji
Last active March 2, 2025 14:09
SKK用丸数字辞書
;; -*- mode: fundamental; coding: utf-8 -*-
;;
;; 丸数字用辞書
;;
;; okuri-ari entries.
;; okuri-nasi entries.
まるすうじ /①/②/③/④/⑤/⑥/⑦/⑧/⑨/⑩/⑪/⑫/⑬/⑭/⑮/⑯/⑰/⑱/⑲/⑳/㉑/㉒/㉓/㉔/㉕/㉖/㉗/㉘/㉙/㉚/㉛/㉜/㉝/㉞/㉟/㊱/㊲/㊳/㊴/㊵/㊶/㊷/㊸/㊹/㊺/㊻/㊼/㊽/㊾/㊿/
1 /①/
2 /②/
3 /③/
@3110
3110 / main.cpp
Last active January 1, 2025 08:42
EchoBaseのサンプルRecordPlay.inoをPlatformIO IDE 向け M5Stack 定型コード環境で動かす
// PlatformIO IDE 向け M5Stack 定型コード環境
// https://github.com/3110/m5stack-platformio-boilerplate-code
// clang-format off
#include "main.hpp"
// clang-format on
#include <M5EchoBase.h>
#define RECORD_DURATION_SEC 3
@3110
3110 / macskk_hiragana_mode_on_powerpoint_for_macos.json
Last active October 27, 2024 17:39
PowerPoint for macOS上でmacSKKを使うときにひらがなモード(Ctrl-j) を有効にするKarabinar-Elements設定
{
"description": "PowerPoint for macOS上でmacSKKを使うときにひらがなモード(Ctrl-j)を有効にする",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.microsoft\\.Powerpoint"
],
"type": "frontmost_application_if"
@3110
3110 / amazon-url-shortener.js
Last active April 23, 2025 02:01
Amazon.co.jpのURLを短くするTampermonkey用UserScript
// ==UserScript==
// @name Amazon URL Shortener
// @namespace http://tampermonkey.net/
// @version 0.4
// @description Shorten Amazon URLs to minimal form
// @match https://www.amazon.co.jp/*
// @grant none
// ==/UserScript==
(() => {
const shorten = () => {
@3110
3110 / wifi_qrcode_generator.py
Created June 13, 2024 15:09
Wi-Fi接続用のQRコードを生成する
import qrcode
import argparse
VALID_ENCRYPTIONS = ["WEP", "WPA", "WPA2"]
DEFAULT_SIZE = 300
def generate_wifi_qrcode(ssid, password, filename, encryption="WPA2", size=DEFAULT_SIZE):
# 暗号化方式の検証
if encryption not in VALID_ENCRYPTIONS:
raise ValueError(f"無効な暗号化方式です: {encryption}。有効な値は {', '.join(VALID_ENCRYPTIONS)} です。")
; AutoHotKey 2.0で「]YYYYMMDD」と入力し,領域選択してCtrl+Cでクリップボードにコピーすると,YYYY年MM月DD日(曜日)に変換して置き換える
#Requires AutoHotkey v2.0
OnClipboardChange DateTranslatorCB
DateTranslatorCB(dataType)
{
if (dataType = 1 && RegExMatch(A_Clipboard, "^\](\d{4})(\d{2})(\d{2})$", &match))
{
DateStr := FormatTime(match[1] match[2] match[3], "yyyy年MM月dd日(ddd)")
A_Clipboard := DateStr
@3110
3110 / m5atoms3-mac-address.cpp
Last active January 12, 2023 13:36
ATOMS3のMACアドレスをQRコードと文字列で表示する
#include <M5AtomS3.h>
const size_t ETH_ALEN = 6;
const uint16_t SPACING = 4;
const uint8_t FONT = 1;
const uint8_t FONT_HEIGHT = 8;
const uint8_t QR_VERSION = 1;
uint8_t macAddr[ETH_ALEN] = {0};
char macStr[ETH_ALEN * 3 + 1] = {0};
@3110
3110 / lovot-study-with-audio-menu
Created July 22, 2021 12:54
LOVOT Studyに音声再生と同時にスクリプトを実行できる「音声再生」メニューを追加する
// ==UserScript==
// @name Start LOVOT Study with audio
// @namespace https://github.com/3110
// @version 0.3
// @description LOVOT Studyでオーディオを再生すると同時にスクリプトを実行する
// @author Tetsuya SAITO
// @match https://play.lovot.life/
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant none
@3110
3110 / amazon-lover.js
Last active October 13, 2022 15:17
Amazonが出荷元になっている商品ページを表示する
// ==UserScript==
// @name Amazon Lover
// @namespace https://github.com/3110
// @version 0.5
// @include https://www.amazon.co.jp/*
// @run-at document-start
// @description Remove all parameters in URL and add the parameter m=AN1VRQENFRJN5 to URL
// @author SAITO, Tetsuya <[email protected]>
// @grant none
// ==/UserScript==