This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import json | |
with open('tweets.js') as f: | |
tweets_str = f.read() | |
# assume the prefix is universally the same ('window.YTD.tweets.part0 = ') | |
tweets_json = json.loads(tweets_str[26:]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* So how does this work? | |
I'm using ANSI escape sequences to control the behavior of the terminal while | |
cat is outputting the text. I deliberately place these control sequences inside | |
comments so the C++ compiler doesn't try to treat them as code.*/ | |
//[2K[2D[A[2K[A[2K[A[2K[A[2K[A | |
/*The commands in the fake code comment move the cursor to the left edge and | |
clear out the line, allowing the fake code to take the place of the real code. | |
And this explanation uses similar commands to wipe itself out too. */ | |
//[2K[2D[A[2K[A[2K[A[2K[A | |
#include <cstdio> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://twitter.com/lunasorcery/status/1295847638840020992 | |
echo "[ Now building... 4 hours remaining ]" | |
sleep 3 | |
echo "You can skip the wait by spending 40 gems." | |
echo "What would you like to do?" | |
read -p "> " | |
sleep 1 | |
echo "You don't have any gems to spend!" | |
echo "What would you like to do?" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
killall "⠀⠀⠀⠀⠀⠀⠀⢠⢦⡀⠀⡰⣩⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀" | |
killall "⠀⠀⠀⠀⠀⠀⠀⠘⣄⠙⠍⠁⠙⠦⡀⠀⠀⠀⠀⠀⠀⠀⠀" | |
killall "⠀⠀⠀⠀⠀⠀⠀⠀⡎⠀⠀⡠⠄⠔⠊⠉⠒⠒⠒⢄⠀⠀⠀" | |
killall "⠀⠀⠀⠀⠀⠀⠀⢀⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢈⠆⠀⠀" | |
killall "⠀⠀⢠⢤⠜⡆⠀⢸⠀⠰⣄⠀⠀⠀⠀⠀⠀⠀⣠⠎⠀⠀⠀" | |
killall "⠀⠀⠱⠤⡁⠈⠑⠇⠀⠀⠀⠉⠒⠤⠤⠄⢖⠊⠀⡐⠧⣄⣀" | |
killall "⠀⠀⠀⠀⠘⢆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⡉⠀⣀⣨⡷" | |
killall "⠀⠀⠀⠀⠀⠈⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢱⠜⠁⠀⠀" | |
killall "⠀⠀⠀⠀⠀⠀⢇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣸⠱⡀⠀" | |
killall "⠀⠀⠀⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠁⠀⣣⠀" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; partial disassembly from Drome Racers (GBA, 2003) | |
; fill a flat-colored 2D polygon that's fully inside screen bounds | |
_WW080006B4_jump_entry1_colored_inbounds_poly: | |
str r0, [sp, #4] ; back up our current renderstream pointer | |
; read three verts from the renderstream into (r1,r2,r3) | |
ldr r1, [r0, #12] | |
ldr r2, [r0, #16] | |
ldr r3, [r0, #20] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; EU 0x087E70E0 / NA 0x087E4230: | |
; loaded to RAM at 030008f0 | |
; sprite decompression function (8bit indexed) | |
; r0: compressed sprite source ptr | |
; r1: vram destination ptr | |
; r2: width | |
; r3: height | |
.arm | |
add lr, lr, #1 | |
stmdb sp!, {r4-r9} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <cstdint> | |
// bit layout: | |
// +-1-+ | |
// 8 2 | |
// +-4-+ | |
bool matchHorizontal(uint8_t left, uint8_t right) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define SUPPRESS_SUBSCRIPT_WARNING 1 | |
#include <iostream> | |
#include <string> | |
#include <random> | |
const int kMaxDepth = 5; | |
std::string emptyString(int depth=0, bool singular=false) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 410 core | |
uniform float fGlobalTime; // in seconds | |
uniform vec2 v2Resolution; // viewport resolution (in pixels) | |
uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq | |
uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients | |
uniform sampler1D texFFTIntegrated; // this is continually increasing | |
uniform sampler2D texChecker; | |
uniform sampler2D texNoise; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replace 104 bytes at $3204 with the following. | |
This stores the animated color palette for the letters, and the static color palette for the shimmer. | |
16 70 E0 01 1E 68 B0 01 1F 7C F0 01 0B 64 E0 01 | |
1D 50 60 01 1F 7C F0 01 0B 64 E0 01 1D 50 60 01 | |
1F 7C F0 01 0B 64 E0 01 1D 50 60 01 1F 7C F0 01 | |
0B 64 E0 01 1D 50 60 01 1F 7C F0 01 0B 64 E0 01 | |
1D 50 60 01 1F 7C F0 01 0B 64 E0 01 1D 50 60 01 | |
1F 7C F0 01 1F 7C F0 01 1F 7C F0 01 1F 7C F0 01 | |
1F 00 FF 7F F7 5E EF 3D |
NewerOlder