Skip to content

Instantly share code, notes, and snippets.

View zry98's full-sized avatar
💩
NOOB

zry98

💩
NOOB
View GitHub Profile
@zry98
zry98 / filters.txt
Created April 11, 2024 09:01
uBlock custom filters for hiding Twitter's sensitive content warning annoyances
! hide Twitter sensitive content warnings
! timeline
twitter.com##:xpath(//span[contains(text(), 'Content warning: ')]/../../../..)
twitter.com##:xpath(//span[contains(text(), 'Content warning: ')]/../../../../preceding-sibling::div):style(filter: blur(0) !important)
! user media page
twitter.com##:xpath(//span[text()='Warning: Sensitive content']/../..)
twitter.com##:xpath(//span[text()='Warning: Sensitive content']/../../preceding-sibling::div):style(filter: blur(0) !important)
@zry98
zry98 / digoo-station.yaml
Created June 29, 2023 19:22
Digoo weather station sensor component for ESPHome
substitutions:
device_name: 'Digoo Station'
external_location: 'Balcony'
rf_receiver_pin: '4'
digoo_sensor_channel: '2'
digoo_sensor_id: '9'
esphome:
name: digoo-station
comment: 'ESP station for environment monitoring'
@zry98
zry98 / silence-fans.sh
Last active June 30, 2022 02:22
Silence HPE server fans using hacked iLO firmware
#!/bin/bash
# iLO4 hacking: https://github.com/kendallgoto/ilo4_unlock
sshPrivateKey="/root/.ssh/id_rsa"
iloPort=22
iloUser="Administrator"
iloAddress="10.2.2.2"
jumpHost="-J user@10.2.1.1" # set this to a jump host if your iLO is using a shared network port
fanMaxSpeed_global="40"
from string import printable
from dataclasses import dataclass
from datetime import datetime
from hashlib import md5
from Crypto.Cipher import AES
from Crypto.Util.Padding import unpad
# consts
MAGIC_NUMBER = b'\x21\x31' # [0:2]
LENGTH = b'\x00\x20' # [2:4]
@zry98
zry98 / generating-jetbrains-ides-dictionaries.md
Last active April 23, 2021 00:36
Generating dictionaries of other languages for JetBrains IDEs

For example, on Ubuntu (20.04):

$ sudo apt search "aspell-*" | grep -B 1 Spanish  # search for a Spanish dictionary
...
aspell-es/focal 1.11-15 all
  Spanish dictionary for aspell
$ sudo apt install aspell-es  # install it
...
$ aspell --lang es dump master | aspell --lang es expand | tr ' ' '\n' > es.dic # convert it for JetBrains IDEs