When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}
# Description: Boxstarter Script | |
# Author: Jess Frazelle <[email protected]> | |
# Last Updated: 2017-09-11 | |
# | |
# Install boxstarter: | |
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# | |
# You might need to set: Set-ExecutionPolicy RemoteSigned | |
# | |
# Run this boxstarter by calling the following from an **elevated** command-prompt: |
#!/bin/bash | |
# Exit on the first command that returns a nonzero code. | |
set -e | |
# Function that checks if a given executable is on the path. If it isn't, prints an install message and exits. | |
# Usage: check_binary EXECUTABLE_NAME INSTALL_MESSAGE | |
check_binary() { | |
if ! which "$1" > /dev/null; then | |
# Using a subshell to redirect output to stderr. It's cleaner this way and will play nice with other redirects. |
#!/usr/bin/env python3 | |
"""Implementation of exponential rate limiter from <https://dotat.at/@/2024-09-02-ewma.html>, | |
but using a single variable `next-time` to store the state.""" | |
import time | |
import math | |
class RateLimiter: | |
def __init__(self, window, limit): | |
self.next_time = 0.0 |