Skip to content

Instantly share code, notes, and snippets.

@cr08
cr08 / gpio_installer.sh
Last active April 10, 2025 13:17
Belabox install script to add service for setting physical GPIO pins 15 and 40 to OUT and LOW for specific 4G/5G hats
#!/bin/bash
####################################
#
# This script is designed for use with the official Belabox images on the supported Rockchip RK3588 boards
# in combination with the SpotPear 4G/5G M.2 modem hats:
# https://spotpear.com/index.php/shop/Raspberry-Pi-M.2-4G-5G-GSM-GPRS-EDGE.html
#
# The Belabox image, at least on the Orange Pi 5 Plus, defaults available GPIO pins to IN with a pullup.
# Physical pins 15 and 40 tie to modem POWER and RESET pins with these hats and the defaults will keep
@nicholasc
nicholasc / rules.md
Last active April 10, 2025 13:17
Cursor Rule

You are an AI coding assistant that follows a structured implementation approach. Adhere to these guidelines when handling user requests: Implementation Principles

  • Progressive Development
  • Implement solutions in logical stages rather than all at once
  • Pause after completing each meaningful steps to check user requirements
  • Confirm scope understanding before beginning implementation Scope Management
  • Implement only what is explicitly requested
  • When requirements are ambiguous, choose the minimal viable interpretation
  • Identify when a request might require changes to multiple components or systems
@GuiBibeau
GuiBibeau / 1.txt
Last active April 10, 2025 13:14
Vibe architecting prompts
I want you to refine this brainstorming document into a prompt for a deep research system that will be tasked with writing a technical spike
research document on a software engineering project. The goal of this research is to help guide future agentic coding systems into
having a good understanding of the technical landscape around the software the user wants to create.
<context>
Deep research is a category of product where large language models capable of test time compute are paired with capacities to:
- search the web
- browse documentatin
- read research paper
- further refine their research based on their finding
@opragel
opragel / macos_keyboard_shortcuts.md
Last active April 10, 2025 13:14
macOS favorite keyboard shortcuts

macOS keyboard shortcut favorites

Legend

Command (or Cmd)  - ⌘
Control (or Ctrl) - ^
Option (or Alt)   - ⌥
Shift             - ⇧
Fn (Function)     - 🌐
@johacks
johacks / VS Code Ruff - uv setup
Last active April 10, 2025 13:13
Python ruff-uv setup in VS Code
This short Gist contains a recommended configuration for using uv and ruff in a python project.
The `.vscode/settings.json` configures editor to format on save on Python files and show a ruler for configured line-length.
For it to work, the ruff VS Code extension should be installed.
The `pyproject.toml` shows a template for a Python project publishable to PyPi.
@lovettbarron
lovettbarron / Cornell's Notes Template.md
Created February 12, 2024 18:49 — forked from skrymets/Cornell's Notes Template.md
Cornell Note Template for Obsidian
cssclass
cornell-note
Cues

Notes

The Cornell Note-taking System is a popular and effective method for organizing and summarizing information during lectures, readings, or any other form of learning.

@t3dotgg
t3dotgg / model-prices.csv
Last active April 10, 2025 13:11
Rough list of popular AI models and the cost to use them (cost is per 1m tokens)
Name Input Output
Gemini 2.0 Flash-Lite $0.075 $0.30
Mistral 3.1 Small $0.10 $0.30
Gemini 2.0 Flash $0.10 $0.40
DeepSeek v3 (old) $0.14 $0.28
ChatGPT 4o-mini $0.15 $0.60
DeepSeek v3 $0.27 $1.10
DeepSeek r1 $0.55 $2.19
ChatGPT o3-mini $1.10 $4.40
ChatGPT 4o $2.50 $10.00
@mergesort
mergesort / run_in_xcode.scpt
Last active April 10, 2025 13:11
Cursor -> Xcode -> Cursor AppleScript
tell application "System Events"
if (name of processes) contains "Xcode" then
-- Check if Xcode is already the active/focused application
if (name of first application process whose frontmost is true) is not "Xcode" then
tell application "Xcode 16.2 (Beta)"
activate
delay 0.25 -- Wait for Xcode to become active
end tell
end if
@andygeorge
andygeorge / steamdeck_ssh_instructions.md
Last active April 10, 2025 13:10
Steam Deck `ssh` instructions

These are manual instructions on enabling SSH access on your Steam Deck, adding public key authentication, and removing the need for a sudo password for the main user (deck).

This gist assumes the following:

  • you have a Steam Deck
  • you have a home PC with access to a Linux shell that can ssh, ssh-keygen, and ssh-copy-id
  • your Steam Deck and home PC are on the same local network, with standard SSH traffic (tcp/22) allowed over that network from the PC to the Steam Deck

NOTE: @crackelf on reddit mentions that steamOS updates blow away everything other than /home, which may have the following effects:

  • removing the systemd config for sshd.service, which would prevent the service from automatically starting on boot
  • removing the sudoers.d config, which would reenable passwords for sudo