Skip to content

Instantly share code, notes, and snippets.

View ryanbethel's full-sized avatar

Ryan Bethel ryanbethel

View GitHub Profile
@kristoferjoseph
kristoferjoseph / Claude.md
Created August 9, 2025 19:26
VANILLA JAVASCRIPT WITH ES MODULES guide that requires ABSOLUTELY ZERO BUILD STEPS!

Claude.md - Modern Web Development with Web Components & Architect Framework

🚀 Executive Summary

This guide provides a comprehensive, test-driven approach to building modern web applications using:

  • Frontend: Web Components with Declarative Shadow DOM for true encapsulation and reusability
  • Backend: Architect Framework for serverless AWS infrastructure with minimal configuration
  • Testing: node-tap for TAP-compliant unit testing with excellent TypeScript support
  • Workflow: Agentic test-driven development with small, verifiable iteration steps
function html(strings, ...interpolations) {
return strings
.map((string, i) => {
let value = interpolations[i];
// 0 is falsy but a valid value in HTML
if (value === undefined || value === null || value === false) {
value = "";
}
// join arrays so they aren't stringified with commas
if (Array.isArray(value)) {
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active May 13, 2026 14:11
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@ghinda
ghinda / object-to-form-data.js
Last active May 13, 2025 05:55
JavaScript Object to FormData, with support for nested objects, arrays and File objects. Includes Angular.js usage.
// takes a {} object and returns a FormData object
var objectToFormData = function(obj, form, namespace) {
var fd = form || new FormData();
var formKey;
for(var property in obj) {
if(obj.hasOwnProperty(property)) {
if(namespace) {
@scy
scy / delete-from-repo.md
Created September 20, 2013 11:54
How to delete a file from a Git repository, but not other users' working copies

How to delete a file from a Git repository, but not other users' working copies

Suppose you have, by mistake, added your IDE's project folder (you know, these .idea folders with all kinds of local paths and configuration data and settings in it) to the Git repository of your project. (We're talking about a whole folder here, but the same rules apply to individual files as well.)

Of course, you only realize that two days after the fact and have already pushed it, and your colleagues have already pulled it. They use the same IDE as you do, so whenever they change a setting or fix paths, they can either

  • commit that, causing nasty merge conflicts for you and others or
  • ignore the changes and carry around a modified file until the end of time without ever committing it.

Why .gitignore won't help