Skip to content

Instantly share code, notes, and snippets.

fluffy fluffy-critter

Block or report user

Report or block fluffy-critter

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fluffy-critter
fluffy-critter / main.lua
Created Jan 7, 2020
Audio sync test for LÖVE
View main.lua
--[[ 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 Aug 26, 2019
Make a music visualizer for twitter/mastodon/etc.
View wav2vid.sh
#!/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 Jan 3, 2019
simple git merge review tool
View README.md

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
A simple program you can use to move the mouse in X11
View xmousekeys.c
/* 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
VCard phone number normalizer
View vcard-telnorm.cpp
/*! @brief Simple utility for normalizing phone numbers in VCard (.vcf) files
*
* @author fluffy <fluffy@beesbuzz.biz>
*
* 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 Mar 26, 2018
A Unity editor plugin to automatically fix source file encodings to be UTF-8 with BOM
View FixSourceEncodings.cs
/*
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: fluffy@beesbuzz.biz
Permission is hereby granted, free of charge, to any person obtaining a copy of
@fluffy-critter
fluffy-critter / Makefile
Last active Feb 24, 2017
Simple build system for building LÖVE games and deploying to itch.io, CD-style
View Makefile
# 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 Apr 12, 2016
Dissociator to generate names by example
View namegen.py
#!/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 Apr 2, 2016
A really dumb genetic algorithm for optimizing hash coefficients
View sillyhash.cpp
#include <iostream>
#include <map>
#include <vector>
#include <string>
#include <algorithm>
#include <random>
#include <chrono>
#include <thread>
#include <mutex>
View name-androgyny.py
# Generate a list of popular names, sortable by their relative androgyny. Data is obtained
# from the SSA website at http://catalog.data.gov/dataset/baby-names-from-social-security-card-applications-national-level-data
#
# The expected input is a .csv file with columns of:
#
# name,assigned gender,count
#
# Some example uses of this program:
#
# Find the most androgynous names from 1978 beginning with Q:
You can’t perform that action at this time.