Skip to content

Instantly share code, notes, and snippets.

View phaseOne's full-sized avatar

Evan Bovie phaseOne

View GitHub Profile

Framework Laptop Diagnostic LED Sequence (Intel 11th Gen Intel® Core™)

# Blink Color Description enum value in EC firmware
White Start of diagnosis DIAGNOSTICS_START
1 Red/Green Battery connected check DIAGNOSTICS_HW_NO_BATTERY
2 Red/Green Power Good 3V5V supply DIAGNOSTICS_HW_PGOOD_3V5V
3 Red/Green Power Good VCCIN_AUX DIAGNOSTICS_VCCIN_AUX_VR
4 Red/Green CPU deassert sleep S4 DIAGNOSTICS_SLP_S4
5 Red/Green Power boot core VR DIAGNOSTICS_HW_PGOOD_VR
@phaseOne
phaseOne / balena-offline-update.sh
Last active September 9, 2022 00:51
An interactive bash script that performs a Balena Offline Update on an SD card
#!/bin/bash
# NOTE: This script requires that jq is installed on your system.
set -euo pipefail
# set -x
echo "Specify the path to your SSH public key. It will be added to the device and used to SSH into the device after provisioning to help in debugging if needed."
read -r -p 'Path to your SSH public key: ' ssh_key
if [ -z "$ssh_key" ]; then
@phaseOne
phaseOne / savePlayerFrame.js
Last active July 29, 2022 06:53
Download the currently displayed frame of a YouTube video as a PNG
const saveBlob = (blob, fileName) => {
const a = document.createElement("a");
document.body.appendChild(a);
a.style = "display: none";
const url = window.URL.createObjectURL(blob);
a.href = url;
a.download = fileName;
a.click();
window.URL.revokeObjectURL(url);
};
@phaseOne
phaseOne / ZD620 Recovery Commands.md
Created March 3, 2022 18:47
Walmart / Sams Club ZD620 Recovery Commands

ZD620 Configuration

ZD620 and ZD420 Users Guide (en)
Zebra Setup Utilities: Sending Printer Commands and Receiving Data
Zebra Programming Guide

Use default WML

To restore the factory Zebra menus, you need to set display.root_wml property to its default and delete the custom WMINDEX.WML file. See Zebra Setup Utilities: Sending Printer Commands and Receiving Data for how to communicate with the printer. If you want, you can also use the ZSU to backup the WMINDEX.WML file before deleting it. There are likely a nu

@phaseOne
phaseOne / SelfManageCredentialsAndRequireMFA.json
Created April 7, 2021 21:05
AWS IAM Policy to self-manage Credentials and require MFA, but allow the user to change their password on first login
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowViewAccountInfo",
"Effect": "Allow",
"Action": [
"iam:GetAccountPasswordPolicy"
],
"Resource": "*"

Keybase proof

I hereby claim:

  • I am phaseone on github.
  • I am evanbovie (https://keybase.io/evanbovie) on keybase.
  • I have a public key ASDvnz6lVgSKR2d2IuT4Y3chZGcNBD7gPm_LusHrfuqjego

To claim this, I am signing this object:

@phaseOne
phaseOne / .block
Last active September 28, 2017 21:09 — forked from mbostock/.block
Perspective Transformation
license: gpl-3.0
@phaseOne
phaseOne / AirfoilVolumeControl.scpt
Last active February 9, 2016 08:21
AppleScript for controlling Airfoil Volume/Mute from the command line with Karabiner
(* pass parameters to the script from the terminal to determine action *)
-- $ osascript AirfoilVolumeControl.scpt up
-- $ osascript AirfoilVolumeControl.scpt down
-- $ osascript AirfoilVolumeControl.scpt mute
(* muting requires enabling assistive access for the parent process since there's no AppleScript method for muting Airfoil without storing persistent variables *)
(* you can also remove the 'on run action' section of the script. This still allows you to invoke the adjustVolume function to directly manipulate the volume level *)
@phaseOne
phaseOne / Whole Page
Created August 29, 2012 19:06
Affix Issue
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Printed Tags · TagPrinters.com</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Le styles -->
<link href="assets/css/bootstrap.css" rel="stylesheet">
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">