Skip to content

Instantly share code, notes, and snippets.

@dikaio
dikaio / microgpt.py
Created February 13, 2026 02:57 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and inference 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
@dikaio
dikaio / continents.csv
Last active April 9, 2025 02:38
Continent > Country > Region > City
id name slug
1 Africa africa
2 Americas americas
3 Antarctica antarctica
4 Asia asia
5 Europe europe
6 Oceania oceania
@dikaio
dikaio / country-dial-codes.json
Last active July 28, 2024 16:33
Country Dial Codes
[
{
"name": "Afghanistan",
"code": "AF",
"emoji": "🇦🇫",
"image": "https://cdn.jsdelivr.net/gh/lipis/flag-icons@7.2.3/flags/4x3/af.svg",
"dialCodes": [
"+93"
],
"slug": "afghanistan"
@dikaio
dikaio / box-shadow.md
Created December 20, 2023 05:29
Realistic Box Shadows

Realistic CSS Shadows

box-shadow: x, y, blur, spread, color

Alpha 5%

box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.05)
box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.05)
box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.05)
@dikaio
dikaio / README.MD
Created May 19, 2023 22:12 — forked from RichardBronosky/README.MD
cb - A leak-proof tee to the clipboard - Unify the copy and paste commands into one intelligent chainable command.

cb

A leak-proof tee to the clipboard

This script is modeled after tee (see [man tee][2]) and works on Linux, macOS, Cygwin, WSL/WSL2

It's like your normal copy and paste commands, but unified and able to sense when you want it to be chainable.

This project started as an answer to the StackOverflow question: [How can I copy the output of a command directly into my clipboard?][3]

@dikaio
dikaio / wealth-preservation.md
Created April 20, 2023 21:46
There's a reason why you people pay more in taxes to the U.S. Government than the most wealthy people in the world. Learn.

Wealth Preservation

The rich avoid taxes with a strategy “Buy, Borrow, Die”:

  1. Buy assets & hold (to avoid capital gains tax)

  2. Use assets as collateral to borrow money (while assets appreciate)

  3. Interest paid on loans is a tax deduction

@dikaio
dikaio / fetch-strategies.tsx
Created April 20, 2023 02:29
Example nextjs fetch strategy using both SSG and SSR
import Image from 'next/image'
import { Layout, Text, Page, Code, Link, List } from '@vercel/examples-ui'
import { GetStaticProps } from 'next'
import useSWR from 'swr'
import { useEffect, useState } from 'react'
import board from '../public/board.jpg'
interface Product {
id: string
@dikaio
dikaio / i18n.md
Last active April 17, 2023 01:27
Internationalization

Internationalization

North America

  • United States
    • English: en-US
  • Canada
    • English: en-CA
  • Mexico
  • Spanish: es-MX
@dikaio
dikaio / header-ux.tsx
Created April 11, 2023 00:32
Simple Fade in Fade out navigation menu using framer motion
"use client"
import { useEffect } from "react"
import Link from "next/link"
import {
motion,
useMotionTemplate,
useMotionValue,
useScroll,
useTransform,
whois 100.64.0.31
% IANA WHOIS server
% for more information on IANA, visit http://www.iana.org
% This query returned 1 object
refer: whois.arin.net
inetnum: 100.0.0.0 - 100.255.255.255
organisation: ARIN
status: ALLOCATED