Skip to content

Instantly share code, notes, and snippets.

View chetstone's full-sized avatar

Chester Wood chetstone

View GitHub Profile
@chetstone
chetstone / EncryptedHomeFolder.md
Last active November 28, 2023 20:35
Encrypted APFS Home Folder on Mac OSX

Encrypted APFS Home Folder on Mac OSX

Note: This is an update of Will Haley's excellent post to use APFS instead of CoreStorage.

UPDATE: Doesn't work on Catalina

The script can't read the file containing the password on the USB thumb drive. When formatted as FAT32 as described below, the user/group of the file is unknown/unknown. But I also tried formatting the USB thumb drive in HFS+, unchecking "Ignore permissions on this volume" and changing the file owner to root:wheel. The file is still not readable to the boot process. Probably something to do with new security restrictions in Catalina. A script running as root reading data from a thumb drive? Makes sense.

Back to previous program

@chetstone
chetstone / nuke-firebase-db-and-users-referenced-therein.js
Last active September 24, 2018 22:13 — forked from cliffhall/nuke-firebase-db-and-users-referenced-therein.js
Nuke a Firebase Database and All User Accounts Referenced Therein
// This fork limits deletion to the first 10 users
// and deletes the data for each user separately (rather than wiping the whole database)
// Because of the firebase quota of 10 deletions/second.
// https://firebase.google.com/docs/auth/limits
// NOTE: Accounts that are not represented in your /users node will not be deleted!
// BLOG: There are other approaches, see: http://cliffordhall.com/2017/04/nuke-firebase-db-and-all-users/
'use strict';
// Get credentials and initialize firebase app
console.log(
@chetstone
chetstone / README.md
Last active May 24, 2023 12:52
Inspecting React-Native AsyncStorage in iOS Simulator

First, cd into the Async directory.

cd `xcrun simctl get_app_container booted $BUNDLE_ID data`/Documents/RCTAsyncLocalStorage_V1

Then review the manifest:

jq < manifest.json

Then to pretty-print a non-null value in the manifest:

@chetstone
chetstone / README.md
Last active June 6, 2018 19:55
Notes on provider change from Colorado Central Telecom to Cielo

I have been considering using a new DNS server which was written up in USA today, quad9. They do threat analysis and block nefarious sites. Yesterday morning I was doing some pinging of quad9 and Google DNS on Colorado central telecom. I repeated the ping tests after the Cielo install.

They show that Cielo has 2 to 3 times the latency, and a lot more jitter. I wonder if this could be related to DSLReport bufferbloat grade of 'F'.? Probably not, I doubt if ICMP packets are buffered.

@chetstone
chetstone / patch33x.sh
Created April 15, 2018 23:29
Patching React-Native in a script run by npm/yarn postinstall
#!/bin/sh
# Fix RN version 33
yarn list react-native |grep react-native |grep 0.33
if [ $? -eq 0 ];
then
echo "Checking that ReactNative v 33 is patched"
cd node_modules/react-native
patch -N -p1 --dry-run --silent < ../../notes/rn33.3x.patch >/dev/null 2>&1
if [ $? -eq 0 ];
@chetstone
chetstone / mongoinstall.html
Last active November 9, 2017 18:35
Installing mongoldb on mac with homebrew
Install MongoDB on Mac OS X Yosemite
by César Trigo · November 6, 2014
from mongodbspain: http://web.archive.org/web/20141121161054/http://www.mongodbspain.com/en/2014/11/06/install-mongodb-on-mac-os-x-yosemite/
OS X Yosemite
Install MongoDB in our Mac is something simple and easy. There are two ways to install MongoDB under Mac OS X:
Manually, through the official binaries
@chetstone
chetstone / Update_DL2_to_1_4_7.md
Last active September 10, 2017 08:54
Update DL2 firmware from 1.4.4 to 1.4.7

DL2 Update

The trouble is the instructions on the Resol website for this update are wrong. I found helpful instructions on the way back machine, but even those had to be adjusted.

Here's what worked for me:

  1. Make sure you are on firmware version 1.4.5 or lower. Go to http://192.168.1.100/cgi-bin/get_resol_device_information (replace 192.168.1.100 with your DL2’s IP address)
  2. Format your SD card. Formatting on the Mac with MS-DOS(FAT) didn’t work for me. I ended up formatting it on my Panasonic camera.
  3. Insert the freshly-formatted card into the DL2, wait till the flashing green light turns solid. . .
# cat /var/log/messages
Jul 9 22:51:07 resol-dl2 syslog.info syslogd started: BusyBox v1.9.2
Jul 9 22:51:07 resol-dl2 daemon.info init: init: starting pid 772, tty '/dev/null': '/sbin/klogd'
Jul 9 22:51:07 resol-dl2 daemon.info init: init: starting pid 773, tty '/dev/tty3': '/usr/bin/tail'
Jul 9 22:51:07 resol-dl2 authpriv.info dropbear[763]: Running in background
Jul 9 22:51:07 resol-dl2 user.notice kernel: klogd started: BusyBox v1.9.2 (2010-06-26 22:19:34 CEST)
Jul 9 22:51:07 resol-dl2 user.notice kernel: Linux version 2.6.22.1 ([email protected]) (gcc version 4.2.1) #1 Sun Jun 27 06:22:13 CEST 2010
Jul 9 22:51:07 resol-dl2 user.warn kernel: CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Jul 9 22:51:07 resol-dl2 user.warn kernel: Machine: Atmel AT91SAM9260-EK
Jul 9 22:51:07 resol-dl2 user.warn kernel: Memory policy: ECC disabled, Data cache writeback
@chetstone
chetstone / Prettier-emacs-config.md
Last active July 1, 2017 19:37
Configurable per-project options for [prettier-emacs](https://github.com/prettier/prettier-emacs)

Given an invocation of prettier in package.json like this:

  "scripts": {
    "prettier": "prettier --write --single-quote --no-semi --trailing-comma es5 --print-width 80 \"*.js\""
  },

Move the options to a config variable like this:

 "scripts": { 
#!/bin/bash
# This script automatically sets the version and short version string of
# an Xcode project from the Git repository containing the project.
#
# To use this script in Xcode, add the script's path to a "Run Script" build
# phase for your application target.
set -o errexit
set -o nounset