Skip to content

Instantly share code, notes, and snippets.

@squeuei
squeuei / jekyll-serve-with-podman.md
Created May 20, 2025 14:02
jekyll serve with podman
podman run -it --rm -v "$(pwd):/app:z" -p 4000:4000 ruby:slim sh -c "
cd /app && \
apt-get update && \
apt-get install -y build-essential git && \
bundle install && \
bundle exec jekyll serve --host 0.0.0.0
"
@squeuei
squeuei / japanese_input_on_vscode_en.md
Last active April 28, 2025 13:19
Wayland, VSCode, and Fcitx5

What happened?

Sometimes Fcitx5 drops the very first keystroke, thus acting like direct input, when the user types quickly.

Environment

  • OS: Fedora 42 Workstation KDE Plasma Desktop
  • Editor: VSCode (official build)
  • Input Method Frontend: Fcitx5
  • Input Method Backend: anthy-unicode
@squeuei
squeuei / build-a-cartesian-product-english.md
Last active January 8, 2025 14:25
How to build a cartesian product from vectors in a single formula with spilled array.

How to build a cartesian product from vectors in a single formula with spilled array.

Suppose that you have a set of row vectors and want to build a cartesian product of them on Microsoft Excel. You can build it with a single formula with spilled array. It may require newer versions of Excel. Columns of each rows don't have to be the same. Of course you can use VSTACK to build an input on the fly, or use spilled range operator like A1# if possible. If your input data contains commas, you can modify the formula by replacing the comma separator in both &","& and TEXTSPLIT(B,",") with any character that won't appear in your data (for example, using a pipe symbol | or semicolon ;).

=LET(
INPUT, A1:M2,
CARTESIAN_PRODUCT, DROP(REDUCE("",REDUCE(TRANSPOSE(CHOOSEROWS(INPUT,1)), SEQUENCE(ROWS(INPUT)-1,,2),LAMBDA(X,Y, TOCOL(X &","&CHOOSEROW
@squeuei
squeuei / 01.md
Created November 23, 2023 16:54
When asammdf's GUI won't start

When asammdf's GUI won't start

and see error messages like this:

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: vkkhrdisplay, eglfs, vnc, wayland, xcb, minimalegl, offscreen, minimal, linuxfb, wayland-egl.
@squeuei
squeuei / 01-english.md
Last active July 29, 2023 16:00
Stop buggy behaviors about audio on Debian 12 (Bookworm) / Xfce 4.18

Stop buggy behaviors about audio on Debian 12 (Bookworm) / Xfce 4.18

I encountered some strange behaviors on HP Elitebook 830 G8 (CPU: TigerLake) upon installing Debian Bookworm with Xfce desktop environment. Such as:

  • Audio volume is set to 100% after suspend / monitor sleep.
  • The output doesn't automatically switch when a new device is connected.

To find the cause of the problems, I checked journalctl and I found:

@squeuei
squeuei / 01-english.md
Last active August 14, 2023 02:46
Setting Environment Variables on Debian / Xfce / Lightdm

Setting Environment Variables on Debian / Xfce / Lightdm / IM

  1. Set environment variables in .profile
  2. Make a file .bash_profile and include command below.
if [ -f ~/.profile ]; then
  . ~/.profile
fi
@squeuei
squeuei / 01-howto-on-windows.md
Last active July 12, 2023 04:18
物理JISキーボードをUS配列として認識させ、かつ変換/無変換キーでIMEをON/OFFする方法

物理JISキーボードをUS配列として認識させ、かつ変換/無変換キーでIMEをON/OFFする方法 on Windows

  1. Windowsの設定->言語と地域->日本語->言語のオプション->キーボードレイアウトでキーボードレイアウトを英語キーボード(101/102キー)に変更する

fig1

  1. Powertoysをインストールし、Keyboard Managerで変換/無変換キーをIME Convert/IME Non-Convertにリマップする

fig2

@squeuei
squeuei / user-dic.md
Last active July 31, 2023 06:42
When you can't add a word to user dictionary of anthy

anthyでユーザ辞書にエントリを追加できないとき

空ファイル~/.anthy/private_words_defaultを作成してkasumiで単語登録する。初回はCLIでkasumi -aを使う方がいいかもしれない。理由は、エラーが出て失敗したことがわかりやすいため。anthy-unicodekasumi-unicodeでも同じように働く思われる。

When you can't add a word to user dictionary of anthy

Put an empty file as ~/.anthy/private_words_default and now you can add a word to user dictionary with kasumi. Maybe it's good to use kasumi -a on the terminal for the first time because it will raise an error. It should work on anthy-unicode and kasumi-unicode as well.

@squeuei
squeuei / fedora_33_and_SHA-1.md
Created June 28, 2021 12:18
When you have to access an website which uses SHA-1 on Fedora 33 or later.
@squeuei
squeuei / adobe_air.md
Created April 6, 2021 14:56
How to Download Adobe AIR Runtime in 2021.