Skip to content

Instantly share code, notes, and snippets.

View Toxblh's full-sized avatar
✌️

Anton Palgunov Toxblh

✌️
View GitHub Profile
@Toxblh
Toxblh / gist:2f041aa06a83268cfa7527d5a7834f4d
Created March 9, 2026 16:03
Actions to find custom led in key of keyboard on UX3405MA
1. su -
2. cd /sys/kernel/debug/asus-nb-wmi
3. Script for find led put to terminal and run:
for devid in $(seq 0x00040000 0x00040030); do
echo $devid > dev_id
VAL=$(cat dsts 2>/dev/null | grep -oP '0x\w+$')
echo "devid=$devid dsts=$VAL"
# Try to turn ON
echo 0x1 > ctrl_param
@Toxblh
Toxblh / beam_toggle
Created March 9, 2026 15:38
Beamforming toggle in LInux for ASUS UX3405MA
#!/bin/bash
TDFB_CARD="hw:sofhdadsp"
WMI_DEV=262171
WMI_PATH="/sys/kernel/debug/asus-nb-wmi"
STATE=$(amixer -D $TDFB_CARD cget name="Dmic0 Capture TDFB beam switch" | grep ": values=" | awk -F= '{print $2}')
if [ "$STATE" = "off" ]; then
amixer -D $TDFB_CARD sset "Dmic0 Capture TDFB beam switch" on > /dev/null
#!/bin/bash
# ~/.local/bin/rdp
# Использование: rdp home
# rdp home +drive
# rdp home +drive +usb
CONFIG_DIR="$HOME/.config/rdp"
HOSTS_FILE="$CONFIG_DIR/hosts"
COMMON="/size:100%h /floatbar /dynamic-resolution /scale:180 /scale-desktop:200 \
@Toxblh
Toxblh / gtk.css
Last active May 19, 2025 17:22
MacOS like style for GTK3 and GTK4 window actions. Download and move to ~/.config/gtk-4.0/gtk.css
windowcontrols >* {
transition: all 0.1s;
}
windowcontrols > .close {
margin-left: -6px;
}
windowcontrols > .minimize {
margin-left: -6px;
// Select all elements that contain the "mailto:" email link
const emailLinks = document.querySelectorAll('a.email[href^="mailto:"]');
emailLinks.forEach(link => {
// Extract the email address from the "mailto:" href attribute
const email = link.getAttribute('href').replace('mailto:', '').trim();
// Use CryptoJS to generate MD5 hash of the email (Gravatar uses lowercased MD5 hash of the email)
const emailHash = CryptoJS.MD5(email.toLowerCase()).toString();
/* Set global font and background */
body,
td,
th,
input,
dt,
#titles {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans',
Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
font-size: small;
#include "AvEncoder.h"
#include <iostream>
#include <string>
#include <queue>
#include <functional>
#include <cstdint>
extern "C"
@Toxblh
Toxblh / bash-to-zsh-hist.py
Created January 30, 2021 14:29 — forked from muendelezaji/bash-to-zsh-hist.py
Convert Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history
import sys
import time
@Toxblh
Toxblh / netspeed.sh
Created May 13, 2020 15:07 — forked from rsvp/netspeed.sh
netspeed.sh : check download speed rate via command line | Linux bash script
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2013-07-11
#
# _______________| netspeed : check download speed via command line.
#
# Usage: netspeed [tokyo, london, usw, use, east, west, URL]
# ^default U.S. west coast.
# [ -speed_KB/sec ]
# ^negation activates the Mbps converter.
#
ping ya.ru # проверка интернета
timedatectl set-ntp true
wifi-menu -o # настройка wifi соединения
fdisk -l # смотрим диски