Skip to content

Instantly share code, notes, and snippets.

Avatar

Will Sargent wsargent

View GitHub Profile
@wsargent
wsargent / docker_cheat.md
Last active Sep 16, 2020
Docker cheat sheet
View docker_cheat.md
@wsargent
wsargent / win10-dev.md
Last active Aug 2, 2020
Windows Development Environment for Scala
View win10-dev.md

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
wsargent / genca.sh
Last active Jul 30, 2020
Generate a certificate authority and trust anchor keystore, using only keytool
View genca.sh
#!/bin/bash
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
By
U
reddit.com
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 = ["0.0.0.0/0"]
ingress_rules = ["ssh-tcp", "all-icmp"]
@wsargent
wsargent / genclient
Last active Oct 23, 2019
Create a working(!) client certificate for use with nginx, using only keytool
View genclient
#!/bin/bash
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 \
View deploy.sh
#!/bin/bash
REMOTE=play@SERVER_IP
REMOTE_APP=/home/play/PROJECT_NAME/
sbt stage || exit 1;
ssh $REMOTE "cd $REMOTE_APP; ./stop.sh";
rsync -va target/ $REMOTE:$REMOTE_APP/target
ssh $REMOTE "cd $REMOTE_APP; ./start.sh";
@wsargent
wsargent / build.gradle
Created Mar 31, 2019
Gradle with external javadoc
View build.gradle
plugins {
id 'java'
}
repositories {
jcenter()
}
dependencies {
@wsargent
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
wsargent / Scala-Play-App-Docker-Deploy.md
Created Jul 15, 2016 — forked from IncludeSecurity/Scala-Play-App-Docker-Deploy.md
Deploying Scala Play Framework Applications on AWS Beanstalk using Docker containers
View Scala-Play-App-Docker-Deploy.md
You can’t perform that action at this time.