Skip to content

Instantly share code, notes, and snippets.

View qnighy's full-sized avatar

Masaki Hara qnighy

View GitHub Profile
@qnighy
qnighy / ubuntu-2604-gnome-wayland-fcitx5-skk.md
Last active July 12, 2026 04:35
Ubuntu 26.04 GNOME Wayland + fcitx5-skk

ibus と ibus-skk が微妙なので fcitx5 を試す

パッケージのインストール

sudo apt install fcitx5 fcitx5-mozc fcitx5-skk gnome-browser-connector

# gnome-shell-extension-kimpanel は Debian から Ubuntu へのインポートに失敗していて登録がないので
# 自力でビルド
sudo apt install git build-essential
@qnighy
qnighy / 0003-Forward-Super-Hyper-modified-key-events-to-the-compo.patch
Created June 27, 2026 09:16
Patch to fix ibus-skk absorbing Super modifier keys in Wayland
From: Masaki Hara <ackie.h.gmai@gmail.com>
Date: Sat, 27 Jun 2026 18:09:14 +0900
Subject: Forward Super/Hyper modified key events to the compositor
When ibus-skk is the active engine, pressing a Super (Mod4) + letter
combo such as Super+L caused the bare letter to be committed and the
event reported as handled, swallowing the compositor's global shortcuts
(e.g. Super+L to lock the screen).
The modifier masking in process_key_event() stripped the Super/Hyper

Mastodon 投稿再配送

misskey.io が数時間の障害に見舞われていたため、投稿の再送を行いました。

前提

サーバーによって最適なアプローチは異なります。今回の前提は以下の通りです。

  • おひとり様サーバー
  • リモートユーザーがほとんど、ローカルユーザーはごくわずか

電磁気学の符号の慣習

背景

古典電磁気学には多くの対称性があり、符号を逆にしても議論が成立してしまうことが多いです。 このことが逆に厄介で、符号がアプリオリに定まらないため、明示的に慣習を確立しておかないと混乱のもとです。 本稿では古典電磁気学における符号の慣習についてまとめます。

座標

@qnighy
qnighy / rsc-memo.md
Last active April 13, 2026 01:31
React Server Components 備忘録
@qnighy
qnighy / deeplearning.md
Last active May 25, 2025 10:11
深層学習覚え書き

深層学習覚え書き

深層学習 (ディープラーニング) とは

  • 深層学習 は多数の層を持つニューラルネットワークをモデルとして利用する機械学習手法のことである。
  • 機械学習 は、モデルを既知のデータにフィットさせることでプログラムの振る舞いを決定する手法のことである。

深層学習はニューラルネットワークを使うため、神経回路とのアナロジーで説明されることも多い。ただし、NNの動作を説明するにあたって必須ではないためここでは扱わない。

機械学習のポイント

@qnighy
qnighy / ruby-syntaxes.md
Last active January 3, 2025 08:33
Ruby syntaxes

Program-global

  • # frozen_string_literal
  • # encoding
  • __END__

Expressions

  • Singleton literals
  • nil
@qnighy
qnighy / majority.rs
Created July 15, 2024 06:32
Fast 2-pass majority finder
// Copyright 2024 Masaki Hara
//
// 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:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE O
@qnighy
qnighy / PC98ext.md
Last active May 10, 2024 11:21
PC-9800シリーズ機種依存文字 (JIPS由来文字) 9区~12区

PC-9800シリーズ機種依存文字 (JIPS由来文字) 9区~12区

「NEC特殊文字」として有名な13区は標準化もされていて資料が豊富であるため省略。

字形のソースは http://www.kt.rim.or.jp/~aotaka/pc/character.htm

9区

2バイト半角英数。 JIS X 0201 ラテン文字集合に近いが、形状から考えて別の文字を指している可能性のある符号位置がある。

UI-OSF-USLP 共同技術資料 日本語EUCの定義と解説
日本語 EUC の定義