Skip to content

Instantly share code, notes, and snippets.

View raphaelrk's full-sized avatar

Raphael raphaelrk

View GitHub Profile
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
#include<time.h>
#define B 8
#define E 32
#define H 64
#define V 27
@karpathy
karpathy / microgpt.py
Last active September 19, 2026 03:17
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@deezeddd
deezeddd / gist:106b688e28faea4b428816ba4ca61338
Created October 9, 2025 20:37
claude-switch-multi [Used to switch between multiple accounts]
#!/bin/bash
# Claude Code Multi-Account Switcher
# Usage: ./claude-switch-multi.sh [account1|account2|account3|save-current|list|status]
CLAUDE_DIR="$HOME/.claude"

Manage Multiple Claude Code Accounts

Run two Claude Code accounts simultaneously on macOS without re-authenticating by using separate configuration directories.

Steps

  1. Create Separate Config Directories
    mkdir ~/.claude-account1
    mkdir ~/.claude-account2
@vogler
vogler / clean-url-readme-tab.github.com.tamper.js
Last active September 13, 2025 11:18
GitHub: remove `?tab=readme-ov-file` from URL
// ==UserScript==
// @name GitHub: remove `?tab=readme-ov-file` from URL
// @description GitHub: remove `?tab=readme-ov-file` from URL
// @namespace https://gist.github.com/vogler
// @downloadURL https://gist.github.com/vogler/74edff6de37c3a13eeff8c99c6bed910/raw/clean-url-readme-tab.github.com.tamper.js
// @version 0.1
// @author Ralf Vogler
// @match https://github.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com
// @grant none
@kconner
kconner / macOS Internals.md
Last active September 18, 2026 03:39
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@wcandillon
wcandillon / line-sdf.tsx
Last active February 18, 2025 20:00
React Native Line SDF
import React from "react";
import {
Canvas,
Skia,
Shader,
Fill,
vec,
useTouchHandler,
useValue,
useComputedValue,
@WebReflection
WebReflection / esx.md
Last active October 6, 2024 12:35
Proposal: an ESX for JS implementation
@EllyLoel
EllyLoel / reset.css
Last active July 28, 2026 20:03
CSS Reset
/*
Made by Elly Loel - https://ellyloel.com/
With inspiration from:
- Josh W Comeau - https://courses.joshwcomeau.com/css-for-js/treasure-trove/010-global-styles/
- Andy Bell - https://piccalil.li/blog/a-modern-css-reset/
- Adam Argyle - https://unpkg.com/open-props@1.3.16/normalize.min.css / https://codepen.io/argyleink/pen/KKvRORE
Notes:
- `:where()` is used to lower specificity for easy overriding.
*/
@siboehm
siboehm / site_search_urls.md
Last active August 17, 2025 19:30
Collection of site search urls

Site-specific search URLs

These work in Firefox and Chrome, where %s is replaced with the search query. For Raycast and Alfred, the %s should be replaced with {query}. For more details also see my blogpost.

How to add

  • Chrome: Settings -> Search engine -> Manage search engines and site search -> Add
  • Firefox: Bookmarks -> Manage Bookmarks -> Add Bookmark, then set the keyword to the desired shortcut

I recommend picking keywords that are easy to memorize, like am=Amazon, an=Anaconda, gi=Github,... and switching to three letters when the two letter abbreviation appears to commonly in a sentence (eg goi=Google images, gom=Google Maps).