Skip to content

Instantly share code, notes, and snippets.

View rob4226's full-sized avatar
💭
Working on ESP32 Projects

Rob rob4226

💭
Working on ESP32 Projects
View GitHub Profile
@yorickdowne
yorickdowne / friday.md
Last active May 2, 2026 04:50
Debian 13 trixie upgrade

Debian 13 "Trixie"

Caution On systems with more than one EFI partition, such as systems set up for RAID with mdadm, grub-efi only upgrades one of the EFI partitions, the one mounted to /boot/efi. This can cause failure on reboot, with the system going into BIOS or EFI shell. Discussion here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1135137
See bottom of this gist for a way to verify EFI before rebooting, and upgrading the second copy so a reboot is safe

To start, read the official release notes.

If your install fits into "vanilla Debian plus maybe a handful of 3rd-party repos", then this guide for a simple upgrade to Debian 13 "trixie" from Debian 12 "bookworm" can be helpful. 3rd-party repos are handled with a find command.

@Windows81
Windows81 / extension.bundle.js
Last active July 17, 2025 11:58
Pylance 2024.2.103 is officially compatible with Codium! F*** coPyrights!
/*var getStackTrace = function () {
var obj = {};
Error.captureStackTrace(obj, getStackTrace);
return obj.stack;
};*/
function a0_0x2022(_0xcf00d8, _0x46623d) {
const _0xf90af8 = a0_0xf90a();
return (
(a0_0x2022 = function (_0x2022ef, _0xef2f2) {
@MarkusH
MarkusH / serial-to-identity.sql
Last active March 11, 2025 23:24
A script that outputs the raw SQL to convert Django's serial columns to identity columns.
WITH tab AS (
SELECT
a.attrelid::regclass::text AS t,
a.attname AS c,
pg_get_serial_sequence(a.attrelid::regclass::text, a.attname) AS s,
nextval(pg_get_serial_sequence(a.attrelid::regclass::text, a.attname)) AS v
FROM pg_attribute a
JOIN pg_class c ON c.oid = a.attrelid
WHERE
a.attrelid::regclass::text LIKE '%'
@Someguy123
Someguy123 / debian-initramfs-ipv6-hook-script
Last active August 18, 2025 18:05 — forked from zajdee/debian-initramfs-ipv6-hook-script
Scripts to support IPv6 networking in Debian pre-boot (initramfs) environment
#!/bin/sh
##########################################################################################
# Script to be placed in /etc/initramfs-tools/hooks/ipv6
#
# These initramfs IPv6 scripts were originally made by zajdee, and were modified by Someguy123
# at Privex Inc. ( https://www.privex.io ) to fix some issues and add debug logging.
#
# It can be found online here: https://gist.github.com/Someguy123/8092bdc9834aa210fb4bd1523e9a1c38
#
# (Original Gist this was based off of (broken script!): https://gist.github.com/zajdee/65aad61f35d3a63c56c7d1cc76c22e14)
@laroo
laroo / NMEA_NEO-6M.txt
Created March 15, 2023 23:56
NMEA commands for u-blox NEO-6M gps receiver
# Disabling all NMEA sentences
$PUBX,40,GGA,0,0,0,0*5A // Disable GGA
$PUBX,40,GLL,0,0,0,0*5C // Disable GLL
$PUBX,40,GSA,0,0,0,0*4E // Disable GSA
$PUBX,40,GSV,0,0,0,0*59 // Disable GSV
$PUBX,40,RMC,0,0,0,0*47 // Disable RMC
$PUBX,40,VTG,0,0,0,0*5E // Disable VTG
$PUBX,40,ZDA,0,0,0,0*44 // Disable ZDA
# Enabling all NMEA sentences
@linux-china
linux-china / multipass_completion.fish
Last active October 9, 2025 06:57
multipass shell completion for zsh & bash
complete -c multipass -n "__fish_use_subcommand" -s h -l help -d 'Prints help information'
complete -c multipass -n "__fish_use_subcommand" -s V -l version -d 'Prints version information'
complete -c multipass -n "__fish_use_subcommand" -f -a "delete" -d 'Delete instances'
complete -c multipass -n "__fish_use_subcommand" -f -a "exec" -d 'Run a command on an instance'
complete -c multipass -n "__fish_use_subcommand" -f -a "find" -d 'Display available images to create instances from'
complete -c multipass -n "__fish_use_subcommand" -f -a "get" -d 'Get a configuration setting'
complete -c multipass -n "__fish_use_subcommand" -f -a "help" -d 'Display help about a command'
complete -c multipass -n "__fish_use_subcommand" -f -a "info" -d 'Display information about instances'
complete -c multipass -n "__fish_use_subcommand" -f -a "launch" -d 'Create and start an Ubuntu instance'
complete -c multipass -n "__fish_use_subcommand" -f -a "list" -d 'List all available instances'
@kakha13
kakha13 / SMART_BANNER_height
Last active July 16, 2021 23:28
How to get nativescript-plugin-firebase admob SMART_BANNER height
First we are getting screen size and then doing calculations with SMART_BANNER logics
const platform = require("platform") // import this
......
const screenHeightDp =platform.screen.mainScreen.heightPixels / platform.screen.mainScreen.scale; // height divided by scale
const BannerHeight = screenHeightDp > 720 ? 90 : screenHeightDp > 400 ? 50 : 32; // doing calculations as smart banner works
console.log(BannerHeight); // this is our banner height
@mss
mss / ifupdown-to-netplan.txt
Last active November 26, 2025 08:45
Migrate from ifupdown to netplan
# Tested on an upgraded Ubuntu 20.04
apt install netplan.io
systemctl unmask systemd-networkd.service
systemctl unmask systemd-resolved.service
ENABLE_TEST_COMMANDS=1 netplan migrate
netplan try
reboot
apt purge ifupdown resolvconf
ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
@kieranb662
kieranb662 / XcodeKitHelpers.md
Last active October 31, 2024 15:05
[Xcode Editor Notes] Xcodekit Extensions to help make Xcode your own custom text editor.

Xcode Editor Notes

Suggestions

After adding the Extension target to a project

  1. Go to the menu bar -> Product -> Scheme -> Edit Scheme.
  2. Under the info tab change the executable dropdown menu to "Xcode.app".
  3. If you have a testing file add it to the "Arguments Passed On Launch" field under the Arguments tab.