Skip to content

Instantly share code, notes, and snippets.

View abouolia's full-sized avatar
🤠

Ahmed Bouhuolia abouolia

🤠
View GitHub Profile
@Lurrobert
Lurrobert / SPEC.md
Last active November 3, 2026 11:38
SPEC.md: 3Blue1Brown-style explainer videos made entirely by Claude. The explaining rules (term budget), look, voice, music recipe, mix, export, and a paste-in prompt to build your own.

SPEC.md: 3Blue1Brown-style explainer videos, made entirely by Claude

A frame from the superconductor video: the new term "critical temperature" appears in yellow beside the formula T < T_c and a thermometer

I wanted to finally understand materials science, so I had Claude make me 3Blue1Brown-style explainer videos about it. Dark canvas, formulas that write themselves on in color, a calm narrator, a soft piano score. Four videos so far (6 to 15 minutes each), a few evenings with Claude Code + Opus 5.5. I never opened a video editor.

The first version was unwatchable. It introduced 50 new terms in 7 minutes and I did not understand half of it myself. So I had Claude study how Grant Sanderson actually explains things, measure it, and turn it into rules. The rules are the part worth sharing. The rest of this file is every setting you need to rebuild the whole thing: look, voice, music, mix, export, and a prom

@zarv1k
zarv1k / abstract-unique-validator.ts
Last active October 21, 2026 12:06
Unique Validator Example for NestJS
import { ValidationArguments, ValidatorConstraintInterface } from 'class-validator';
import { Connection, EntitySchema, FindConditions, ObjectType } from 'typeorm';
interface UniqueValidationArguments<E> extends ValidationArguments {
constraints: [
ObjectType<E> | EntitySchema<E> | string,
((validationArguments: ValidationArguments) => FindConditions<E>) | keyof E,
];
}
@OliverJAsh
OliverJAsh / foo.tsx
Last active August 15, 2023 06:43
TypeScript React HOC using `forwardRef`
import * as React from 'react';
import { Component, ComponentClass, createRef, forwardRef, Ref } from 'react';
const myHoc = <ComposedComponentProps extends {}>(
ComposedComponent: ComponentClass<ComposedComponentProps>,
) => {
type ComposedComponentInstance = InstanceType<typeof ComposedComponent>;
type WrapperComponentProps = ComposedComponentProps & {
wrapperComponentProp: number;
@skbr1234
skbr1234 / default nginx configuration file
Last active December 17, 2025 23:35
The default nginx configuration file inside /etc/nginx/sites-available/default
# Author: Zameer Ansari
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@domenic
domenic / 1-service-worker.js
Last active December 11, 2024 13:52
Service worker stream transferring
"use strict";
const worker = new Worker("worker.js");
self.onfetch = e => {
const transform = new TransformStream(); // creates an identity transform
e.respondWith(new Response(transform.readable));
// Give the worker the writable end. An identity transform stream will just shuffle
// bytes written there into transform.readable.
@vasanthk
vasanthk / System Design.md
Last active November 8, 2026 12:16
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@paulirish
paulirish / what-forces-layout.md
Last active November 10, 2026 16:53
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
<?php
/**
* Escape all translations with
*/
__( ‘Some String’, ‘text-domain’ ); _e( ‘Some string’, ‘text-domain’ );.
/**
* When there is no HTML use:
*/
@ohanhi
ohanhi / frp.md
Last active September 15, 2026 15:04
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note