Skip to content

Instantly share code, notes, and snippets.

"""
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
@aravindnc
aravindnc / Activate_Windows_8_8.1_10_and_11_Pro_for_Free.md
Created February 19, 2024 17:15
Activate Windows 8, 8.1, 10 and 11 Pro for Free

Activate Windows 8, 8.1, 10 and 11 Pro for Free

A guide how to get and activate Windows 8, 8.1, 10 and 11 Pro for free!

NOTE

If you see the Windows keyboard button in this guide; and you can't find it on your keyboard, you likely have/had Windows 10 which has the button . If you can't find that one, you likely have a PC that has been upgraded to Windows 8/8.1/10/11 from Windows 8.1/8/7/Vista/XP and other ones. If you have one of those, refer the Windows key button to as yours. A list of them is below:

Windows key buttons

- Windows 11

- Windows 10

@zezhishao
zezhishao / VSCode Copilot代理.md
Last active March 9, 2026 09:20
VSCode Copilot代理

第一步:准备本地代理环境

首先,你的本地电脑必须有一个 HTTP/S 代理服务正在运行。

  • 如果你使用的是常见的网络工具(如 v2ray, Clash, Charles 等),它们通常会在本地开启一个端口(常见的如 78901080)。
  • 请确认你本地代理的端口号(下文假设本地代理端口为 7890)。

第二步:配置 SSH 远程转发 (Remote Forwarding)

我们需要配置 SSH,将远程服务器的某个端口流量转发回本地的代理端口。

Ghostty Keyboard Shortcuts

Default keyboard shortcuts for Ghostty terminal emulator. Platform-specific differences are noted where applicable.

Window Management

Action Windows/Linux macOS
New window Ctrl+Shift+N Cmd+N
Close window Alt+F4 Cmd+Shift+W
@BeadtMODE
BeadtMODE / .deps...npm...@openzeppelin...contracts...access...AccessControl.sol
Created March 9, 2026 09:15
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.34+commit.80d5c536.js&optimize=undefined&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (access/AccessControl.sol)
pragma solidity ^0.8.20;
import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {IERC165, ERC165} from "../utils/introspection/ERC165.sol";
/**

配置步骤:

# 1. 安装 acpx 插件
openclaw plugins install @openclaw/acpx

# 2. 配置 OpenClaw(.OPENCLAW 是你的 config 目录)
openclaw config set plugins.entries.acpx.enabled true
openclaw config set plugins.entries.acpx.config.permissionMode approve-all
openclaw config set acp.enabled true
@figassis
figassis / randomusphones.json
Created December 2, 2018 13:58
1000 valid us phone numbers for testing
["+1-418-543-8090","+1-587-530-2271","+1-404-724-1937","+1-443-307-1473","+1-329-420-1792","+1-770-212-6011","+1-473-522-7496","+1-477-962-3907","+1-478-797-3175","+1-948-914-6246","+1-268-763-5180","+1-369-441-8619","+1-501-926-2756","+1-223-919-0967","+1-328-857-2537","+1-636-613-5429","+1-547-538-9848","+1-523-317-7761","+1-557-680-6290","+1-905-546-5021","+1-975-999-8212","+1-358-342-3321","+1-669-937-7112","+1-506-676-9834","+1-510-518-1673","+1-282-995-0297","+1-667-407-8456","+1-396-518-2124","+1-528-705-6591","+1-395-288-8024","+1-390-949-5954","+1-437-295-3568","+1-227-799-6356","+1-703-363-8155","+1-618-720-3464","+1-557-394-8274","+1-237-257-1580","+1-623-416-0089","+1-533-762-6549","+1-299-471-0213","+1-790-548-2248","+1-469-253-5139","+1-580-303-6087","+1-507-639-8400","+1-269-771-0214","+1-645-818-7021","+1-436-974-4859","+1-952-660-7350","+1-493-885-4329","+1-697-392-0705","+1-744-865-4521","+1-887-526-1105","+1-816-630-9743","+1-496-717-7301","+1-212-475-2813","+1-222-993-6707","+1-868-574-867
@torarnv
torarnv / gist:4967079
Last active March 9, 2026 09:14
Availability macros (Availability.h AvailabilityMacros.h AvailabilityInternal.h) notes
MACOSX_DEPLOYMENT_TARGET environment variable or -mmacosx-min-version= on the command line
results in the define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ being set, which is
then picked up by AvailabilityMacros.h and Availability(Internal).h
The result is MAC_OS_X_VERSION_MIN_REQUIRED being set (AvailabilityMacros.h)
and __MAC_OS_X_VERSION_MIN_REQUIRED (Availability.h)
The same goes for MAC_OS_X_VERSION_MAX_ALLOWED (AvailabilityMacros.h) and
and __MAC_OS_X_VERSION_MAX_ALLOWED (Availability.h), which is set to the
SDK version (unless set, for example to fake/check what happens when building
#!/usr/bin/env bun
"use strict";
const fs = require("fs");
const { execSync } = require("child_process");
const path = require("path");
// ANSI color constants
const c = {
cy: '\033[36m', // cyan
@MrOtherGuy
MrOtherGuy / fx-css-variables.txt
Last active March 9, 2026 09:11
CSS variables used by Firefox
main-window
***********************
--arrowpanel-background
--arrowpanel-border-color
--arrowpanel-color
--arrowpanel-dimmed
--arrowpanel-dimmed-even-further
--arrowpanel-dimmed-further
--arrowpanel-padding
--autocomplete-popup-background