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 | |
################################################################################ | |
# KEY MAP # | |
# # | |
# q Quit game # | |
# Arrow keys Turn towards the direction, or if already facing # | |
# it drive forwards. # | |
# x Drive backwards given the current direction. Use # | |
# arrow keys to turn if necessary. # | |
# u Lift forks, picking up a giffel (@@) if the forks # |
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 <stdio.h> | |
int bar (int *array, int offset, int size) | |
{ | |
__label__ failure; | |
__label__ fail2; | |
int access (int *array, int index) | |
{ | |
if (offset + index >= size) { | |
// This variant crashes GCC (9.4.0-1ubuntu1~20.04.1) |
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
#!/bin/bash | |
# Experiment with bash/sed polyglot for startup. Ideally this would take a seed | |
# on stdin though, and then the bootup code is a bit redundant... | |
set -euo pipefail | |
echo | sed -rnf <(sed '1,/^# STARTSED/s/^/#/' "$0") | |
exit # dummy for sed highlighting | |
# STARTSED |
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 -S LC_CTYPE=C sed -rnf | |
# https://github.com/olsner/synsedizer | |
:loop;s/#.*$//g;s/^\s+//;s/\s+$//;/^r (.*)$/{/ 8000$/s/.*/\x00\x00\x1f@/ | |
/ 16000$/s/.*/\x00\x00\>\x80/;/ 44100$/s/.*/\x00\x00\xacD/ | |
s/^/.snd\x00\x00\x00\x1c\xff\xff\xff\xff\x00\x00\x00\x03/ | |
s/$/\x00\x00\x00\x01\x00\x00\x00\x00\x00/p;beat};/^s (.*)$/{s//S\1/g;H;bleep} | |
/^([abcde]) (.*)$/{s//W\1,1,0,\2,\2/g;H;beat};/^([ABCDE])$/{s/.*/\L&/;G | |
s/^(.)\n((.*\n)*)W\1,[^\n]*/\2/;s/^.\n//;h};:eat;z;n;bloop;:leep; | |
g;s/^\n*/\n/;s/\n*$/\n/;s/\n+/\n/g;s/\nAi*\n/\n/;/\nS/!beat;s/\nS[0-9]+/&-/ | |
s/\nW[^,]*,1,[^\n]+/&-\nAi/g;s/\nW[^,]*,0,[^\n]+/&-\nA-/g;s/^/Aiiiii/;/\nAi/{:ip |
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/sed -rnf | |
# Based on: https://twitter.com/deathbybadger/status/1567425842526945280 | |
# Unfortunately requires an initial line to get started. Press ENTER to start. | |
1{ | |
i\ | |
Poh-Tay-Toe \ | |
=========== \ | |
\ | |
You are a halfling, just trying to exist. \ |
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
static inline int64_t syscall5(uint64_t msg, uint64_t dest, uint64_t arg1, uint64_t arg2, uint64_t arg3, uint64_t arg4) { | |
register int64_t r8 __asm__("r8") = arg3; | |
register int64_t r9 __asm__("r9") = arg4; | |
__asm__ __volatile__ ("syscall" | |
: /* return value(s) */ | |
"=a" (msg), | |
/* clobbered inputs */ | |
"=D" (dest), "=S" (arg1), "=d" (arg2), "=r" (r8), "=r" (r9) | |
: "a" (msg), "D" (dest), "S" (arg1), "d" (arg2), "r" (r8), "r" (r9) | |
: "r10", "r11", "%rcx", "memory"); |
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
MAKEFLAGS += -j21 | |
all: test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 test20 test21 | |
test%: | |
sleep 1 |
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
#!/bin/bash | |
# Usage: source this script, probably in .bashrc | |
# | |
# Update paths to bash-preexec.sh and the elevator music track of your choice to finish up | |
# installation. | |
# Can be combined with wilhelm.bash (https://gist.github.com/olsner/85cf297adb2dc0ee8efa3ccf9c1ab00b) | |
# to indicate failure a bit more dramatically. | |
# from https://github.com/rcaloras/bash-preexec | |
source ~/homestuff/bash/bash-preexec.sh |
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 <iostream> | |
#include <string> | |
#include <vector> | |
#include <cassert> | |
#include <cstdio> | |
#include <unistd.h> | |
#include <sys/ioctl.h> | |
#include <termios.h> |
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
1 i\ | |
RewriteEngine on\ | |
RewriteCond /var/www/rewrite%{REQUEST_FILENAME} -f\ | |
RewriteRule ^.*$ - [L]\ | |
RewriteRule ^/([^q].*)$ qq^$1\ | |
RewriteRule ^/(.*)$ $1\ | |
RewriteRule ^(q.*)q(.*)$ $1qr$2 | |
s/^#.*$// | |
s/\?/Q/g |
NewerOlder