Skip to content

Instantly share code, notes, and snippets.

"""autotracker-bottomup - the quite a few times more ultimate audio experience
by Ben "GreaseMonkey" Russell, 2011. Public domain.
Modified to work with Python 3 by QuotePilgrim. This was probably not done in
the most elegant way, all I did was run the script through 2to3 and added an if
statement to the write() function to convert strings to binary data. The correct
encoding that resulted in a working .it file was found by trial and error.
A copy of the original file can be found at:
https://github.com/wibblymat/ld24/blob/master/autotracker.py
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Current Time</title>
<link id="favicon" rel="icon" href="">
<style>
body {
background-color: #202020;
#!/bin/bash
# This script is used to package a game made with the LÖVE framework
# for Windows and Linux. It was made for the one specific game but can be
# easily modified to package any game made with LÖVE with minimal changes.
# It may require more significant changes for future versions of LÖVE.
# It relies on the game's source code being in a directory named 'src'
# within the same directory as this script, alongside both a 32 bit and a
# 64 bit version of LÖVE for Windows, plus appimagetool and the AppImage
import sys
from PIL import Image
def text_to_image(input_file, output_file, width):
bytes_needed = width * width * 3
with open(input_file, "rb") as infile:
file_content = infile.read()
import random
MULTIPLIER = 2
QUEUE_SIZE = 5
PIECES = ("I", "J", "L", "O", "S", "T", "Z")
BAG_SIZE = len(PIECES) * MULTIPLIER + 1
CYCLE_LENGTH = BAG_SIZE * len(PIECES)
primary_queue = []
"""Scid vs. PC piece set generator
This is a simple script I wrote to generate custom chess piece sets to be used
with Scid vs. PC. It was tested on Linux (Fedora Xfce 37), but it should also
work on Windows provided ImageMagick is installed and present in the user's
PATH environment variable.
There is a template and some instructions in the Scid vs. PC support files, but
they are not very clear and the only thing the scripts provided do is encode
image files to base64, leaving the work of resizing them to multiple sizes and
#!/usr/bin/env python3
"""Northeast Southwest Cipher
This is an implementation of a manual cipher I have devised, which is similar
to the Vigenère and Playfair ciphers.
The enciphering method goes as follows:
Start by arranging the alphabet in a 5x5 square, with one letter being omitted;
each instance of that letter in the message will be replaced by another chosen
#!/bin/sh
set -e
infile=$1
outfile="${infile%.*}.png"
width=$(($2 - 2))
bytes=$((width * width * 3))
cat "$infile" /dev/zero | head -c $bytes |
#!/usr/bin/env python
import argparse
import base64
import os
import shutil
parser = argparse.ArgumentParser()
parser.add_argument('input', metavar='INPUT',
help='input file')