Skip to content

Instantly share code, notes, and snippets.

View wallentx's full-sized avatar
:shipit:
ȋ̴͎ ̶̘͝u̷̥͆s̴͖̾ē̷̠ ̶̟̉a̴͙̕ŗ̸͆č̶̬ḣ̷̭ ̴̡̄b̷̳̒ẗ̷͍ẘ̴̡

William Allen wallentx

:shipit:
ȋ̴͎ ̶̘͝u̷̥͆s̴͖̾ē̷̠ ̶̟̉a̴͙̕ŗ̸͆č̶̬ḣ̷̭ ̴̡̄b̷̳̒ẗ̷͍ẘ̴̡
View GitHub Profile
@pcorpet
pcorpet / get_pylint_enabled_rules.py
Created September 19, 2024 07:47
Script to help migrate Pylint config to Ruff.
#!/usr/bin/python3
# Script to help migrate Pylint config to Ruff.
#
# It lists enabled Pylint rules, Pylint rules that are enabled but already covered by Ruff rules,
# and the Ruff rules not enabled yet that match enabled Pylint rules.
#
# Largely based on https://github.com/astral-sh/ruff/issues/970
import re
import subprocess
from collections.abc import Mapping, Sequence
@tdrkDev
tdrkDev / adb-temp
Created August 5, 2023 21:49
ADB (Termux) temperature monitor
#!/bin/bash
TEST_RUN_FILE="$HOME/Downloads/alo.txt"
TEST_RUN=
round() {
printf '%.0f' "$1"
}
get_stats() {
@thomasantony
thomasantony / chatgpt_parser_md.py
Last active January 11, 2024 13:21
Convert saved HTML transcripts from ChatGPT to Markdown
# Save the transcripts using the "Save Page WE" Chrome Extension
# This script was generated by ChatGPT
import sys
from bs4 import BeautifulSoup
# Check if a file was provided as a command line argument
if len(sys.argv) < 2:
print("Please provide an HTML file as a command line argument.")
sys.exit(1)
@prestwich
prestwich / monorepo.md
Last active November 25, 2022 17:15
How to break up a monorepo :)

How to break up a monorepo using git subtree:

  1. Set up some basic stuff:
    • These should be independent, not nested
$ NEW_REPO_PATH=
$ OLD_REPO_PATH=
@logan2611
logan2611 / DeckforEnthusiasts.md
Last active March 7, 2025 19:28
Deck for Enthusiasts Guide
@elfmimi
elfmimi / reset-usb-sbc.sh
Last active December 18, 2022 07:34
Reset Linux USB subsystem without rebooting
#!/bin/bash
# root privilege required
if cd /sys/bus/platform/drivers/ehci-platform >& /dev/null; then
for dev in *.usb; do
echo -n $dev > unbind
echo -n $dev > bind
done
fi
@Marc-Ducret
Marc-Ducret / IconRenderer.cs
Created May 28, 2022 11:22
Unity Automatic 3D Icons Rendering
using System.Collections.Generic;
using DiceKingdoms.Game;
using DiceKingdoms.Interface;
using Unity.Mathematics;
using UnityEditor;
using UnityEditor.U2D;
using UnityEngine;
using UnityEngine.Experimental.Rendering;
using UnityEngine.U2D;
using Utility;
@FeepingCreature
FeepingCreature / youre_doing_json_apis_wrong.md
Last active March 14, 2025 09:16
You Are Doing JSON APIs Wrong

You are doing JSON APIs wrong.

When you use JSON to call an API - not a REST API, but something like JSON-RPC - you will usually want to encode one of several possible messages.

Your request body looks like this:

{
 "type": "MessageWithA",
@yermulnik
yermulnik / config.yml
Last active April 14, 2025 02:05
GH CLI multi-account switch
git_protocol: ssh
aliases:
personal: '!cp ~/.config/gh/hosts.yml.personal ~/.config/gh/hosts.yml && gh auth status'
work: '!cp ~/.config/gh/hosts.yml.work ~/.config/gh/hosts.yml && gh auth status'
@ChristopherA
ChristopherA / Mermaid_on_Github_Examples.md
Last active May 1, 2025 20:16
Mermaid on Github Examples

Mermaid on Github Examples

All of these diagrams are dynamically rendered during html display by Github, the images generated from text inside the Github-Flavored Markdown. None are static images. Mermaid support was released for Github on 2022-02-14

Pros & Cons:

  • Pro: You don't need to care about the layout.
  • Con: You cannot control the layout.

Notes:

  • Not all the features of Mermaid (in particular symbols B--&gt;C[fa:fa-ban forbidden], hyperlink and tooltips) are supported by Github.