Skip to content

Instantly share code, notes, and snippets.

@D-Brox
D-Brox / disable-touchscreen
Created January 31, 2024 13:16
Script for disabling touchscreen on linux (by kidnapping the input with evtest)
#! /bin/env bash
device=$( cat /proc/bus/input/devices |
awk '
/"ELAN Touchscreen"/{ inside = 1 }
/Handlers=/ { if(match($0,"event([0-9]+)",group))event = group[1] }
/^$/ { if(inside && event!="")print "/dev/input/event" event
inside = 0; event = ""
}')
@D-Brox
D-Brox / j-music.json
Last active July 25, 2023 22:12
J-Music United Server Initiative Coallition r/place template
{
"faction": "J-Music United Server Initiative Coallition",
"contact": "https://discord.gg/inabakumori",
"templates": [
{
"name": "Osage collab",
"sources": [
"https://user-images.githubusercontent.com/65723952/256029761-50083486-6000-43e6-b9af-19f57e6c0074.png"
],
"x": 2338,
@D-Brox
D-Brox / canary_borked_themes.md
Last active November 1, 2023 16:42
Unbork themes guide

Canary broke themes again -_-

What happened?

Discord's css is minified, with it's classes following the format name-hash. When they pushed a new asset to the canary build, the classes got renamed:

This means the classes on the themes don't relate to any discord class anymore.

So what now?

@D-Brox
D-Brox / classfinder2.py
Last active February 13, 2024 17:18 — forked from Davr1/classfinder.py
import json
import re
from operator import itemgetter
import requests
from itertools import combinations
def best_similarity(master, candidates):
counts = [0] * len(candidates)
for candidate_index, candidate in enumerate(candidates):
for item in candidate: