Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
LED="/sys/class/leds/platform::micmute/brightness"
wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
MIC_STAT=$(wpctl get-volume @DEFAULT_SOURCE@ | grep -c MUTED )
case "$MIC_STAT" in
0)
@seungjin
seungjin / gist:2b88aa0a5818911d453cc2cb62d9a17f
Created July 24, 2025 01:29
AMD Ryzen AI 9 HX PRO 370 w/ Radeon 890M
CPU MAXMHZ MINMHZ
0 557.8950 605.2640 *
1 557.8950 605.2640 *
2 557.8950 605.2640 *
3 557.8950 605.2640 *
4 389.4741 605.2640
5 389.4741 605.2640
6 389.4741 605.2640
7 389.4741 605.2640
8 389.4741 605.2640
@seungjin
seungjin / helix-config.toml
Last active May 3, 2025 23:31
Helix editor's config.toml for Emacs flavor
[keys.normal]
# Emacs flavor:
# Base: https://www.cs.colostate.edu/helpdocs/emacs.html
# Cursor/Screen Movement Commands
C-a = "goto_line_start"
C-e = "goto_line_end"
C-f = "move_char_right" # forward-char
C-b = "move_char_left" # backward-char
C-n = "move_line_down"# next-line
C-p = "move_line_up" # previous-line
[Unit]
Description=Ferron web server
After=network.target
[Service]
Type=simple
User=ferron
ExecStart=/usr/local/bin/ferron -c /etc/ferron.yaml
ExecReload=kill -HUP $MAINPID
Restart=on-failure
@seungjin
seungjin / gist:49ba92899d67ee98a04f2a5018e9dee8
Created March 22, 2025 05:15
Emacs keybinding in Firefox input
https://thanosapollo.org/posts/firefox-with-emacs-keybindings/#step-i-aboutconfig
```
Step I: about:config
First visit about:config.
To enable Emacs keybindings while editing text in Firefox, make the following changes:
Set ui.key.accelKey to 18
@seungjin
seungjin / tog-arr.fish
Last active March 22, 2025 05:15
disable/enable arrow keys
function tog-arr -d "toggle arrow keys"
# Check if keycode 111 is currently mapped to 0xff52
xmodmap -pk | grep '^[[:space:]]*111' | grep 0xff52 >/dev/null 2>&1
if test $status -eq 0
# Unmap arrow keys
xmodmap -e "keycode 111 = " # UP
xmodmap -e "keycode 113 = " # LEFT
xmodmap -e "keycode 114 = " # RIGHT
xmodmap -e "keycode 116 = " # DOWN
else
@seungjin
seungjin / gist:ef555ef22023ffb4d99e92adc2226a0e
Created December 2, 2024 02:42
Result of YABS, Zap-hostring Lifetime, US West, 4 cores, 8G Ram, 60G SSD NAS, 500 Mbit/S
$ curl -sL https://yabs.sh | bash
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
# Yet-Another-Bench-Script #
# v2024-06-09 #
# https://github.com/masonr/yet-another-bench-script #
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
Sun Dec 1 09:18:26 PM EST 2024
Basic System Information:
@seungjin
seungjin / gist:4cb9264772f8e6c71e42e6831d11dd3b
Created December 2, 2024 02:30
Result of YABS, Contabo VPS1, Japan, 4 cores, 6G Ram, 100G Nvme, 200 Mbit/S
$ curl -sL https://yabs.sh | bash
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
# Yet-Another-Bench-Script #
# v2024-06-09 #
# https://github.com/masonr/yet-another-bench-script #
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
Sun 1 Dec 21:16:51 EST 2024
Basic System Information:
@seungjin
seungjin / vimrc
Last active October 22, 2024 04:46
nnoremap h j
nnoremap l k
nnoremap <M-h> h
nnoremap <M-l> l
@seungjin
seungjin / .gitignore
Last active October 6, 2024 04:54
emacs config for emacs-nw
# Ignore everything
*
# But not these files...
!.gitignore
!init.el
!LICENSE