Skip to content

Instantly share code, notes, and snippets.

View Anonymous1157's full-sized avatar

Anonymous1157

  • GA, USA
View GitHub Profile
@Anonymous1157
Anonymous1157 / keysmash2.c
Created December 25, 2021 09:51
Slightly more complicated and realistic bottom keysmash generator
#include <stdlib.h>
#include <stdio.h>
/* Output string length */
#define OUTMIN 10
#define OUTSPAN 50
/* Offsets for the character strings */
#define CHANGEHAND 1
#define CHANGEROW 2
@Anonymous1157
Anonymous1157 / keysmash.c
Last active December 22, 2021 11:13
Very simplistic bottom keysmashing generator
#include <stdlib.h>
#include <stdio.h>
#define OUTMIN 8
#define OUTSPAN 32
// Valid characters
const char q[] = "asdfghjkl";
const int qlen = sizeof(q);
/* After seeing https://gist.github.com/anonymous/83b1f8d2da6ee35d172b
* I realized I had never actually solved FizzBuzz on my own and that was
* probably a good first step to figure out what in the hell is happening in
* that solution. So... yeah. My FizzBuzz.
*
* I still have no idea what the hell is happening in the other one.
*/
#include <stdio.h>
@Anonymous1157
Anonymous1157 / gnupod_fix_various_deprecated.patch
Created March 4, 2018 21:13
Patch for GNUpod 0.99.8, fixes minor deprecated syntax changes
I made this patch that applies against GNUpod 0.99.8 and fixes a couple of
deprecations since Perl 5.22 which are errors since I think Perl 5.23. My
system has Perl 5.24.
I don't know Perl and have never written any Perl in my life. But now I can
sync my iPod with a light and minimal tool again!
All of these fixes have been sitting in the Savannah bug tracker for years but
it looks like they haven't merged fixes and cut a new release in a long time:
http://savannah.gnu.org/bugs/?48112
@Anonymous1157
Anonymous1157 / Makefile.svg2optipng
Last active February 22, 2017 17:47
Simple Makefile to export SVG to PNG with Inkscape, then run optipng to optimize
# This Makefile exports PNGs from SVGs and optimizes the PNGs. It can also
# compress them for distribution as an archive.
VPATH:=src
# Detect SVGs and generate the output file names
SVGFILES:=$(sort $(notdir $(wildcard src/*.svg)))
PNGFILES:=$(patsubst %.svg,%.png,${SVGFILES})
OPTFILES:=$(patsubst %.svg,.%_ranopt,${SVGFILES})