Skip to content

Instantly share code, notes, and snippets.

View jesboat's full-sized avatar

Jade Sailor jesboat

  • Boston, MA
View GitHub Profile
if (this.hardMode) {
var t = (
function() {
var thisGuess = s;
var previousGuess = this.boardState[this.rowIndex - 1];
var previousEvaluation = this.evaluations[this.rowIndex - 1];
if (!thisGuess || !previousGuess || !previousEvaluation) {
return {
validGuess: true,
#!/bin/bash
# These are the versions of the things I had installed
# when I noticed the issue
pkgs=(
# pyre + dependency tree
pyre_check==0.0.46
libcst==0.3.6
PyYAML==5.3.1
typing_extensions==3.7.4.2
This file has been truncated, but you can view the full file.
Sampling process 5829 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling pyre.bin (pid 5829) every 1 millisecond
Process: pyre.bin [5829]
Path: /Users/jon/scratch/s-TF3L/testcase/venv1/bin/pyre.bin
Load Address: 0x107085000
Identifier: pyre.bin
Version: 0
Code Type: X86-64
Parent Process: pyre.bin [5739]
#!/usr/bin/perl
use strict;
use warnings;
use autodie;
use IPC::Open2;
sub read_panic {
@jesboat
jesboat / NOTES.md
Created May 6, 2020 22:18
kernel debug notes

Reboot to recovery mode. Turn off SIP and secure boot. Boot back to normal mode.

Go to https://developer.apple.com/download/more/ and click "More" in the upper-right. Search for "Kernel". Download and install the Kernel Debug Kit for your build of macOS (run sw_vers on the command line to get it. A nearby KDK will often work; installing one is harmless.

For the KDK, exact build number is best and should definitely work. Otherwise, after installing it, you can see if the release kernel in the KDK (e.g. /Library/Developer/KDKs/KDK_10.14.6_18G2016.kdk/System/Library/Kernels/) matches the actual kernel (/System/Library/Kernels/kernel) with diff/shasum/whatever. If they match, the KDK will probably work. If they don't, the KDK might work. Probably nothing horrible will happen if you try and it doesn't.

Once you decide to use a KDK (or not), install the development kernel:

sudo mount -uw /
bash -c '
if [ "$(whoami)" = root ]; then
echo "No, you are supposed to run this bit as non-root"
exit 1
fi
sudo -v
pass=$(openssl rand -hex 16 | sed -e "s/\\(....\\)/\\1-/g; s/-\$//")
echo "Chosen random password: $pass"
{
echo "root:$pass"
pub fn voidfn() -> () {}
@jesboat
jesboat / resign-chrome-secure-prefs.py
Created August 14, 2019 02:12
python script to fix signatures in a chrome profile after moving it to a new computer (macOS)
#!/usr/bin/env python3
import argparse
import functools
import hmac
import json
import plistlib
import subprocess
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
This file has been truncated, but you can view the full file.
Jan 1 in a year $y mod 400 = 0$
Jan 2 in a year $y mod 400 = 0$
Jan 3 in a year $y mod 400 = 0$
Jan 4 in a year $y mod 400 = 0$
Jan 5 in a year $y mod 400 = 0$
Jan 6 in a year $y mod 400 = 0$
Jan 7 in a year $y mod 400 = 0$
Jan 8 in a year $y mod 400 = 0$
Jan 9 in a year $y mod 400 = 0$
Jan 10 in a year $y mod 400 = 0$