Skip to content

Instantly share code, notes, and snippets.

View purp's full-sized avatar
🖤
https://xrl.us/mlkbirmletterpdf

Jim Meyer purp

🖤
https://xrl.us/mlkbirmletterpdf
View GitHub Profile
@purp
purp / README.md
Created December 15, 2018 21:46
Convert exported Apple contacts .vcf to CSV

I have a bunch of folks I want to export from Apple Contacts on MacOS and turn into a spreadsheet for a holiday card mail merge.

This is my clumsy way of doing it.

@purp
purp / EdgeOS_SSH_Tricks.md
Last active January 28, 2024 20:21
Adding SSH keys to Ubiquiti EdgeRouter X / EdgeOS

Adding SSH keys to EdgeOS-based devices like Ubiquiti Edge Router X

Maybe, like me, you're tired of typing a password and prefer to disable password auth for ssh anyway. Maybe, like me, you want to point VS Code at your Edge Router and be able to read configs and things. Maybe, like me, you'll discover that VS Code's Remote-SSH extension doesn't support the ERX architecture and be mildy bummed, but still happy to have passwordless SSH (via ssh-agent) and know that no password will get some rando into your ERX.

Here's how.

Cribbed from the VyOS Login/User Management docs

Configuring SSH for less typing

@purp
purp / rbenv-copy-gems.rb
Created July 7, 2016 16:01
rbenv: install all gems from one version to another
#!/bin/bash
# copy is a misnomer; it's actually LIST + INSTALL
# --from 2.2.1 [--to other-version-else-whatever-is-currently-set]
#
# TODO: install only most-recent version that's installed in FROM
# TODO: use gem names only from FROM, install latest available version (might be more recent than in FROM)
# TODO: pass arguments to gem command (e.g. --no-document)
CURRENT_VERSION=`rbenv version | cut -d' ' -f1`
GEM_LIST_ARGS="--local"
@purp
purp / 00 Setting up an M1 Mac Mini for Home Automation.md
Last active March 25, 2023 19:17
Setting up an M1 Mac Mini for Home Automation using Home Assistant

How To Set Up An M1 Mac Mini As Your Home Automation Server Using Home Assistant

Intro

This is mostly just me scratching out notes on a work in (slow) progress, and preserving knowledge for future me.

If I get to a successful end, I may polish things up into a useful guide. There are no doubt better places to find this and easier ways to do it ... but I couldn't find them, and if you've ended up here, you couldn't either. Sorry for that.

Goals

@purp
purp / kohler-mazz-notes.md
Created January 29, 2023 20:08
Adventures In DIY Home Repair

Notes on fixing a leaky Kohler Mazz® kitchen faucet in 2023

We've got a Kohler Mazz® kitchen faucet, model K-R72511-SD-VS, that we love the look and feel of. We've had it long enough for a number of things to go wrong, including a broken sprayer head switch and a leaky quick connect connector. We've replaced parts and fixed things and it's reached the point that notes on the internet would be helpful (at least to future me, maybe others), so here we are.

There's a faucet service parts diagram under the "Installation & Service Parts" heading; someday I'll go save the SVG for posterity and add it here.

Sprayer Head Replacement

The replacement head part number is 1235124 and cost $50 in Jan 2023. It's a

@purp
purp / notes.md
Created September 23, 2022 16:43
Docker Dev Environments Notes

Troubleshooting

If Docker complains that you don't have git installed:

  • which git for the path (and if you realize now that it's not installed, now you can fix it)
  • If it's a non-standard path (I use /opt/homebrew), that's why Docker can't find it
  • cd /usr/local/bin && ln -s $(which git) .
@purp
purp / Capfile
Last active October 20, 2021 22:44
Using Capistrano 3, capistrano-rbenv, and capistrano-rbenv-build together with Rails 5
# Load DSL and set up stages
require "capistrano/setup"
# Include default deployment tasks
require "capistrano/deploy"
# Load the SCM plugin appropriate to your project:
#
# require "capistrano/scm/hg"
# install_plugin Capistrano::SCM::Hg
require 'irb/completion'
require 'rubygems'
# Autoload all gems in the Gemfile default set
require 'bundler/setup'
Bundler.require(:default)
# TODO: find a valid editor if it's not set and config it's 'edit at line' and terminal req'ts
# Make sure $EDITOR is set
ENV['EDITOR'] = 'code' unless ENV['EDITOR']
@purp
purp / README.md
Last active August 12, 2021 20:49
Debug Travis CI config locally using Docker

Debugging Travis CI locally using Docker

This assumes you've got docker-machine installed, running, and can do docker run

1. Get a debug instance running

    docker run --name travis-debug -dit quay.io/travisci/travis-ruby /sbin/init
    docker exec -it travis-debug bash -l
@purp
purp / delegate_matcher.rb
Last active July 31, 2020 10:46 — forked from bparanj/delegate_matcher.rb
RSpec matcher for delegations
# RSpec matcher to spec delegations.
#
# Usage:
#
# describe Post do
# it { should delegate(:name).to(:author).with_prefix } # post.author_name
# it { should delegate(:day).to(:created_at) }
# it { should delegate(:month, :year).to(:created_at) }
# end
#