Skip to content

Instantly share code, notes, and snippets.

☢️
THIS IS NOT A PLACE OF HONOR. NOTHING IS VALUED HERE.

Emily St. emilyst

☢️
THIS IS NOT A PLACE OF HONOR. NOTHING IS VALUED HERE.
Block or report user

Report or block emilyst

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@emilyst
emilyst / mash.rb
Created Sep 15, 2019
Flatten a hash's structure in a somewhat naive way
View mash.rb
#!/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 Apr 26, 2019
Diagram of video2gif filtergraph
View video2gif-filtergraph-diagram.txt
.─────────.
( input )
`─────────'
┌────────────┐
│ fps │
└────────────┘
@emilyst
emilyst / sleepwake-iokit.py
Created Mar 19, 2019
This doesn't work either
View sleepwake-iokit.py
#!/usr/bin/env python3
import objc
from Foundation import (
NSDate,
NSDefaultRunLoopMode,
NSLog,
NSObject,
NSRunLoop,
NSThread,
View sleepwake-threaded.py
#!/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 Mar 11, 2019
Log sleep/wake notifications on macOS
View sleepwake.py
#!/usr/bin/python
from AppKit import NSWorkspace, \
NSWorkspaceWillSleepNotification, \
NSWorkspaceDidWakeNotification, \
NSObject, \
NSLog
from PyObjCTools import AppHelper
class NotificationHandler(NSObject):
@emilyst
emilyst / # macvim - 2018-09-08_10-35-42.txt
Created Sep 8, 2018
macvim on macOS 10.14 - Homebrew build logs
View # macvim - 2018-09-08_10-35-42.txt
Homebrew build logs for macvim on macOS 10.14
Build date: 2018-09-08 10:35:42
@emilyst
emilyst / .md
Last active Dec 11, 2016
How to rip a multiple-disc PlayStation game and add it to OpenEmu
View .md

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 / fairyfloss.vim
Created May 13, 2016
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).
View fairyfloss.vim
" 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
View 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
View gist:61be5e3882cca5f75cfd
⚡ l
total 32
-rwxrwxr-x 1 emilyst staff 8.3K Jun 1 16:17 hello*
-rw-r--r-- 1 emilyst staff 82B Jun 1 16:13 hello.c
⚡ cat hello.c
#include <stdio.h>
int main(void) {
printf("hello world\n");
return 0;
You can’t perform that action at this time.