Skip to content

Instantly share code, notes, and snippets.

View mrjohannchang's full-sized avatar

Johann Chang mrjohannchang

View GitHub Profile
@mrjohannchang
mrjohannchang / arduino-cli-steps.md
Created July 31, 2024 20:06 — forked from Jerrylum/arduino-cli-steps.md
How to use Arduino CLI to program ESP32

Development

Suggested user settings, Arduino CLI is optional.

{
    "arduino.path": "C:\\Users\\jerrylum\\Documents\\Application\\arduino-cli_0.27.1_Windows_64bit",
    "arduino.useArduinoCli": true,
    "arduino.commandPath": "arduino-cli.exe"
}
@mrjohannchang
mrjohannchang / autossh.service
Created August 2, 2024 03:36 — forked from thomasfr/autossh.service
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
@mrjohannchang
mrjohannchang / find_in_list.h
Last active March 28, 2025 11:23
C23 find in sys/queue
#pragma once
#include <sys/queue.h>
#define find_in_slist(element, list_head, entry_name, comparator) \
({ \
typeof(element) ret = nullptr; \
typeof(element) current_element = nullptr; \
SLIST_FOREACH(current_element, list_head, entry_name) { \
if (comparator(current_element, element)) { \
@mrjohannchang
mrjohannchang / _readme.md
Last active April 29, 2025 02:17
Rime 中州韻輸入法 橫式 小鶴雙拼 設定
  1. Install RIME (Squirrel on macOS, Weasel on Windows)
  2. Install 小鶴雙拼
    # Go to the installation folder, then
    ./rime-install double-pinyin
    
  3. Enable the installed 小鶴雙拼 schema from RIME's settings.
  4. Add the following contents to corresponding files, if files are not existed, create them.
  5. From RIME UI, click deploy to make the customized config take effect.