Skip to content

Instantly share code, notes, and snippets.

View emilyst's full-sized avatar

Emily Strickland emilyst

View GitHub Profile
@emilyst
emilyst / 99-usb-cdrom.rules
Last active March 21, 2024 20:37
Description for getting MakeMKV working on Synology with DSM 7 using jlesage/makemkv via Docker Compose
SUBSYSTEMS=="usb", ATTRS{idVendor}=="", ATTRS{idProduct}=="", GROUP="cdrom", MODE="0666"
@emilyst
emilyst / yt-dlp-config
Last active May 13, 2023 18:47
~/.config/yt-dlp/config
# /usr/local/bin/docker run --name "yt-dlp" --rm -v "/volume1/Media/Clips:/downloads:rw" jauderho/yt-dlp:latest --config-locations /downloads/yt-dlp-config
--batch-file /downloads/to-download.txt
--embed-chapters
--embed-info-json
--embed-metadata
--embed-subs
--embed-thumbnail
--match-filter 'original_url!*=/shorts/'
--mtime
@emilyst
emilyst / .md
Last active February 13, 2023 19:17
How to rip a multiple-disc PlayStation game and add it to OpenEmu

Adding multi-disc PlayStation games to OpenEmu

It's necessary to find an optical drive capable of reading the CDs used as PlayStation games. It's also necessary to get OpenEmu (free) and set it up to play PlayStation games. This may require finding its appropriate BIOS files (check its settings). Otherwise, finding CD images for games which you own online is possible and left as a risk for the reader to take.

  1. For OpenEmu to read and use a PlayStation game, it must exist as a file on the computer. If you have a set of BIN/CUE files, skip to step two.
    1. The entirety of the CD's binary data must be ripped to a binary file. Use a command like "dd if=/dev/disk2 of='~/Downloads/Final Fantasy VII (USA) (Disc 1).bin' bs=2048 conv=sync,notrunc".
      • (Here, "/dev/disk2" refers to a specific device on my computer. Open the Disk Utility on yours, find your optical drive, and find out what it's called. If it's "disk3", use "/dev/disk3" instead. If you don't have an optical drive, this is a non-star
@emilyst
emilyst / 0.docker-compose.yml
Last active November 19, 2022 19:58
Current docker-compose.yml for my Mastodon instance, and associated files. CUSTOMIZE FOR YOUR PURPOSES. PROVIDED AS-IS. This is just a (probably dated) version of what I happen to use, and it's jank as hell.
version: "3"
services:
db:
image: postgres:15
container_name: mastodon-postgres
restart: unless-stopped
networks:
- internal
sysctls:
@emilyst
emilyst / sleepwake.py
Created March 11, 2019 17:51
Log sleep/wake notifications on macOS
#!/usr/bin/python
from AppKit import NSWorkspace, \
NSWorkspaceWillSleepNotification, \
NSWorkspaceDidWakeNotification, \
NSObject, \
NSLog
from PyObjCTools import AppHelper
class NotificationHandler(NSObject):

Image stacking is a collection of related techniques used in astrophotography which all use multiple images taken by a camera to achieve a more detailed photo than would otherwise be possible. I’ve talked about image stacking in the past, but I hand-waved the statistical parts a bit. In this post, I want to dig into those mathematical details so that you understand why image stacking actually works.

But first, I’ll tell a story about thermometers. We’ll come back to image stacking after that.


Let’s imagine you’re a scientist, and you need to know the temperature of the room you’re in to within a tenth of a degree in order to run an experiment. You dutifully order a super expensive NIST-traceable thermometer online, but on the day it arrives, you open the box only to discover that you got a hundred cheap alcohol thermometers instead.

The expensive thermometer would have done the job to within a hundredth of a degree, but now it’s too late to wait for a new one to arrive, and all you have are these che

@emilyst
emilyst / SMBDIS.ASM
Last active August 31, 2022 15:53 — forked from 1wErt3r/SMBDIS.ASM
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
# /etc/sysctl.d/20-quiet-printk.conf
kernel.printk = 3 3 3 3
@emilyst
emilyst / fairyfloss.vim
Created May 13, 2016 05:47
A quick-and-dirty automatic conversion of the Fairyfloss Sublime Text theme (http://sailorhg.github.io/fairyfloss/) to a Vim colorscheme using the coloration script (https://github.com/sickill/coloration).
" Vim color file
" Converted from Textmate theme Monokai using Coloration v0.4.0 (http://github.com/sickill/coloration)
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif
@emilyst
emilyst / mash.rb
Created September 15, 2019 20:01
Flatten a hash's structure in a somewhat naive way
#!/usr/bin/env ruby
class Hash
def mash(prefix=nil)
reduce({}) do |a, (k,v)|
case v
when Hash then a.merge(v.mash(k.to_s + '_'))
else a.merge({ "#{prefix}#{k}" => v })
end
end