Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Restoring a vehicle and packing to move

BA steakknife

💭
Restoring a vehicle and packing to move
View GitHub Profile
@steakknife
steakknife / Fix a UPS repeatedly tripping a bonded-neutral generator's GFI-GFCI outlets.md
Last active Sep 27, 2020
Fix a UPS repeatedly tripping a bonded-neutral generator's GFI/GFCI outlets
View Fix a UPS repeatedly tripping a bonded-neutral generator's GFI-GFCI outlets.md
  1. Be sure there is no fault in the UPS, or conduction from neutral or hot to local ground of any metal.
  2. Remove the ground pin's connection to the generator from the UPS only with a cheater.
  3. Do not ground the UPS or anything connected to it referenced to the generator's ground.

Alternatively, de-bond a bonded-neutral generator and ground the generator's ground to Earth ground. Once debonded, a generator has to be treated differently and always grounded.

@steakknife
steakknife / crc16_ibm.c
Last active Sep 26, 2020
Correct, constant-time CRC-16-IBM/CRC-16-ARC implementation in C99
View crc16_ibm.c
/*
From https://reveng.sourceforge.io/crc-catalogue/16.htm#crc.cat-bits.16
CRC-16/ARC
width=16 poly=0x8005 init=0x0000 refin=true refout=true xorout=0x0000 check=0xbb3d residue=0x0000 name="CRC-16/ARC"
Class: attested
Alias: ARC, CRC-16, CRC-16/LHA, CRC-IBM
@steakknife
steakknife / gist:5400d0b2ce68fecf55b018ff6ef7fba7
Last active Jun 21, 2020
macOS gem installation with brew'ed DBMSes
View gist:5400d0b2ce68fecf55b018ff6ef7fba7

PostgreSQL

brew install postgresql
gem install pg -- --with-pg-config="$(brew --prefix postgresql)/bin/pg_config"

MySQL

brew install mysql-client
gem install mysql2 -- --with-mysql-dir="$(brew --prefix mysql-client)" --with-mysql-include="$(brew --prefix mysql-client)/include/mysql"
@steakknife
steakknife / Makefile
Last active Jun 11, 2020 — forked from RadNi/lwnfs.c
Updated lwnfs
View Makefile
obj-m := lwnfs.o
lwn-objs := lwnfs.o
all: ko
ko:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
View entropymon.rs
// entropymon.rs
// entropymon - a kernel entropy available monitor for Linux
// Copyright (c) 2020 Barry Allard
// MIT license
use std::fs;
use std::io;
use std::io::prelude::*;
use std::sync::{Arc, Mutex};
use std::ops::{Add, Sub, Div};
@steakknife
steakknife / sub-sampler.md
Last active Feb 14, 2020
Youtube subscriptions sampler
View sub-sampler.md
  • Automotive - Scotty Kilmer, Engineering Explained, Garage 54
  • Aviation - blancolirio (777 FO), MentourPilot (737 instructor), Captain Joe (737 pilot), AgentJayZ (industrial turbine repair), C.W. Lemoine (commercial/fighter pilot), AVweb, FlightChops, VASAviation, Tucker Gott (paramotor)
  • Botany - Crime Pays But Botany Doesn't*
  • Cooking - A French Guy Cooking (insanely dedicated)
  • Comedy - The Onion, Team Coco (Conan O'Brien),
  • Electronics - EEVblog, ElectroBOOM, Bigclivedotcom, iFixit, Louis Rossmann*
  • Farming - Milennial Farmer, Urban Farmer Curtis Stone
  • Family-friendly - K'eyush The Stunt Dog, Sherpa, PetraGrey, Caught in Providence
  • Glassmaking - Timia Glass
  • Legal - Steve Lehto (Lemon law & variety short), LegalEagle (short videos), Leonard French (copyright & legal deep-dives)
@steakknife
steakknife / apple-woes.md
Last active Feb 12, 2020
Apple needs an aspirin or a therapist because their products have unresolved issues right now
View apple-woes.md

What Apple could do better

There's a million things Apple gets right. This document isn't about them.

Meta

  1. Each of the OSes should be 95% open source.

  2. Schematics, parts and repair tools should be available.

@steakknife
steakknife / floppize
Last active Oct 12, 2019
macOS: Make a directory into an MS-DOS floppy image
View floppize
#!/bin/bash
set -e
SIZE=1440 # TODO: handle 160, 180, 320, 360, 640, 720, 1200, 1232, 1440, 2880
NONFLAGS=()
OVERWRITE=
BOOTABLE=
help() {
/bin/cat >&2 << HELP
@steakknife
steakknife / appnote.txt
Created Sep 19, 2019
appnote.txt from PKZIP 1.1
View appnote.txt
Disclaimer
----------
Although PKWARE will attempt to supply current and accurate
information relating to its file formats, algorithms, and the
subject programs, the possibility of error can not be eliminated.
PKWARE therefore expressly disclaims any warranty that the
information contained in the associated materials relating to the
subject programs and/or the format of the files created or
View rust-in-large-organizations-notes.md

Rust in Large Organizations

Initially taken by Niko Matsakis and lightly edited by Ryan Levick

Agenda

  • Introductions
  • Cargo inside large build systems
  • FFI
  • Foundations and financial support
You can’t perform that action at this time.