Skip to content

Instantly share code, notes, and snippets.

View webknjaz's full-sized avatar
🇺🇦
#StandWithUkraine: https://github.com/vshymanskyy/StandWithUkraine

🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) webknjaz

🇺🇦
#StandWithUkraine: https://github.com/vshymanskyy/StandWithUkraine
View GitHub Profile
@schiberis
schiberis / ha_water_leak_alarm.yaml
Last active March 2, 2026 12:43
Sends mobile push and/or HA UI persistent notifications with minimal controls. No siren/switch options.
blueprint:
name: Water Leak Alarm – mobile + HA UI notifications (modern syntax)
description: >
IKEA BADRING (or any wet/dry sensor). Choose mobile push and/or
HA UI (persistent) notifications. Minimal, future-proof syntax.
domain: automation
input:
leak_sensor:
name: Leak sensor entity
@DavBoot01
DavBoot01 / README.md
Last active February 9, 2026 17:12
Manage moving of workspaces among multiple monitors in hyprland

Introduction

The goal is to replicate the user experience found in KDE or Gnome, where workspaces are shared across all monitors and can be switched simultaneously.

In KDE and Gnome, there is no concept of per-monitor workspaces by default—there is a single, unified workspace that spans all monitors. It is possible to decouple them, but this is not the default behavior.

In Hyprland, each monitor has its own set of workspaces. The purpose of this script is to provide similar functionality: with a single command, all monitors switch their workspaces simultaneously and in the same direction.

Scenario

Draziw.Button.Mines
ag.video_solutions.wedotv
ahf.dummynation
ai.socialapps.speakmaster
air.com.beachbumgammon
air.com.freshplanet.games.SongPop2
air.com.gamesys.mobile.slots.jpj
air.com.goodgamestudios.empirefourkingdoms
air.com.kitchenscramble.goo
air.com.lalaplay.rummy45
(
disconnect() {
local dev="$1" mac="$2"
echo "$dev: disconnect $mac" > /dev/kmsg
ubus call "hostapd.$dev" del_client "{'addr':'$mac','reason':8,'deauth':true,'ban_time':0}"
}
checkalive() {
local dev="$1" mac="$2" inactive
inactive="$(iw dev "$dev" station get "$mac" 2>/dev/null | sed -n 's/.*inactive time:[[:space:]]*\([0-9]*\).*/\1/p')"
#!/usr/bin/env bash
# Abort sign off on any error
set -e
# Start the benchmark timer
SECONDS=0
# Repository introspection
OWNER=$(gh repo view --json owner --jq .owner.login)
@Blackshome
Blackshome / low-battery-notifications-and-actions.yaml
Last active March 2, 2026 10:46
low-battery-notifications-and-actions.yaml
blueprint:
name: Low Battery Notifications & Actions
description: >
# 🪫 Low Battery Notifications & Actions
**Version: 3.4**
🚀 Stay Charged, Stay Smart! Let's automate and take charge of your battery maintenance!🔋⚡
@AzimsTech
AzimsTech / 99-OpenWrt-Stuffs.md
Last active January 9, 2026 22:45
Installing and Using OpenWrt

![banner][banner-img]

📖 Table of Contents

  • 🛠 Setup & Configuration
    • [🌐 Configure using LuCI][luci-config]
    • [🖥️ Configure using CLI][cli-config]
  • [📜 Configure using uci-defaults script][uci-default]
@wyfo
wyfo / asyncio-select.py
Last active October 22, 2024 16:12
Python asyncio select implementation
import asyncio
import collections.abc
import inspect
import random
import typing
@typing.overload
def select[T](
awaitables: collections.abc.Sequence[collections.abc.Awaitable[T]],
@oguzalb
oguzalb / arrowfunc.patch
Created July 21, 2023 14:08
adding arrow functions to Python grammar
diff --git a/Grammar/Tokens b/Grammar/Tokens
index 618ae81..29bcfeb 100644
--- a/Grammar/Tokens
+++ b/Grammar/Tokens
@@ -11,6 +11,7 @@ RPAR ')'
LSQB '['
RSQB ']'
COLON ':'
+FUNC_SIGN '=>'
COMMA ','
@cidrblock
cidrblock / extract.py
Last active October 3, 2025 11:39
Extract pylint rules implimented in ruff
import requests
from bs4 import BeautifulSoup
url = "https://github.com/charliermarsh/ruff/issues/970"
response = requests.get(url)
html_content = response.content
soup = BeautifulSoup(html_content, "html.parser")
li_tags = soup.find_all("li")