Skip to content

Instantly share code, notes, and snippets.

View devidw's full-sized avatar
🌌
realizing reality

David Wolf devidw

🌌
realizing reality
View GitHub Profile
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active July 1, 2026 11:03
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@riipandi
riipandi / optimator.php
Last active June 27, 2023 20:05
WordPress Snippets
<?php defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
/*
* Plugin Name: Optimator
* Plugin URI: https://aris.web.id/
* Description: Some basic WordPress configuration optimization to make it better than default. This plugin contains other simplified plugins and snippets.
* Author: Aris Ripandi
* Author URI: https://aris.web.id/
* Version: 1.0
* License: GPLv3
* Text Domain: optimator
@kantoniak
kantoniak / FigureExtParsedown.class.php
Last active March 6, 2025 15:17
Parsedown extension to wrap single-image lines in <figure>, not <p>. Public domain. See https://github.com/erusev/parsedown/issues/180#issuecomment-451486639
<?php
class FigureExtParsedown extends Parsedown {
// Matches Markdown image definition
private $MarkdownImageRegex = "~^!\[.*?\]\(.*?\)$~";
public function __construct () {
// Add blockFigure to non-exclusive handlers for text starting with !
$this->BlockTypes['!'][] = 'Figure';
@blixt
blixt / OculusQuest.md
Last active April 16, 2026 02:06
Streaming Oculus Quest wirelessly over WiFi to macOS (on a MacBook)

Streaming an Android-based VR headset to your computer

Setting it up the first time

The first time you have to set it up with a cable. The Oculus Quest has a USB-C port (the one used for charging). Use this to connect to your computer.

Preparing your Oculus Quest

Your Quest needs to be in Developer mode. This is super easy, just open your companion app on your phone and go to Settings and enable Developer

@ciiqr
ciiqr / zod-optional-null.ts
Last active June 6, 2026 16:11
zod optional/nullable/nullish differences
// zod schema
z.object({
// valid if string or:
optional: z.string().optional(), // field not provided, or explicitly `undefined`
nullable: z.string().nullable(), // field explicitly `null`
nullish: z.string().nullish(), // field not provided, explicitly `null`, or explicitly `undefined`
});
// type
{
@lushkovsky-s
lushkovsky-s / dump_cursor_notepads.sh
Last active May 10, 2025 19:52
Dump Cursor notepads as JSON (Mac version)
WORKSPACE_ID=$(./get_cursor_workspace_id.sh <path>) sqlite3 "$HOME/Library/Application Support/Cursor/User/workspaceStorage/$WORKSPACE_ID/st
ate.vscdb" "SELECT value FROM ItemTable WHERE key = 'notepad.reactiveStorageId';" | python3 -c "import sys, json; pri
nt(json.dumps(json.loads(sys.stdin.read()), indent=2))" 2>/dev/null | jq '.notepads | to_entries[] | .value | {name:
.name, content: .text} '