Skip to content

Instantly share code, notes, and snippets.

@slimsag
slimsag / ramblings.md
Last active December 13, 2023 08:02
Because cross-compiling binaries for Windows is easier than building natively

Because cross-compiling binaries for Windows is easier than building natively

I want Microsoft to do better, want Windows to be a decent development platform-and yet, I constantly see Microsoft playing the open source game: advertising how open-source and developer friendly they are - only to crush developers under the heel of the corporate behemoth's boot.

The people who work at Microsoft are amazing, kind, talented individuals. This is aimed at the company's leadership, who I feel has on many occassions crushed myself and other developers under. It's a plea for help.

The source of truth for the 'open source' C#, C++, Rust, and other Windows SDKs is proprietary

You probably haven't heard of it before, but if you've ever used win32 API bindings in C#, C++, Rust, or other languages, odds are they were generated from a repository called microsoft/win32metadata.

@TheTechRobo
TheTechRobo / how2twitter.avi
Last active September 30, 2023 20:28
How I archive twitter accounts and hashtags and how you can too
Hello!
======
Table of Contents;
The Fast Way
The Thorough Way
Wait, how do I read this file?
Archiving Twitter accounts and hashtags is easy, even without an API key. Here's how!
@alexdelorenzo
alexdelorenzo / noMobile.userscript.js
Created February 8, 2022 01:50
Force desktop interface on Wikipedia and disable Wikipedia's mobile UI
// ==UserScript==
// @name Force desktop Wikipedia
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Disable Wikipedia's mobile UI in favor of its desktop UI
// @author Alex DeLorenzo <AlexDeLorenzo.dev>
// @match https://*.m.wikipedia.org/*
// @grant none
// @license GPL-3.0
// ==/UserScript==
@sub314xxl
sub314xxl / bash_strict_mode.md
Created January 29, 2022 00:09 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@alexdelorenzo
alexdelorenzo / find-mirrors.sh
Last active September 12, 2022 10:11
Find Ubuntu repository mirrors for ARM (armhf & arm64), RISC-V (riscv64), PPC (ppc64el), IBM Z (s390x), and more. For more information and documentation, see: https://alexdelorenzo.dev/notes/ubuntu-mirrors
#!/usr/bin/env bash
# Requires: Bash, GNU grep and parallel, htmlq, and httpie or xh.
# Usage:
# ./find-mirrors.sh ARCH DISTRO REPOSITORY PROTOCOL JOBS
# Example:
# ./find-mirrors.sh armhf focal main https 6
#
# Copyright 2022 Alex DeLorenzo. Licensed under the GPLv3.
#
export ARCH="${1:-${ARCH:-amd64}}"
#!/usr/bin/env bash
export SCRIPT="${1:-airsonic.script}"
export TITLE="Airsonic Podcasts"
export SQL_REGEX="'https?://[^ ,]+','[^']*"
export TABLE="podcast_channel"
export NAME_SEP="','" QUOTE="'"
export FIRST=0 SECOND=1 JOBS=4
@b0gdanw
b0gdanw / DisableBigSur.sh
Last active March 29, 2024 09:50
Disable Big Sur services
#!/bin/zsh
#Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
#Disabling unwanted services on macOS 11 Big Sur (11) and macOS Monterey (12)
#Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
#Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist
# user
TODISABLE=()
@orhun
orhun / arch_linux_installation.md
Last active April 20, 2024 02:56
Notes on my Arch Linux installation: UEFI/Secure Boot + systemd-boot, LUKS-encrypted root (XFS), LUKS-encrypted swap (with hibernate & unlocked via TPM)
@alexdelorenzo
alexdelorenzo / pyclean.py
Last active February 4, 2022 06:09
Clean up Python caches and packaging artifacts. See https://alexdelorenzo.dev/notes/pyclean
#!/usr/bin/env python3
## Author: Alex DeLorenzo
## Homepage: alexdelorenzo.dev
## License: GPLv3
from __future__ import annotations
from typing import Final, AsyncIterable
from shutil import rmtree
from sys import argv
from asyncio import (
gather, to_thread, run, Task,
@eNV25
eNV25 / hp-bios-update.md
Last active May 2, 2024 17:24
Instructions to Update the BIOS/UEFI for an HP Laptop on Linux

Instructions to Update the BIOS/UEFI for an HP Laptop on Linux

To update the BIOS/UEFI firmware requires HP-specific files in the EFI System Partition, also referred to as ESP.

On a Linux system, the ESP is typically mounted on /boot/efi or /efi. Whithin you should also find a EFI directory, e.g. /boot/efi/EFI or /efi/EFI. This article assumes that the ESP is mounted on /efi and that the /efi/EFI directory exists. You can replace that with the mount point your system uses.

The HP-specific files are located in /efi/EFI/HP or /efi/EFI/Hewlet-Packard. These files typically come preinstalled in HP Windows PCs. If you have these files you could skip Install HP-specific files.