Skip to content

Instantly share code, notes, and snippets.

View dav's full-sized avatar

Dav Yaginuma dav

View GitHub Profile
@dav
dav / gist:f7f469d47dcb745b14e0bd86cc52c8c1
Created November 12, 2020 14:21
heroku config to dotenv
In vim:
%s#\:\s\+#='#
%s/$/'/
gets you most of the way there
@dav
dav / coderpad.rb
Created April 7, 2022 17:50
A simple ruby test system (made for coderpad interviews)
# Coderpad with simple test system
# provides a few basic assertions and a test harness so you can at least test drive
# those silly interview puzzles that only ever come up in interviews and almost
# never in real work.
class Code
def sut(param1 = nil, param2 = nil)
return true
end
@dav
dav / media_mover.rb
Last active August 2, 2022 04:46
Script for copying Insta360 videos from device to a NAS drive, and renaming for Pigasus VR Viewing
require 'fileutils'
require 'digest'
class MediaMover
NAS_MEDIA_DIR = '/media/nas/video'
NAS_RAW_INCOMING_DIR = NAS_MEDIA_DIR + '/Incoming Raw Footage/Insta360'
INSTA360_MOUNT_POINT = '/media/dav/disk'
INSTA360_MEDIA_DIR = INSTA360_MOUNT_POINT + '/DCIM/Camera01'
def run