Skip to content

Instantly share code, notes, and snippets.

View readyready15728's full-sized avatar
🍞
"Where are the toasters you promised us?"

readyready15728

🍞
"Where are the toasters you promised us?"
View GitHub Profile
@readyready15728
readyready15728 / search_for_404s.py
Last active January 3, 2024 08:51
Quick and dirty search for 404s among Markdown links
# Run like so at repository root directory:
#
# python3 search_for_404s.py > output &
# tail -f output
import glob
import re
import requests
import sys
@readyready15728
readyready15728 / ten-chests.py
Created November 28, 2021 00:02
The Ten Chests
import copy
import random
chests = [
['D', 'D', 'D'],
['D', 'D', 'E'],
['D', 'D', 'R'],
['D', 'E', 'E'],
['D', 'E', 'R'],
['D', 'R', 'R'],
@readyready15728
readyready15728 / not-a-puzzle-for-the-health-addict.py
Last active November 27, 2021 14:18
Not a Puzzle for the Health Addict
cigarettes_per_day = 1
total_cigarettes = 0
day = 0
while total_cigarettes < 200:
total_cigarettes += cigarettes_per_day
print(f'Smoked {cigarettes_per_day} on day {day}, with a total of {total_cigarettes}')
cigarettes_per_day += 7
@readyready15728
readyready15728 / factorial.rb
Created November 25, 2020 23:29
I had a dream about this and had to make it
class Integer
@@memo = {0 => 1}
def factorial
return @@memo[self] if @@memo.include? self
value = self * (self - 1).factorial
@@memo[self] = value
value
end