Skip to content

Instantly share code, notes, and snippets.

View saikocat's full-sized avatar
🍂
Improving the code, one commit at a time

Duc Hoa, Nguyen saikocat

🍂
Improving the code, one commit at a time
View GitHub Profile
@saikocat
saikocat / instruction.md
Created October 28, 2024 16:00
wayland + systemd + kde + screenshare + 'loop->recurse > 0' failed at ../pipewire/src/pipewire/thread-loop.c:426 pw_thread_loop_wait()

Symptoms

  • Firefox - Google Meet | Zoom - can't share screen.
  • Chromium - Google Meet | Zoom - can share only tab, and not windows or desktop.
  • Slack - Share Screen - gray pop-up without any options to select.
  • Obs - Screen Capture (Pipewire) option is not available.
  • 'loop->recurse > 0' failed at ../pipewire/src/pipewire/thread-loop.c:... pw_thread_loop_wait()

Troubleshooting

For some reasons, I noticed that WAYLAND_DISPLAY & XDG_CURRENT_DESKTOP are not set in the shell env, which might point to the login manager / systemd not setting the values correctly.

@saikocat
saikocat / arch-chroot-lvm-recover.md
Last active October 12, 2024 01:15
arch-chroot recover lvm for mid upgrade run out of space

After performing a reboot, when the system kernel upgrade failed due to no disk space left (hence initramfs failed to regenerate)

Failed to execute /init (error -8)
Starting init: /sbin/init exists but couldn't execute it (error -8)
Starting init: /bin/init exists but couldn't execute it (error -8)

Mounting for chroot environment

@saikocat
saikocat / combo.def
Created September 12, 2022 14:44
QMK Combo def
COMB(WORD_BSPC_KL, C(KC_BSPC), KC_I, KC_O)
COMB(SFT_OS_ASCLN, OSM(MOD_LSFT), KC_A, KC_SCLN)
COMB(SFT_OS_WE, OSM(MOD_RSFT), KC_W, KC_E)
COMB(SFT_OS_SD, OSM(MOD_LSFT), KC_S, KC_D)
COMB(CTL_OS_DF, OSM(MOD_LCTL), KC_D, KC_F)
COMB(ALT_OS_ZX, OSM(MOD_LALT), KC_Z, KC_X)
COMB(GUI_OS_OP, OSM(MOD_LGUI), KC_O, KC_P)
COMB(RET_PLOVER, KC_ENT, KC_F, KC_J)
@saikocat
saikocat / atomic_habits.md
Last active May 31, 2023 21:19
[Advice] Summary of Atomic Habits
FROM debian:buster-slim AS builder
ARG XAR_VERSION=19.4.22
WORKDIR /src
RUN set -ex; \
apt-get update; \
apt-get install -y g++ curl cmake squashfs-tools; \
curl -L https://github.com/facebookincubator/xar/archive/${XAR_VERSION}.tar.gz | tar -zxv --strip-components=1 --directory .; \
@saikocat
saikocat / vim.md
Created August 3, 2020 13:19
Vim tips

Movements

  • Pressing j will move the cursor down 1 physical line.
  • Pressing gj will move the cursor down 1 displayed line.
  • Alt to `. is g;

Formating

  • Wrap lines after setting textwidth: in visual mode, gq
  • set shiftround

Searching

@saikocat
saikocat / howto.md
Created July 16, 2020 02:15
JGit and invalid private key
Caused by: com.jcraft.jsch.JSchException: invalid privatekey: [B@e4487af

The root cause was discovered to be the ssh private key mismatch. The exception only happened for users with key of newer kind ed25519, which outputs this key header:

-----BEGIN OPENSSH PRIVATE KEY-----

The Best Medium-Hard Data Analyst SQL Interview Questions

Source

By Zachary Thomas (zthomas.nc@gmail.com, Twitter, LinkedIn)

**Tip: **See the Table of Contents (document outline) by hovering over the vertical line on the right side of the page

Background & Motivation

group: travis_latest
language: python
cache: pip
python:
#- 2.7
- 3.6
#- nightly
#- pypy
#- pypy3
matrix:
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR ZO_CMD:zo
SETUVAR Z_CMD:z
SETUVAR Z_DATA:/home/hoa/\x2elocal/share/z/data
SETUVAR Z_DATA_DIR:/home/hoa/\x2elocal/share/z
SETUVAR Z_EXCLUDE:/home/hoa
SETUVAR __fish_classic_git_prompt_initialized:\x1d
SETUVAR __fish_init_2_39_8:\x1d
SETUVAR __fish_init_2_3_0:\x1d