Skip to content

Instantly share code, notes, and snippets.

View emilyst's full-sized avatar

Emily Strickland emilyst

View GitHub Profile
@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
# /etc/sysctl.d/20-quiet-printk.conf
kernel.printk = 3 3 3 3
@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:

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 / 99-usb-cdrom.rules
Last active September 2, 2024 05:28
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 / 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
@emilyst
emilyst / video2gif-filtergraph-diagram.txt
Last active April 26, 2019 01:40
Diagram of video2gif filtergraph
.─────────.
( input )
`─────────'
┌────────────┐
│ fps │
└────────────┘
@emilyst
emilyst / sleepwake-iokit.py
Created March 19, 2019 03:44
This doesn't work either
#!/usr/bin/env python3
import objc
from Foundation import (
NSDate,
NSDefaultRunLoopMode,
NSLog,
NSObject,
NSRunLoop,
NSThread,
@emilyst
emilyst / sleepwake-threaded.py
Created March 19, 2019 03:39
This doesn't work
#!/usr/bin/env python3
import threading
# from multiprocessing import Pool
# from multiprocessing import Process
class EventLoopThread(threading.Thread):
def __init__(self):
super(EventLoopThread, self).__init__()
@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):