Skip to content

Instantly share code, notes, and snippets.


Will Sargent wsargent

View GitHub Profile
wsargent /
Last active Sep 16, 2020
Docker cheat sheet
wsargent /
Last active Aug 2, 2020
Windows Development Environment for Scala

Windows 10 Development Environment for Scala

This is a guide for Scala and Java development on Windows, using Windows Subsystem for Linux, although a bunch of it is applicable to a VirtualBox / Vagrant / Docker subsystem environment. This is not complete, but is intended to be as step by step as possible.

Harden Windows 10

Read the entire Decent Security guide, and follow the instructions, especially:

wsargent /
Last active Jul 30, 2020
Generate a certificate authority and trust anchor keystore, using only keytool
export PW=`cat password`
# Create a self signed key pair root CA certificate.
keytool -genkeypair -v \
-alias exampleca \
-dname "CN=exampleCA, OU=Example Org, O=Example Company, L=San Francisco, ST=California, C=US" \
-keystore exampleca.jks \
-keypass:env PW \
View medical.txt
LPT everything you need to know about medical insurance to avoid getting screwed over, based on 25 years of experience
5 min
View Original
I worked for a Blue Cross affiliate for nearly three decades and frequently see questions here about medical insurance. I wanted to share some helpful tips about some common roadblocks people run into.
Firstly, medical insurance has many, many policies in place, but you have to ask for them.
View bastion.txt
module "aws_security_group" {
source = "terraform-aws-modules/security-group/aws"
version = "~> 3.0"
name = "bastion"
description = "Security group for bastion"
vpc_id = module.vpc.vpc_id
ingress_cidr_blocks = [""]
ingress_rules = ["ssh-tcp", "all-icmp"]
wsargent / genclient
Last active Oct 23, 2019
Create a working(!) client certificate for use with nginx, using only keytool
View genclient
export PW=`pwgen -Bs 10 1`
echo "$PW" > password
# Create a self signed certificate & private key to create a root certificate authority.
keytool -genkeypair -v \
-alias clientCA \
-keystore client.jks \
sbt stage || exit 1;
ssh $REMOTE "cd $REMOTE_APP; ./";
rsync -va target/ $REMOTE:$REMOTE_APP/target
ssh $REMOTE "cd $REMOTE_APP; ./";
wsargent / build.gradle
Created Mar 31, 2019
Gradle with external javadoc
View build.gradle
plugins {
id 'java'
repositories {
dependencies {
wsargent / Directions for creating PEM files
Created Aug 1, 2018 — forked from dain/Directions for creating PEM files
Create Java KeyStore from standard PEM encoded private key and certificate chain files
View Directions for creating PEM files
# To regenerate the test key and certificates
# Generate an RSA private key and convert it to PKCS8 wraped in PEM
openssl genrsa 2048 | openssl pkcs8 -topk8 -inform pem -outform pem -nocrypt -out rsa.key
# Generate a certificate signing request with the private key
openssl req -new -key rsa.key -out rsa.csr
# Sign request with private key
openssl x509 -req -days 10000 -in rsa.csr -signkey rsa.key -out rsa.crt
wsargent /
Created Jul 15, 2016 — forked from IncludeSecurity/
Deploying Scala Play Framework Applications on AWS Beanstalk using Docker containers
You can’t perform that action at this time.