Skip to content

Instantly share code, notes, and snippets.

View itskenny0's full-sized avatar

kenny itskenny0

  • I don't know what I'm doing, Inc.
  • Germany
View GitHub Profile
@itskenny0
itskenny0 / README.md
Created September 22, 2021 11:18
assign touchscreen to monitor in linux

You need to replace DP-1 with your display name from xrandr, and "MTouch" with a string that shows up in your touch screen's name when executing "xinput".

@itskenny0
itskenny0 / deletemetric.sh
Created August 7, 2022 13:53
Delete metric in Graphite docker setup
#!/bin/bash
STAT=$1
SUB=$(echo $STAT | sed 's/\./\//g' | sed 's/$/.wsp/')
CONTAINER=$(docker ps -aq --filter name=graphite)
if [[ -z $STAT ]]; then
echo "Usage: ./deletemetric.sh stats_counters.test.metric.something"
exit 1
fi
@itskenny0
itskenny0 / dhcp2hosts.sh
Created July 8, 2024 08:27
Copy dhcp.leases to /etc/hosts on OpenWrt for AdGuard Home
#!/bin/bash
# converts /tmp/dhcp.leases to /etc/hosts format for adguardhome to show hostnames
# Paths to the files
HOSTS_FILE="/etc/hosts"
DHCP_LEASES_FILE="/tmp/dhcp.leases"
TEMP_FILE="/tmp/dhcp_hosts.tmp"
sed '/### DHCP LEASES START ###/,/### DHCP LEASES END ###/d' $HOSTS_FILE > $TEMP_FILE
mv $TEMP_FILE $HOSTS_FILE
@itskenny0
itskenny0 / brightness.sh
Created January 6, 2025 19:45
Adjust brightness on HyperPixel 4
#!/usr/bin/env bash
PIN=19
FREQ=100
STEP=100000
MAX=1000000
MIN=0
get_current_duty() {