Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Disable Turbo on GitHub
// @namespace https://gist.github.com/PedroHLC/f6f238834f5ebdfaff5c1bf907745fcb
// @version 1.0.13
// @author PedroHLC, Claude
// @description Completely disables Turbo Drive on GitHub
// @match https://github.com/*
// @run-at document-start
// @grant none
// @updateURL https://gist.github.com/PedroHLC/f6f238834f5ebdfaff5c1bf907745fcb/raw/github-nuke-turbo.user.js
// ==UserScript==
// @name Disable Turbo on Basecamp
// @namespace https://gist.github.com/PedroHLC/e4c7225daea6140bd37357eb3afe79c5
// @version 1.0.1
// @author PedroHLC, Claude
// @description Completely disables Turbo Drive and Turbo Frames
// @match https://*.basecamp.com/*
// @run-at document-start
// @grant none
// @updateURL https://gist.github.com/PedroHLC/e4c7225daea6140bd37357eb3afe79c5/raw/basecamp-nuke-turbo.user.js

I'd just like to interject for a moment. What you're referring to as the NixOS stable branch, is in fact, duplication of efforts that should go into nixos-unstable, or as I've recently taken to calling it, the QA mirage.

The stable branch is not a proper, long-term supported component unto itself, but rather a temporary, five-month snapshot of nixos-unstable made functionally useless by the lack of additional tests and the fact that no extra QA is run compared to unstable. All the backporting effort is trashed when the next stable branch is cut from a fresh, future point in nixos-unstable.

Through a peculiar turn of events, the branch widely considered "stable" today is often just called "stable," and many of its users are not aware that it is basically the same system, but one that actively wastes the community's time by forcing them to re-land fixes on a branch that will soon be deprecated. There really is a stable branch, and these people are using it, but it is just a *

#!/usr/bin/awk -f
# from https://forums.rockylinux.org/t/el9-will-require-x86-64-v2-support/5311
BEGIN {
while (!/flags/) if (getline < "/proc/cpuinfo" != 1) exit 1
if (/lm/&&/cmov/&&/cx8/&&/fpu/&&/fxsr/&&/mmx/&&/syscall/&&/sse2/) level = 1
if (level == 1 && /cx16/&&/lahf/&&/popcnt/&&/sse4_1/&&/sse4_2/&&/ssse3/) level = 2
if (level == 2 && /avx/&&/avx2/&&/bmi1/&&/bmi2/&&/f16c/&&/fma/&&/abm/&&/movbe/&&/xsave/) level = 3
if (level == 3 && /avx512f/&&/avx512bw/&&/avx512cd/&&/avx512dq/&&/avx512vl/) level = 4
if (level > 0) { print "CPU supports x86-64-v" level; exit level + 1 }
exit 1
@PedroHLC
PedroHLC / make-pr-not-issues.svg
Created September 5, 2024 13:06
Make Pull requests Not Issues
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@PedroHLC
PedroHLC / gql-validate.js
Created August 19, 2024 14:45
Validates a graphql query from stdin against a schema from http or file
#!/usr/bin/env node
/* Author: Pedro H L Campos <https://keybase.io/pedrohlc>
License: GPL-3.0-or-later <https://spdx.org/licenses/GPL-3.0-or-later.html>
*/
const { Source, buildSchema, buildClientSchema, getIntrospectionQuery, printSchema, validate, parse } = require('graphql');
const fs = require('fs');
async function main(stdin, argv) {
// Remove interpreter and script
argv.shift();
@PedroHLC
PedroHLC / flake.lock
Last active December 12, 2024 08:36
NixOS installation media with CachyOS kernel
{
"nodes": {
"chaotic": {
"inputs": {
"flake-schemas": "flake-schemas",
"home-manager": "home-manager",
"jovian": "jovian",
"nixpkgs": "nixpkgs"
},
"locked": {
@PedroHLC
PedroHLC / 00-disambiguation.md
Last active November 7, 2024 18:29
The most basic tutorial for Nix
  • Nix (uppercase N): a Domain-specific language with meta language roots;

  • nix (lowercase N): a CLI toolkit developed by NixOS Foundation which core's to evaluating Nix;

  • Nix's ecossystem (Written with Nix or using nix):

    • Nixpkgs: repository of all united efforts related to packaging programs and creating a system to run them;
    • NixOS: a Linux-distro, subproduct of Nixpkgs;
    • Home-manager: a dotfiles manager using Nixpkgs;
    • Impermanence: Immutable RootFS for NixOS;
    • Flake: Declarative description (artifacts and depedencies) for Nix's projects (our take on NPM's package.json);
  • Anything else under github:NixOS, under github:nix-community, public repositories with a /flake.nix, or public repositories with a /default.nix.

# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "addr2line"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
dependencies = [
Moved to https://github.com/PedroHLC/nix-ullib