Skip to content

Instantly share code, notes, and snippets.

View crabl's full-sized avatar
ship it

Chris Rabl crabl

ship it
View GitHub Profile
@crabl
crabl / CLAUDE.md
Created July 16, 2025 07:07
CLAUDE.md for Rapid Prototyping

Project Development Guide

⚠️ IMPORTANT: DO NOT WRITE ANY STYLING CODE UNLESS EXPLICITLY DIRECTED ⚠️

FOCUS ON INFORMATION ARCHITECTURE AND CORE FUNCTIONALITY FIRST. KEEP ALL COMPONENTS BAREBONES WITHOUT STYLING.

STYLING RESTRICTIONS:

  • NO className attributes (even "container", "header", etc.)
  • NO style attributes or inline styles unless explicitly requested
  • NO CSS files or styled-components
  • NO layout divs solely for styling purposes

REST API Design Guide

Introduction

JSON API is a specification based on http://jsonapi.org/format/.

Conventions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be

@crabl
crabl / gist:7149491
Last active December 26, 2015 12:09
Get time from RDTSC
inline __int64 TimeFromTSC() {
// written by crabl
// and inspired by http://www.ccsl.carleton.ca/~jamuir/rdtscpm1.pdf
struct { __int32 lo, hi; } timestamp;
__asm push EAX
__asm push EBX
__asm cpuid
__asm rdtsc
__asm mov timestamp.lo, EAX

Created by Christopher Manning

Summary

Kaprekar's constant is 6174. The Kaprekar Routine arranges four digits (zeros are appended to the number if it's less than 4 digits) in descending and ascending order, subtracts those two numbers, and repeats the process until the difference is 0 (degenrate case) or 6174 (Kaprekar's constant). The color is HSL with a scale of 0 to 300 in the

@crabl
crabl / gist:5516985
Created May 4, 2013 09:40
Expanding jquery
<!doctype html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Registration Form</title>
<script type='text/javascript' src='http://code.jquery.com/jquery-1.7.js'></script>
<style type='text/css'>
body {