Skip to content

Instantly share code, notes, and snippets.

View surfaceflinger's full-sized avatar
🦗
najebany to do domu

surfaceflinger

🦗
najebany to do domu
View GitHub Profile
@surfaceflinger
surfaceflinger / accounts.txt
Created February 15, 2025 17:30
simple crypto/currencies value checker/summer in bash because everything else sucks
Ledger NOT 500 MANUAL
Revolut CHF 400
Trezor BTC 0.009 comment
@surfaceflinger
surfaceflinger / kagi.css
Created February 6, 2025 13:51
Custom CSS for Kagi that makes results more readable, like in Google Search.
:root {
--search-result-title: #1a0dab;
--result-item-title-border: rgba(0, 0, 0, 0);
}
@media (prefers-color-scheme: dark) {
:root {
--search-result-title: #99c3ff;
}
}
@surfaceflinger
surfaceflinger / _root_postboot.sh
Last active December 1, 2024 15:14
Setup Valetudo over Tailscale on Dreame robots.
if [[ -f /data/bin/tailscaled ]]; then
mkdir -p /data/tailscale/state /tmp/tailscale
STATE_DIRECTORY=/tmp/tailscale /data/bin/tailscaled \
--tun=userspace-networking \
--socket=/tmp/tailscale/tailscaled.sock \
--statedir=/data/tailscale/state > /dev/null 2>&1 &
iptables -A INPUT -p tcp --dport 80 -s 127.0.0.1 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j DROP
fi
@surfaceflinger
surfaceflinger / tmobilewnc.user.js
Created November 20, 2024 11:21
Userscript to access engineering options in "WNC T-Mobile Internet 5G Home Office" ODU/Modem. Code might be shit because I don't know JS and it was generated by ChatGPT
// ==UserScript==
// @name Add Engineering Mode Menu
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Inject engineering mode submenu to the menu
// @author You
// @match *://192.168.0.1/*
// @grant none
// ==/UserScript==
@surfaceflinger
surfaceflinger / dataset-diff.py
Created November 3, 2024 22:01
Compare property/setting differences across all ZFS zpools and datasets!
#! /usr/bin/env nix-shell
#! nix-shell -i python3 -p python3Packages.py-libzfs
import libzfs
def collect_all_datasets(dataset, all_datasets):
"""
Recursively collects all datasets from a given dataset and its children.
Args:
dataset: The starting dataset.
@surfaceflinger
surfaceflinger / opkg_list_installed.sh
Created June 27, 2024 16:11 — forked from benok/opkg_list_installed.sh
[entware] List up manually installed packages
#!/bin/ash
list_pkgs() {
opkg list-installed | cut -f 1 -d " "
}
show_deps() {
opkg depends $1 | sed -e 1d -e 's/^\s*//'
}
@surfaceflinger
surfaceflinger / flac_to_ogg.sh
Created November 10, 2023 20:52
Recursive, "multithreaded" music converter in bash. 1:1 Copies everything that isn't a flac to keep ur box art scans, covers and already lossy files.
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p opusTools
# Set source and target directories
src_dir="/vol/ikea/Media/Music/Ready"
target_dir="/vol/ikea/Media/Music/Essa"
# Number of allowed threads
max_threads=2
log-upload.hoyoverse.com
log-upload-os.hoyoverse.com
public-data-api.hoyoverse.com
sg-public-data-api.hoyoverse.com
log-upload.mihoyo.com
log-upload-os.mihoyo.com
public-data-api.mihoyo.com
sg-public-data-api.mihoyo.com
@surfaceflinger
surfaceflinger / moto-g60-gsi-update.md
Last active August 31, 2024 14:22
Update firmware and install/update GSI on motorola moto g60 (hanoip)
  1. First, download latest stock firmware from lolinet. You probably want those which names begin with RET but tbh I don't know what the difference is between them. Personally, I used RETEU because that's what I had from factory.
  2. Download latest "Light" variant of LineageOS 20 GSI. You can find everything here. "Light" variant has limited compatibility with legacy devices, but it works PERFECTLY on hanoip.
  3. Unpack stock firmware into stock directory.
  4. Unpack GSI into gsi directory and rename it to system.img.
  5. Make sure that you have files structure like this:
nat@blahaj [~/Downloads] ✨ tree
.
├── gsi-update.sh
├── gsi
@surfaceflinger
surfaceflinger / dell-optiplex-9020sff-uefi
Last active December 26, 2023 12:24
Minimal coreboot+SeaBIOS/EDK2 configs for devices that I own.
# Cherry-pick https://review.coreboot.org/c/coreboot/+/55232
# Display not working on dedicated GPUs, needs working setup IntelGopDriver which I can't figure out :/
# If you need to change bootorder, UEFI settings etc. - connect DisplayPort to the motherboard.
# Internal flashing is available once you short service mode pins near PCIe and boot with iomem=relaxed.
# If you bricked your board then
# 4MB flash is MX25L3273E
# 8MB flash is MX25L6473F
# Base
CONFIG_VENDOR_DELL=y