Skip to content

Instantly share code, notes, and snippets.

View dotspencer's full-sized avatar

Spencer Smith dotspencer

View GitHub Profile
@dotspencer
dotspencer / FS140-vs-EMP-shield.md
Last active January 24, 2024 19:46
Siemens FS140 compared to EMP Shield SP-120-240-W
Siemens - FS140 EMP Shield - SP-120-240-W
Surge Capacity 140 kA 114 kA
Response Time <1 ns <1 ns
MCOV (L-N, L-G, N-G) 150 V 150 V
MCOV (L-L) 300 V 300 V
VPR (L-N, L-G, N-G) 600 V 470 V
VPR (L-L) 900 V 940 V
Wire Gauge 10 AWG 12 AWG
Warranty 10 years 10 years
@dotspencer
dotspencer / phrasal-verbs.txt
Created January 8, 2024 07:21
List of "Phrasal Verbs" in Alphabetical Order
Account For
Ache For
Act On
Act Out
Act Up
Add On
Add Up
Add Up To
Aim At
Allow For
[
"acrobat",
"africa",
"alaska",
"albert",
"albino",
"album",
"alcohol",
"alex",
"alpha",
@dotspencer
dotspencer / fix-sd-card.md
Last active March 15, 2023 23:17
Fix (reclaim) space on SD card on MacOS

List all your internal and external storage devices

diskutil list

Erase and format the disk (add disk # from above). Be careful to verify the correct disk (size and name).

sudo diskutil eraseDisk FAT32 SDCARD MBRFormat /dev/disk#
@dotspencer
dotspencer / tips.md
Created August 22, 2022 06:14
Raspberry PI tips

Node.js install

I usually use nvm to manage node.js versions for projects, but there are not official binaries for the ARM V6 chip in a Raspberry Pi Zero for node versions 12 and higher. The source is still available, and so if you try nvm install 14.17.4 nvm will attempt to compile from source, which on a Raspberry Pi zero will take a long, long, long time (and probably fail).

Fortunately node.js provides "unofficial builds" of newer node versions for ARM v6 at unofficial-builds.nodejs.org.

You can use these binaries with nvm by providing a url to use instead of the default node.js binaries url:

nodejs 14

@dotspencer
dotspencer / notes.md
Created August 8, 2022 00:05
Google Wifi with Verizon 5G home internet
@dotspencer
dotspencer / added-attributes.js
Last active November 24, 2020 18:31
Default attributes on window (chrome)
(() => {
const defaultKeys = {"window":true,"self":true,"document":true,"name":true,"location":true,"customElements":true,"history":true,"locationbar":true,"menubar":true,"personalbar":true,"scrollbars":true,"statusbar":true,"toolbar":true,"status":true,"closed":true,"frames":true,"length":true,"top":true,"opener":true,"parent":true,"frameElement":true,"navigator":true,"origin":true,"external":true,"screen":true,"innerWidth":true,"innerHeight":true,"scrollX":true,"pageXOffset":true,"scrollY":true,"pageYOffset":true,"visualViewport":true,"screenX":true,"screenY":true,"outerWidth":true,"outerHeight":true,"devicePixelRatio":true,"clientInformation":true,"screenLeft":true,"screenTop":true,"defaultStatus":true,"defaultstatus":true,"styleMedia":true,"onsearch":true,"isSecureContext":true,"performance":true,"onappinstalled":true,"onbeforeinstallprompt":true,"crypto":true,"indexedDB":true,"webkitStorageInfo":true,"sessionStorage":true,"localStorage":true,"onabort":true,"onblur":true,"oncancel":true,"oncanplay":true
@dotspencer
dotspencer / java-tips.md
Last active April 22, 2020 20:38
Java MacOS errors/tips

Error:

Gradle: Could not determine java version from '11.0.2'

List Java versions installed

@dotspencer
dotspencer / challenge.md
Last active March 6, 2020 20:27
Ghost in the Wire

Yjcv ku vjg pcog qh vjg uauvgo wugf da jco qrgtcvqtu vq ocmg htgg rjqpg ecnnu?

'Yjcv ku vjg pcog qh vjg uauvgo wugf da jco qrgtcvqtu vq ocmg htgg rjqpg ecnnu?'.toLowerCase().split('').map(a => {
  if (a === ' ') return a;
  if (a === '?') return a;
  charCode = a.charCodeAt(0) - 2;
  if (charCode < 97) charCode += 26;
  return String.fromCharCode(charCode);
}).join('');