Skip to content

Instantly share code, notes, and snippets.

View bdimcheff's full-sized avatar

Brandon Dimcheff bdimcheff

View GitHub Profile
@bdimcheff
bdimcheff / mirror-image.sh
Last active May 11, 2021 14:42 — forked from brandond/mirror-image.sh
mirror go images
#!/bin/bash
FLAGS=""
SOURCE="docker.io/library"
DEST="docker.io/bdimcheff"
IMAGE="golang"
TAG="1.16.4-alpine"
docker buildx imagetools inspect ${SOURCE}/${IMAGE}:${TAG} --raw | \
jq -r '.manifests[] | (.digest + " " + .platform.architecture + .platform.variant)' | \
@bdimcheff
bdimcheff / init.lua
Created November 29, 2020 21:37
hammerspoon config for logitech trackman
-- HANDLE SCROLLING
local oldmousepos = {}
-- positive multiplier (== natural scrolling) makes mouse work like traditional scrollwheel
local scrollmult = -4
-- The were all events logged, when using `{"all"}`
mousetap = hs.eventtap.new({0,3,5,14,25,26,27}, function(e)
oldmousepos = hs.mouse.getAbsolutePosition()
local mods = hs.eventtap.checkKeyboardModifiers()
local pressedMouseButton = e:getProperty(hs.eventtap.event.properties['mouseEventButtonNumber'])
@bdimcheff
bdimcheff / 0-earn-it-letter.md
Last active March 18, 2020 13:55
a letter I wrote to my congresscritters about the EARN-IT act, which is bad

As your constituent and someone with a degree in Computer Science from the University of Michigan and 20 years in the field, I urge you to reject Sens. Graham and Blumenthal’s proposed bill, the EARN IT Act (S. 3398).

The bill would give the Attorney General far too much discretionary authority to regulate communication technology. Attorney General Barr has made it clear that he would use that authority to undermine our right to private and secure encrypted communications. Among other things, this would make journalists and whistleblowers more vulnerable at a time when their work is more important than ever. It will undermine our national security, and the security of our allies around the world.

Under EARN IT, Barr could require that tech companies weaken their own systems in order to give law enforcement access to our private communications. Such a demand would put encryption providers like WhatsApp and Signal in an awful conundrum: either face the possibility of losing everything in a single lawsuit or k

@bdimcheff
bdimcheff / gokitlogrus.go
Created October 28, 2019 16:14
gokit -> logrus adapter
package log
import (
"fmt"
gokitlog "github.com/go-kit/kit/log"
"github.com/sirupsen/logrus"
)
type logrusLogger interface {
@bdimcheff
bdimcheff / cubanish-black-beans.md
Last active February 10, 2017 05:10
Cubanish Instant Pot Black Beans

Pressure Cooker Chicken and Rice

This is a mashup of a few different recipes that I tweaked to my preference

Ingredients

  • 1T olive oil or butter
  • 1 onion, chopped
  • 1T tomato paste
  • 1 clove garlic, minced or pressed in a press
Sep 29 15:52:44 vesper cupsd[1010]: [Job ???] Request file type is application/vnd.cups-pdf-banner.
Sep 29 15:52:44 vesper cupsd[1010]: REQUEST localhost - - "POST /printers/printer.wieldim.com HTTP/1.1" 200 424 Print-Job successful-ok
Sep 29 15:52:44 vesper cupsd[1010]: [Job 108] Job stopped due to filter errors; please consult the error_log file for details.
Sep 29 15:52:44 vesper cupsd[1010]: [Job 108] The following messages were recorded from 03:52:44 PM to 03:52:44 PM
Sep 29 15:52:44 vesper cupsd[1010]: [Job 108] Adding start banner page "none".
Sep 29 15:52:44 vesper cupsd[1010]: [Job 108] Adding end banner page "none".
Sep 29 15:52:44 vesper cupsd[1010]: [Job 108] File of type application/vnd.cups-pdf-banner queued by "root".
Sep 29 15:52:44 vesper cupsd[1010]: [Job 108] hold_until=0
Sep 29 15:52:44 vesper cupsd[1010]: [Job 108] Queued on "printer.wieldim.com" by "root".
Sep 29 15:52:44 vesper cupsd[1010]: [Job 108] time-at-processing=1443556364
@bdimcheff
bdimcheff / mr-snausage.md
Last active August 29, 2015 14:28
Mr. Snausage

This recipe is a bell pepper and italian sausage based pasta sauce, adapted from this recipe.

Ingredients

  • 1lb italian sausage, loose or with the skins removed (sweet, hot, mix - your choice)
  • 2T olive oil
  • 3 bell peppers, at least two of which should be non-green. I often use all red, but other colors are fun too.
  • 4 garlic cloves, minced
  • 1 large onion, cut into 1/4" half-moons
  • 1 large (28oz) can of diced tomatoes, or a can of diced tomatoes pulsed in a food processor a few times. I strongly prefer Muir Glen.
@bdimcheff
bdimcheff / pancakes.md
Last active August 29, 2015 14:10
nana's pancakes

This is the family recipe we've been using since I was a child. This will make approximately 8 large pancackes, or 16 small ones.

Ingredients

  • 2c (9oz) all purpose flour
  • 1tbsp sugar
  • 1/2tsp salt
  • 2tsp baking soda
  • 2.5c buttermilk
  • 2 egg yolks, whites reserved in a separate mixing bowl

Keybase proof

I hereby claim:

  • I am bdimcheff on github.
  • I am bdimcheff (https://keybase.io/bdimcheff) on keybase.
  • I have a public key whose fingerprint is 8843 5D3B 8BA1 7537 FBA3 34A0 A290 923B 358E 5339

To claim this, I am signing this object: