Skip to content

Instantly share code, notes, and snippets.

View shyndman's full-sized avatar
🎨

Scott Hyndman shyndman

🎨
View GitHub Profile
#!/usr/bin/env zsh
# Multi-project worktree manager with Claude support
#
# ASSUMPTIONS & SETUP:
# - Your git projects live in: ~/projects/
# - Worktrees will be created in: ~/projects/worktrees/<project>/<branch>
# - New branches will be named: <your-username>/<feature-name>
#
# DIRECTORY STRUCTURE EXAMPLE:
# ~/projects/
@faustinoaq
faustinoaq / help.md
Last active September 2, 2025 00:03
Recover ZFS boot disk in Ubuntu 22.04.4

Recovery

TL;DR: for some weird reason zfs was not being loaded in grub, maybe related to this bug?

ATTENTION: I copy pasted some things from my memory so, some things may be mistyped or wrong, proceed with caution or leave a comment ⚠️

insmod zfs
zfs-bootfs (hd1,gpt3) # or whatever is your structure
@throwaway96
throwaway96 / webos-notes.md
Last active June 28, 2025 18:08
Notes about webOS stuff

Debugging apps (inspect)

Inspectability

Developer mode apps (those installed in /media/developer) are inspectable by default. Other apps (e.g., from the LG Content Store) are not inspectable by default, but you can add "inspectable": true to their appinfo.json to enable it. Debugging system apps (i.e., those in /usr/palm/applications) may require a special flag.

Ports

The developer mode app debugger listens on port 9998.

System service and system app debugging uses ports 5885 and 9999, respectively. However, debugging for these is not normally enabled.

Inspecting an app

@renderedSafe
renderedSafe / diffbot_system.cpp
Last active April 18, 2025 12:00
ROS2 Control Demos diffbot hardware interface publisher. Useful for micro-ROS hardware control.
// Copyright 2021 ros2_control Development Team
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@kiram9
kiram9 / gist:3a5415a015e7e70a4a8c2f9f3f4e623d
Created September 27, 2021 22:59
Framework Laptop port80 codes
//
// SEC Functionality
//
#define SEC_SYSTEM_POWER_ON 0x01 // CPU power on and switch to Protected mode
#define SEC_BEFORE_MICROCODE_PATCH 0x02 // Patching CPU microcode
#define SEC_AFTER_MICROCODE_PATCH 0x03 // Setup Cache as RAM
#define SEC_ACCESS_CSR 0x04 // PCIE MMIO Base Address initial
#define SEC_GENERIC_MSRINIT 0x05 // CPU Generic MSR initial
#define SEC_CPU_SPEEDCFG 0x06 // Setup CPU speed
#define SEC_SETUP_CAR_OK 0x07 // Cache as RAM test
@JDogHerman
JDogHerman / Neewer-RGB660_PRO_ReverseEngNotes.txt
Last active June 21, 2025 22:22
Notes on the reverse engineering of the data for the Neewer-RGB660 PRO leveraging bluetooth low energy.
Notes on the reverse engineering of the data for the Neewer-RGB660 PRO leveraging bluetooth low energy.
NEEWER-RGB660 PRO
02 41 00 0C 00 08 00 04 00 52 0E 00 78 81 01 01 FB
Preamble 02 04 00 0C 00 08 00 04 00 52 0E 00 Value 78 81 01 01 FB
Service UUID: 69400001b5a3f393e0a9e50e24dcca99
Caracteristic: 69400002b5a3f393e0a9e50e24dcca99
Properties: WRITE, WRITE NO RESPONSE
@jvanlier
jvanlier / fast.ai-vision-raspberry-pi-4.md
Last active September 8, 2022 04:45
fast.ai for vision on Raspbery pi 4 (Raspbian)

By default, PyTorch team doesn't release packages for ARM architecture. Luckily, someone is supplying unofficial builds (hats off to this person!).

Fast.ai also has a problem: it depends on spaCy, which also doesn't want to build on ARM by default. I'm not going to do NLP, so will install fast.ai without spaCy.

PyTorch

I initially tried using ARM builds from here:

https://github.com/nmilosev/pytorch-arm-builds

@xaviervia
xaviervia / README.md
Last active February 16, 2021 20:12
Sketch 43 files JSON types
@paulirish
paulirish / what-forces-layout.md
Last active March 15, 2026 16:37
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@pnavarrc
pnavarrc / geocode.py
Last active May 14, 2025 08:54
Using Python requests and the Google Maps Geocoding API
# Using Python requests and the Google Maps Geocoding API.
#
# References:
#
# * http://docs.python-requests.org/en/latest/
# * https://developers.google.com/maps/
import requests
GOOGLE_MAPS_API_URL = 'http://maps.googleapis.com/maps/api/geocode/json'