Skip to content

Instantly share code, notes, and snippets.

@weeble
weeble / readme.txt
Last active November 20, 2023 01:53
Void Stranger Mini (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@weeble
weeble / keybase.md
Created June 20, 2023 09:37
Keybase proof of identity

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@weeble
weeble / toplevel.sh
Created February 3, 2022 14:38
Short shell script to run a command at the top level directory of a git repo
#!/bin/sh
if toplevel="$(git rev-parse --show-toplevel)"
then
if cd "$toplevel"
then
exec "$@"
fi
fi
@weeble
weeble / p5js_shifting_sand_land_cubes.js
Created December 28, 2021 17:28
I took an elegant and compact animation by akira2768922 and crudely stuck Mario 64 textures on it
// Based on https://twitter.com/akira2768922/status/1475077131151769613
t=0
let sad,happy,angry,inside
preload=_=>{sad=loadImage("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAABACAYAAAB7jnWuAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5QwcERkTVzgENgAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAf/SURBVGjexZkvdxs7GsZ/zTUQCBAoEAgQKBAoECgYsGBAgcEFgQv2A/QjXFhYsKCwYMGFAQUBCwIuGLBgQIFAgUCAgIGAwQsMBHxOFmhmMnbt2DG5OsfHk/Ej6dX793mVN1bzxN84rvibx+I1YHUmrlyigS/f7rC+/QUwvj+0+edvd5gDc9QZ643jN634DPC4WiMiFMk7E8b32733Cvh55DeAeGK98f2bl5xQXWCC8kqTXF2yuZp9Ds17jeBXl2yujcEY+7yhUic3VZeGoTrw7JzDeY/WevajusiEi3M2nA/vG5rlLcZYimRC36OUogz4UsplYXhqaKXwTUuzXNK0LUopjHUAtMtbnPNY59Bav3gI9ZIAx+yklMJ5j/N1E1CUUpAhlKy1fPn6haZtcd5jjEVrPZlIvTYTqlnoaK0HmzdYa1FKkUJPDIEUYg0zEXLKLJe3KKXQxiBSKEUQESQLMjzvrz/lgbmURmuMsVjnMMbsnAYgxUjsO1KsAljncU2DsXWOAmJKVTARck7klIgxUkrZyQ2/aEBrjfMN7XKJ1galFUhVt+RMSpEUAjmlmUBhZ76xDjeYSkrVQOg7RIQ0m3c0CowxWOfxTYPkTAw9OSVSCKQYKIMq56MKUaAUSikYa/Htc84XycQYgQMCzNVfnUuAQpFqtxTrqWPoYVChOpBqU4yklLChx7V
print([f"Hello, {first_name} {last_name[0]}. Dork." for first_name, last_name in [[next(x for x in (input(prompt) for _ in iter(object, None)) if x) for prompt in ["First Name: ", "Last Name: "]]]][0])
@weeble
weeble / drone_logo_wide.svg
Last active October 5, 2018 16:38
Drone logo redrawn to be symmetrical but keeping the bottom slightly elliptical.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@weeble
weeble / drone_logo_circles.svg
Last active October 5, 2018 16:19
Drone logo redrawn to be symmetrical using pure circles.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@weeble
weeble / gemdrop.py
Last active August 29, 2015 14:05
Bit-twiddling example of gem-drop logic
import numpy as np
def index_of_highest_bit(x):
p = 1
i = 0
while p<x:
p <<= 1
i += 1
return i
from collections import namedtuple
def flatten(xs):
return sum(xs, [])
Node = namedtuple('Node', 'value children')
def leaf(name):
return Node(name, [])
@weeble
weeble / gist:7241969
Created October 30, 2013 23:18
Zap Twitter images
javascript:(function(){var newcss="a.media-thumbnail { display: none; }";if("\v"=="v"){document.createStyleSheet().cssText=newcss}else{var tag=document.createElement("style");tag.type="text/css";document.getElementsByTagName("head")[0].appendChild(tag);tag[(typeof document.body.style.WebkitAppearance=="string")?"innerText":"innerHTML"]=newcss}})();