Skip to content

Instantly share code, notes, and snippets.

View Qyriad's full-sized avatar

Qyriad Qyriad

View GitHub Profile
@mcat
mcat / implementing-external-link-icons.md
Created March 5, 2025 01:41
A guide to implementing external link icons, generated after multiple turns with claude 3.7
@leminlimez
leminlimez / Domains.md
Last active February 25, 2026 13:31
A deep dive into the iOS backup/restore system

Domains.plist

Documentation of /System/Library/Backup/Domains.plist. File taken from iOS 16.4 iPhone SE 3. The file was removed in iOS 17.0

Values

Values in the plist. Other than SystemDomains, these are not really important and are just here for preservation sake.

A domain in domains.plist contains keys that determine what gets backed up for what types of devices and where (i.e. iCloud vs iTunes). Not all domains have each key. The only 2 keys that must be in every domain are RootPath and RelativePathsToBackupAndRestore. Some domains have the value ShouldDigest. I am not sure exactly what it means but I have included it for documentation purposes.

  • Version: "24.0"
  • SystemDomains: (Dictionary), see below
@kennypete
kennypete / navigating_the_modes_of_Vim.md
Created April 18, 2024 20:46
Navigating the modes of Vim

Navigating the modes of Vim

This diagram illustrates navigating through Vim’s modes. It was built factoring Vim 9 (i.e., all its modes, including up to two new modes, cr and cvr, in November 2023). Information about the state() and 'showmode' is provided too.

SVG version

Some features are only available in the SVG version. It is not provided directly from within this gist’s files because SVGs do not always play nicely in GitHub (particularly, refusing to display embedded fonts).

The SVG version includes hover text help, which shows pertinent information about the underlying key, command, mode, etc.

@aamiaa
aamiaa / RevertNewLayout.md
Last active February 15, 2026 15:48
Revert New Discord Layout

The original snippet no longer works!

On 02/09/2024 at around 8pm UTC, Discord flipped an experiment (2023-09_mobile_redesign_override_toggles) which ignores the layout toggle that this script relied on.

If you want to continue using the old layout, you can either use a modded mobile client (such as Vendetta) to disable that experiment, or downgrade to an old version of the app.

Method 1 - Downgrading (Android)

Tip

Use this one if you want a fast, beginner-friendly solution and don't mind using a version from November 2023

  1. Download version 205.15 of Discord mobile app from ApkMirror
{
pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/refs/tags/22.11-beta.tar.gz") {},
} :
with pkgs;
let
init = pkgs.writeScript "init.sh" ''
#!${pkgs.runtimeShell}
/activate
exec /run/current-system/systemd/lib/systemd/systemd $*
@ram1123
ram1123 / GetLineNumber.py
Last active February 16, 2026 13:58
Get current line number in print statement using python program
import os
from inspect import currentframe
def get_linenumber():
cf = currentframe()
return cf.f_back.f_lineno
print("Current Line number: {}".format(get_linenumber()))
print("Current File name : {}".format(os.path.basename(__file__)))
@ryancdotorg
ryancdotorg / wzip.py
Last active January 25, 2025 22:46
Partial/streaming zip downloader
#!/usr/bin/env python3
# SPDX-License-Identifier: 0BSD or CC0-1.0 or MIT-0 or Unlicense
# Copyright (c) 2023, Ryan Castellucci, No Rights Reserved
import io, sys
import datetime
import argparse
import requests
import operator
import struct
@christianparpart
christianparpart / terminal-synchronized-output.md
Last active January 31, 2026 03:50
Terminal Spec: Synchronized Output

This page has moved!

Please see here: contour-terminal/vt-extensions

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

@iconmaster5326
iconmaster5326 / terraria_player.ksy
Last active May 12, 2024 05:11
This is a Kaitai Struct description file for Terraria .plr files. Do note that some things, such as creative powers, are not yet implemented.
meta:
id: terraria_player
file-extension: plr
endian: le
bit-endian: be
imports:
- vlq_base128_le
doc: |
The format for Terraria player files. This format has only been tested on
Terraria 1.4 (version 234). Note that you must decrypt the file first before
@miguelmota
miguelmota / external_link_arrow.txt
Last active March 11, 2026 20:14
Unicode UTF-8 external link arrow symbol (closest thing to it)