Skip to content

Instantly share code, notes, and snippets.

View patmaddox's full-sized avatar
🤔
Trying to figure out how to look up comments I've left

Pat Maddox patmaddox

🤔
Trying to figure out how to look up comments I've left
View GitHub Profile
PORTNAME= disport
PORTVERSION= 0.1.1
CATEGORIES= ports-mgmt
MAINTAINER= [email protected]
COMMENT= no comment
NO_CHECKSUM= yes
NO_BUILD= yes
@patmaddox
patmaddox / drafts.org
Last active May 1, 2022 06:52
Drafts config for ox-hugo

Drafts

Drafts

@patmaddox
patmaddox / jail.conf
Created April 11, 2022 19:23
freebsd vnet jail config
host.hostname = "pat-$name";
vnet;
mount.devfs;
exec.clean;
exec.start = "sh /etc/rc";
exec.stop = "sh /etc/rc.shutdown";
path = "/jail/$name";
devfs_ruleset = 6;
vnet.interface = "epair${epair}b";
exec.prestart = "ifconfig epair${epair} create up";
@patmaddox
patmaddox / 1_README.md
Last active December 25, 2021 20:01
Dorico sketch instrument definitions

These are not complete files. These are XML chunks that you need to incorporate into the respective XML files under /Applications/Dorico 3.5/Contents (right-click the app and choose "show package contents").

They provide Sketch Treble, Sketch Alto, and Sketch Bass instruments. Each instrument is a single staff played with a piano sound, and can be condensed.

Additionally, edit instrumentFamiliesDefinitions.xml and add instrument.keyboard.piano.alias.sketchtreble, instrument.keyboard.piano.alias.sketchalto, instrument.keyboard.piano.alias.sketchbass to the `` list for instrument family.keyboards

@patmaddox
patmaddox / git-annex-whereto.rb
Created July 6, 2021 19:10
a script to show which untracked files will get annexed and which will be tracked by git
#!/usr/bin/env ruby
largefiles = `git annex config --get annex.largefiles`
untracked_files = `git ls-files --others --exclude-standard`
annex_files = []
git_files = []
untracked_files.split("\n").each do |file|
`git annex matchexpression "#{largefiles}" --largefiles --file "#{file}"`
@patmaddox
patmaddox / realearn-config.json
Last active July 4, 2021 12:14
realearn config
{
"version": "2.9.1",
"id": "8ZvXxRON",
"controlDeviceId": "6",
"feedbackDeviceId": "6",
"defaultGroup": {},
"groups": [
{
"id": "805d20ec-3b00-48ca-bef3-8384f997bcad",
"name": "Drums"
class Object
def or_else
self
end
end
class NilClass
def or_else
yield
end
@patmaddox
patmaddox / 1_use-toggle.js
Last active April 2, 2020 15:35
toggles and hooks
import { useState, useCallback } from 'react';
export default function useToggle(initialState) {
const [isOn, setIsOn] = useState(initialState);
const turnOn = useCallback(() => setIsOn(true), [setIsOn]);
const turnOff = useCallback(() => setIsOn(false), [setIsOn]);
const toggle = useCallback(() => setIsOn(prevState => !prevState), [setIsOn]);
return { isOn, turnOn, turnOff, toggle, setIsOn };
}
@patmaddox
patmaddox / fluid_srp.rb
Created September 18, 2019 18:18
SOLID in Ruby is fluid
class Foo1
def foo
puts "hello foo"
end
end
module FooModule
def foo
puts "hello foo"
end