Skip to content

Instantly share code, notes, and snippets.

View surfaceflinger's full-sized avatar
🖤
i walk around strange

surfaceflinger

🖤
i walk around strange
View GitHub Profile
@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 December 20, 2023 04:13
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
@surfaceflinger
surfaceflinger / worker.js
Created October 15, 2022 22:07
cloudflare worker -> oracle cloud object storage proxy
addEventListener('fetch', event => {
handleRequest(event);
})
/**
* Respond to the request
* @param {Request} request
*/
async function handleRequest(event) {
var url = new URL(event.request.url);
@surfaceflinger
surfaceflinger / hostname.vio0
Created May 21, 2021 13:45
netcup IPv6 interface configuration for OpenBSD
inet xxx.xxx.xxx.xxx 255.255.252.0 NONE
inet6 xxxx:xxxx:xxxx:xxxx::1 64
up
!route add -inet default 188.68.52.1
!route add -inet6 :: fe80::1%vio0
#!/usr/sbin/nft -f
# Hook order is: ingress -> prerouting -> input/output/forward -> postrouting
# Start by flushing all the rules.
flush ruleset
# Defining variables is easy in nftables scripts.
define wan = eth0
define vpn = wg0
@surfaceflinger
surfaceflinger / media-rescan.sh
Last active November 7, 2022 21:46
Android thingies
#!/bin/sh
adb shell am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///sdcard/ -p com.android.providers.media