Skip to content

Instantly share code, notes, and snippets.

View fluffy-critter's full-sized avatar

fluffy fluffy-critter

View GitHub Profile
@fluffy-critter
fluffy-critter / README.md
Last active February 8, 2021 19:46
Python script to incrementally update a Stepmania SIMfile collection from z-i-v

Zenius I Vanisher Mirroring

The best source for Stepmania charts is Zenius-I-Vanisher. Unfortunately, there's no easy way to incrementally update collections.

Usage

To run this script you'll need Python 3.6 or later, and you'll need to install Beautiful Soup with e.g. pip install beautifulsoup4. Put it into your Stepmania folder and run it with e.g.

python3 zenius.py
@fluffy-critter
fluffy-critter / main.lua
Created January 7, 2020 09:28
Audio sync test for LÖVE
--[[ Just an audio sync test I wrote for
https://bitbucket.org/rude/love/issues/1418/audio-source-tell-gets-out-of-sync-for
Issue has been long-since fixed but it might be useful to keep around for other testing purposes later?
]]
local stream, static
@fluffy-critter
fluffy-critter / wav2vid.sh
Created August 26, 2019 00:48
Make a music visualizer for twitter/mastodon/etc.
#!/bin/sh
# Converts an audio file to a smol .mp4 video with a basic spectrogram visualizer
ffmpeg -y -i "$1" -filter_complex "
[0:a]showcqt=s=320x80:text=0[v]
" -map [v] -map 0:a -b:a 320k "$1.mp4"
@fluffy-critter
fluffy-critter / README.md
Created January 3, 2019 20:45
simple git merge review tool

Simple code review tool thingy

  1. Put diff2html somewhere on your path
  2. Put this on your path too

Now you can quickly visualize a branch's code changes with e.g.

git cr

or

@fluffy-critter
fluffy-critter / xmousekeys.c
Created May 9, 2018 01:05
A simple program you can use to move the mouse in X11
/* XMouseKeys.c
*
* Move the mouse cursor by the specified vector, useful for keyboard
* bindings in pwm and other WMs which don't have this functionality
*
* contact: fluffy at beesbuzz dot biz
* Released into the public domain
*
* Compile with:
*
@fluffy-critter
fluffy-critter / vcard-telnorm.cpp
Created May 8, 2018 22:23
VCard phone number normalizer
/*! @brief Simple utility for normalizing phone numbers in VCard (.vcf) files
*
* @author fluffy <[email protected]>
*
* Requires the Google libphonenumber (C++ version), available at:
*
* https://code.google.com/p/libphonenumber/
*
* Just build this with -lphonenumber (or whatever equivalent is
* necessary on your toolchain of choice), and pipe the VCard on
@fluffy-critter
fluffy-critter / FixSourceEncodings.cs
Created March 26, 2018 21:16
A Unity editor plugin to automatically fix source file encodings to be UTF-8 with BOM
/*
Automatically fixes the character encoding of checked-in source files.
Put this file into your project's Assets/Editor directory, and reimport any
source files which aren't already UTF-8. This is especially useful if you use
git on Windows, where line-ending conversion can end up messing everything up.
Author: [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy of
@fluffy-critter
fluffy-critter / Makefile
Last active February 24, 2017 19:34
Simple build system for building LÖVE games and deploying to itch.io, CD-style
# Simple-ish Makefile for building LOVE packages to multiple architectures and publishing to itch.io.
#
# Useful targets:
#
# all - build for Windows, OSX, and LOVE bundle
# publish - deploy the build to itch.io
# publish-status - print the itch.io status
#
# The itch publishing stuff uses itch's "butler" mechanism. Read more at https://itch.io/docs/butler/
#
@fluffy-critter
fluffy-critter / namegen.py
Created April 12, 2016 03:16
Dissociator to generate names by example
#!/usr/bin/env python
#
# Silly thing to generate random names from examples. Uses the CSV files obtained from
# http://catalog.data.gov/dataset/baby-names-from-social-security-card-applications-national-level-data
#
# Any corpus will work if it's formatted like:
# Name,[ignored],weight
import csv
import sys
@fluffy-critter
fluffy-critter / sillyhash.cpp
Created April 2, 2016 23:55
A really dumb genetic algorithm for optimizing hash coefficients
#include <iostream>
#include <map>
#include <vector>
#include <string>
#include <algorithm>
#include <random>
#include <chrono>
#include <thread>
#include <mutex>