Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block kennwhite

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kennwhite /
Last active Apr 17, 2019
Restaurant style chicken/prawn korma - mere mortal version (v. 1)

Kenn's Chicken/King Prawn Coconut Curry (Korma)


  • 2 cups red or yellow onions, well peeled, loosely chopped
  • 6 cloves peeled garlic, finely grated
  • 2" peeled ginger root, finely grated
  • Optional: 1 medium serrano green pepper, seeded & cored, finely minced (leave out for no heat, use half pepper for medium, full for spicy)
  • 14 oz plain greek yogurt (2% or whole milk, eg FAGE 5%)
  • large can (~14 oz) unsweetened coconut milk (ideally containing no guar gum; well blended if it does)
  • 3 TB cashew butter
kennwhite /
Last active Sep 20, 2018
Dev environment setup for native Linux apps (VMs & containers) in ChromeOS Stable

Notes for setting up a dev environment in Chrome Linux (Crostini VMs & containers) on Chromebooks

Once Linux Apps has been enabled in System menu, open a browser window

Open a CROSH window: ctrl-shift-T


Enter built-in ChromeOS Linux VM termina, based on Gentoo

View .crostini-setup
These scripts set up Crostini on my Pixelbook
kennwhite /
Last active Sep 16, 2018
Enable Authentication for new install of MongoDB
sudo sed -i-`date -u|tr ' ' '_'`.bak 's/^#security:*/security:\n authorization: enabled/' /etc/mongod.conf
_mpwd=$(head -c 32 /dev/urandom 2>&1 | sha1sum | head -c 14 )
echo "db.createUser({user:'dba',pwd:'$_mpwd',roles:['root']})"|mongo admin 2>&1>/dev/null
sudo service mongod restart && sleep 5
kennwhite /
Last active Mar 20, 2019
Install MongoDB 4.x Enterprise on Debian 9
# To completely purge all remnants of Mongo (repo conf, pkgs, apt cache, DB files, pgp keys):
# sudo service mongod stop ; sudo apt-get purge -y mongodb-enterprise* ; sudo rm -rf /etc/apt/sources.list.d/mongodb* ; sudo rm -rf /var/lib/mongodb ; sudo apt-get clean; sudo apt-get autoclean ; sudo apt-get -y autoremove ; sudo apt-key del 9DA31620334BD75D9DCB49F368818C72E52529D4 ; sudo rm -rf /etc/mongod* ; sudo rm -rf /var/log/mongo ; sudo rm -rf /etc/apt/sources.list.d/mongodb-enterprise.list /etc/systemd/system/
echo Installing MongoDB 4.x Enterprise edition...
sudo apt-get install -y gnupg2 libcurl3
sudo apt-key adv --keyserver hkps:// --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
kennwhite /
Created Sep 2, 2018 — forked from neilstuartcraig/
This builds NGINX from source with BoringSSL for Debian (alike?) systems with systemd (e.g. Debian Jessie)
# Pre-req
sudo apt-get update
sudo apt-get upgrade -y
# Install deps

How to Generate & Use Private Keys using OpenSSL's Command Line Tool

These commands generate and use private keys in unencrypted binary (not Base64 “PEM”) PKCS#8 format. The PKCS#8 format is used here because it is the most interoperable format when dealing with software that isn't based on OpenSSL.

OpenSSL has a variety of commands that can be used to operate on private key files, some of which are specific to RSA (e.g. openssl rsa and openssl genrsa) or which have other limitations. Here we always use

kennwhite /
Last active Sep 1, 2018
Create valid self-signed certificates with SAN to use in a Chrome OS VM container that are trustable by Chrome & Firefox
# This should be executed in a folder in your Linux Files namespace
# You can move these later, but you'll need to reference the files in nginx/apache later
# I chose: /home/kenn/nginx_tmp but /etc/nginx/xxx or /etc/ssl/xxx is probably better
# Just make sure to verify/chown to nginx-readable perms
# Generate RSA signing keys for RSA certs
# openssl genrsa -out rootCA.key 4096
# openssl genrsa -out server.key 4096
kennwhite /
Last active Jun 22, 2018
Self-signed localhost ("linuxhost") CA cert w/ SAN attributes to make Chrome & FF happy
# Gen CA root key
openssl genrsa -out server_rootCA.key 4096
# Gen self-signed root CA cert
openssl req -x509 -new -key server_rootCA.key -sha256 -days 3650 \
-subj '/O=Cert-O-Matic/OU=You get a cert and YOU get a cert/C=US/CN=Certs R Us' \
-out server_rootCA.pem
kennwhite /
Created May 15, 2018
Test advertised ciphersuites from a TLS-enabled server
#!/usr/bin/env bash
# By Romeo Ninov:
# OpenSSL requires the port number.
ciphers=$(openssl ciphers 'ALL:eNULL' | sed -e 's/:/ /g')
You can’t perform that action at this time.