Skip to content

Instantly share code, notes, and snippets.

@shinyquagsire23
shinyquagsire23 / gist:7ddd17d1569acb21920683866570cb35
Created February 23, 2023 07:43
LG MStar firmware disorganized notes -- Hotwords: AEON B2, MStar, LG DualUp Firmware, MST9W00V4, MST9U
DDC/CI Command Codes (antiquated MStar function, not real):
------
0xCC, 0xF1, 0xF0 - LG special? Only CC actually used.
3
1
0xC6
0xC8
0xF3
0xF5
0xB1
@r15ch13
r15ch13 / iommu.sh
Last active July 11, 2024 10:41
List IOMMU Groups and the connected USB Devices
#!/usr/bin/env bash
shopt -s nullglob
lastgroup=""
for g in `find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V`; do
for d in $g/devices/*; do
if [ "${g##*/}" != "$lastgroup" ]; then
echo -en "Group ${g##*/}:\t"
else
echo -en "\t\t"
@nazavode
nazavode / ctype_async_raise.py
Last active August 9, 2023 15:48 — forked from liuw/ctype_async_raise.py
Nasty hack to raise exception for other threads
from __future__ import print_function
import ctypes
import threading
import time
def async_raise(thread_obj, exception):
""" Raises an exception inside an arbitrary active :class:`~threading.Thread`.
Parameters

TMUX - Single window group, multiple session.

So I have been using tmux for a while and have grown to like it and have since added many many customizations to it. Now once you start getting the hang of it, you'll naturally want to do more with the tool.

Now tmux has a concept of window-group and session and if you are like me you'll want multiple session that connects to the same window group instead of a new window group every time. Basically I just need different views into the same set of windows that I have already created, I don't want to create a new set of windows every time I fire up my terminal.

This is the default case if you simply use the tmux command as your login shell, effectively creating a new group of windows every time you start tmux.

This is less than ideal because, if you are like me, you fire up one-off terminals all the time and you don't want all those one-off jobs to stay running in the background. Plus sometimes you need information fro