Skip to content

Instantly share code, notes, and snippets.

View Skirmisher's full-sized avatar
📄
I am once again asking you to read the documentation

Will Springer Skirmisher

📄
I am once again asking you to read the documentation
View GitHub Profile
javax.sound.sampled.UnsupportedAudioFileException: could not get audio input stream from input stream
at javax.sound.sampled.AudioSystem.getAudioInputStream(Unknown Source)
at local.rip.engine.SoundPlayer$PlaySound.run(SoundPlayer.java:413)
javax.sound.sampled.UnsupportedAudioFileException: could not get audio input stream from input file
at javax.sound.sampled.AudioSystem.getAudioInputStream(Unknown Source)
at local.rip.engine.Sound_player.initialize(MusicPlayer.java:179)
at local.rip.engine.Sound_player.run(MusicPlayer.java:151)
@Skirmisher
Skirmisher / xkcd-to-tumblr.py
Created August 3, 2014 23:48
A little Python script that posts the latest xkcd comic to Tumblr, given the right conditions. Mostly by Physicynicism ( http://physicynicism.com ), edited and cleaned up by me. And now has more things to be fixed!
import pytumblr, json, requests, datetime, io, sys
#get XKCD info with json
class Xkcd:
'''stores comic metadata
num -- the comic number as a string (default "''" for latest comic)
'''
def __init__(self,num=''):
r=requests.get('http://xkcd.com/'+num+'/info.0.json')

Keybase proof

I hereby claim:

  • I am skirmisher on github.
  • I am skirmisher (https://keybase.io/skirmisher) on keybase.
  • I have a public key ASDYMK9p7W7tXgs7HtQiWkHr25xOjwy5XcKRppXGlOLEwQo

To claim this, I am signing this object:

@Skirmisher
Skirmisher / pass-extern.sh
Last active February 27, 2019 04:40
A small wrapper script for pass (https://passwordstore.org) that makes it easier to place GPG-encrypted files containing passwords outside of your normal pass directory. This avoids unnecessary git commits, which is nice if you want to place a particular set of passwords on cold storage as part of your security posture, for example.
#!/bin/sh
# A wrapper script to use pass (passwordstore.org) with arbitrary directories.
# Copyright (C) 2019 Will Springer
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
From 98014e4b27063ed74313878233e91b7b52b2a031 Mon Sep 17 00:00:00 2001
From: Will Springer <skirmisher@protonmail.com>
Date: Tue, 9 Jun 2020 02:11:36 -0700
Subject: [PATCH] powerpc/compat32: swap hi/lo parts of 64-bit syscall args on
32LE
This allows compat_sys calls with 64-bit args to function correctly
when called by ppcle userlands on ppc64le.
Tested with `file /bin/bash` (pread64) and `truncate -s 5G test` (ftruncate64).
#!/bin/sh
header() {
echo "TIMEOUT ${TIMEOUT}" > ${OUTFILE}
echo "DEFAULT entry0" >> ${OUTFILE}
echo "MENU TITLE Boot menu" >> ${OUTFILE}
}
get_bootpath() {
echo ${1} | sed "s#${BOOTPART}/#/#"
@Skirmisher
Skirmisher / ignore-sd-lock-switch.patch
Created July 18, 2021 01:14
SD card reader telling you the write-protect switch is set when it's not? This is the patch for you.
From 70ad5fbe600b3e8adac086bcabf6cfb54259e819 Mon Sep 17 00:00:00 2001
From: Will Springer <skirmisher@protonmail.com>
Date: Sat, 17 Jul 2021 16:59:26 -0700
Subject: [PATCH] mmc: core: add module param to override SD lock switch state
Some card readers, with age, incorrectly read the physical write-protect switch
on SD cards as being enabled, to the frustration of the user. Such a defect may
be fixable by e.g. cleaning, but not everyone has compressed air on hand.
Further, replacing a malfunctioning reader is inconvenient when said reader is
built into the device, such as a laptop. Allow the user to ignore the switch
@Skirmisher
Skirmisher / macos-locale-nonsense.bash
Created April 25, 2023 06:53
A small bash_profile snippet and a large wall of text: the products of my macOS terminal locale adventures
# [Mm]ac( )?OS( X)? locale kludges
# Okay here's the 4-1-1 folks:
# - Terminal.app takes care of setting locale env vars by default.
# Normally this works fine and you get "LANG=en_US.UTF-8" or whatever.
# But in certain circumstances it fails to do that, and apparently will set
# "LC_CTYPE=UTF-8" as a kind of fallback? Which is alright, but Linux systems
# tend to have a "C.UTF-8" locale and not "UTF-8", and also (consequently)
# some applications (X11? idr) will complain about it not being a valid
# locale, because nobody bothered testing on a BSD long enough to catch
# edge cases, or whatever. TL;DR just make a "C.UTF-8" entry in the