Skip to content

Instantly share code, notes, and snippets.

@jayoh-dev
jayoh-dev / gnome-app-toggler.sh
Created April 30, 2026 02:30
Cycle GNOME desktop apps through not-running, in-tray, unfocused, and focused with one D-Bus call. Wayland-friendly.
#!/usr/bin/env bash
#
# gnome-app-toggler - Toggle a desktop app on GNOME (Wayland) with one command.
#
# Cycles through four states:
# 1. not running -> launch via .desktop file
# 2. running, in tray -> show window + restore last geometry
# 3. running, unfocused -> focus
# 4. running, focused -> save geometry + close (-to-tray)
#
@jayoh-dev
jayoh-dev / coding_test.md
Created April 7, 2021 02:11
Coding Test

Coding Test

Tips

  • 문제를 잘 읽자! 특히 범위나 가능 여부가 주어지는 경우 주의
    • e.g. 필요한 경우, 최대로 가능 깊이는
  • 입출력이 많은 경우 printf/scanf 혹은 ios::sync_with_stdio(false);를 사용한다
  • 공백이 없는 입력값은 한 줄 전체를 string으로 입력 받는 것을 고려한다
  • N ≤ 10^18 이라면 long long을 써야할 가능성이 높다
  • long long 사용 시 중간 계산에 사용되는 값도 long long으로 사용해야 한다
@jayoh-dev
jayoh-dev / default.reg
Last active June 22, 2017 01:15 — forked from P4/default.reg
Color schemes for Windows Command Prompt
Windows Registry Editor Version 5.00
; Default color scheme
; for Windows command prompt.
; Values stored as 00-BB-GG-RR
[HKEY_CURRENT_USER\Console]
; BLACK DGRAY
"ColorTable00"=dword:00000000
"ColorTable08"=dword:00808080
; BLUE LBLUE
import java.util.zip.Checksum;
public class CRC15CAN implements Checksum {
/** x^15 + x^14 + x^10 + x^8 + x^7 + x^4 + x^3 + x^0 */
private static final int POLYNOMIAL = 0x4599;
/** Static CRC Table */
private static final int[] TABLE = new int[] { 0x0000, 0x4599, 0x4eab, 0x0b32, 0x58cf, 0x1d56, 0x1664, 0x53fd, 0x7407, 0x319e, 0x3aac, 0x7f35, 0x2cc8, 0x6951, 0x6263, 0x27fa, 0x2d97, 0x680e,
0x633c, 0x26a5, 0x7558, 0x30c1, 0x3bf3, 0x7e6a, 0x5990, 0x1c09, 0x173b, 0x52a2, 0x015f, 0x44c6, 0x4ff4, 0x0a6d, 0x5b2e, 0x1eb7, 0x1585, 0x501c, 0x03e1, 0x4678, 0x4d4a, 0x08d3, 0x2f29,