Skip to content

Instantly share code, notes, and snippets.

/*
MIT License
Copyright (c) 2026 Learned By Error
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is

_hyperscript Language Reference for AI Context

This work is marked CC0 1.0

Overview

_hyperscript is a scripting language for HTML, designed for DOM manipulation and event handling. It uses English-like syntax embedded in HTML attributes: _="..." or data-script="...".


HTMX Reference for AI Context

This work is marked CC0 1.0

Overview

HTMX extends HTML with attributes that enable AJAX requests, CSS transitions, WebSockets, and Server-Sent Events directly in markup. Responses are HTML fragments, not JSON.

Core principle: Server returns HTML, HTMX swaps it into the DOM.

@semanticentity
semanticentity / lewm.js
Last active May 5, 2025 16:46
LEWM: Loom, Except Without Money
javascript:(async function(){
if(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia){
alert("Screen recording not supported");
return;
}
var filename = prompt("Make sure you are in a tab other than the one you are recording.\nEnter filename (no extension):","lewm-recording");
if(!filename) filename = "lewm-recording";
alert("Select a TAB and check 'Share tab audio' in the popup. For audio, do NOT chose full screen or window.");