Skip to content

Instantly share code, notes, and snippets.

@ravarcheon
ravarcheon / theHorse.js
Last active March 12, 2026 21:12
the horse that blocks your screen after a 2 minutes
// ==UserScript==
// @name the horse that stands in your way
// @namespace http://tampermonkey.net/
// @version 2026-03-01
// @description no more than 2 minutes of twitter. the first minute is a clear view, the second minute is where the horse slowly fades in. third minute and beyond there is nothing to see except horse
// @author You
// @match http://*.x.com/*
// @match https://*.x.com/*
// @match http://*.instagram.com/*
// @match https://*.instagram.com/*
"""
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
@ashbinary
ashbinary / BANRAPorter.py
Last active July 1, 2024 01:43
A Luigi's Mansion: Dark Moon save file porter.
import sys
import struct
from pathlib import Path
# Script created by ashbinary
# Thanks to https://github.com/TollyH/LM2_SaveEditor/ for the save file binary templates and some code references
# Declare unchanging values
VERSION_OFFSET = 0x22
GAME_CRC_OFFSET = 0x1A
#!/usr/bin/env python3
# Download your data dump and place this file in the "messages" folder of your data dump.
# Run it using python
from datetime import datetime, timedelta, timezone
import dateutil.parser
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import matplotlib.dates as mdates
import csv
@ismailkarsli
ismailkarsli / windows-wallpaper.py
Created August 20, 2020 20:27
Simple Python class for get, set and copy wallpaper on Windows
# Wallpaper.get() Get current wallpapers path. For getting as Pillow image object, use True as parameter.
# Wallpaper.set() Set wallpaper. Can be path of image or Pillow object. File type doesn't matter and path can be absolute or relative.
# Wallpaper.copy() - Copy current wallpaper. First parameter is directory and the second is file name. File extension should be JPG. Default directory is current directory and file name is 'wallpaper.jpg'
from os import path, getenv, getcwd
from ctypes import windll
from shutil import copyfile
from PIL import Image
from tempfile import NamedTemporaryFile
@pvieito
pvieito / gist:ee6d2c8934a8f84b9aeb467585277b8a
Last active January 31, 2026 14:12
Consumer keys of official Twitter clients

Twitter API Keys

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for Google TV

Consumer key: iAtYJ4HpUVfIUoNnif1DA