Skip to content

Instantly share code, notes, and snippets.

View zgracem's full-sized avatar

Amy Grace zgracem

  • Treaty 6 territory, Canada
View GitHub Profile
@zgracem
zgracem / distributor-logo-steamdeck-oled.svg
Created January 13, 2024 14:52
Replacement icon for the Application Menu on Steam Deck OLED
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zgracem
zgracem / AddNoiseLayer.scpt
Created November 11, 2023 17:46
AppleScript to add a layer of random noise to an Acorn document
set blankPixel to «data TPIC00000A0000000000000000000100010020280000000000»
tell application "Acorn"
tell front document
try
set the oldClipboard to (get the clipboard)
on error msg number -1700
set the oldClipboard to the blankPixel
end try
try
@zgracem
zgracem / fo76-keys.md
Created September 14, 2021 21:28
How to access the TNT domes at Black Mountain Ordnance Works in Fallout 76

Black Mountain Ordnance Works access

TNT dome #02

Contains alien blaster rounds and the plan for the alien blaster fusion mag.

  1. Get the rusted key at the toxic pond and wreckage southeast of Graninger Farm, inside a broken safe submerged in a ruined house (found with the alien blaster).
@zgracem
zgracem / fix-skyrim-missing-sounds.md
Created March 7, 2021 17:43
Fixing missing sounds in Skyrim SE (Windows 10 + Boot Camp)

Problem: Skyrim Special Edition + Windows 10 + Boot Camp works normally, but many sounds (music, player voice/dragon shouts, weapon drawing/attacking, etc.) are missing. Any sounds added by third-party mods are similarly silent.

Cause: An obscure bug in Skyrim SE that expects the game data (including sound) to be stored on a volume with a Master Boot Record (MBR). Boot Camp drives, however, must be GUID-formatted.

Solution: Create a virtual MBR volume and run the game from there.

@zgracem
zgracem / fix-skyrim-dark-face-npc-bug.md
Last active August 2, 2023 15:09
Fixing the "dark face" NPC bug in Skyrim SE
title date updated
Fixing the "dark face" bug in Skyrim SE
2021-03-04
2022-02-17

Prerequisites

  • Skyrim SE Creation Kit (CreationKit.exe) via Steam or Bethesda.net
@zgracem
zgracem / notes.bash
Created October 4, 2018 13:22
Miscellaneous syntax notes for bash 3–5
# Use command output as a string (command substitution)
echo "Today is $(date +%F)."
# Use the contents of a file as a string (command substitution)
# Good:
var=$(<stuff.txt)
# Bad:
var=$(cat stuff.txt)
@zgracem
zgracem / nethack_phase_of_the_moon.rb
Created September 27, 2018 14:26
Calculating the phase of the moon in Ruby, based on NetHack's source code
### Based on NetHack's phase_of_the_moon()
# > http://nethack.wikia.com/wiki/Hacklib.c#phase_of_the_moon
### See also:
# > https://en.wikipedia.org/wiki/Epact
# > https://en.wikipedia.org/wiki/Golden_number_(time)
# > https://en.wikipedia.org/wiki/Metonic_cycle
# > https://en.wikipedia.org/wiki/Computus
def phase(lt = Time.now)
# The solar year is about 365¼ days, while the lunar month is slightly longer
@zgracem
zgracem / stacktrace.bash
Created September 23, 2018 18:41
Get a nice looking stacktrace from anywhere inside a bash script
stacktrace()
{
local line subroutine filename
local stack=${#FUNCNAME[@]}
if [[ -n $1 ]]; then
stack=$(( stack - $1 )) || return
fi
local i; for (( i = 1; i < stack; i++ )); do
@zgracem
zgracem / ao3-ratings.css
Created September 22, 2018 19:32
Add ratings icons to AO3
dd.rating a::before {
color: #fff;
padding: 0 1ex;
margin-right: 1ex;
border-radius: 0.333ex;
}
dd.rating a[href="/tags/General%20Audiences/works"]::before {
content: "G";
background: #78a700;