Skip to content

Instantly share code, notes, and snippets.

View wsargent's full-sized avatar

Will Sargent wsargent

View GitHub Profile
View ToField.scala
package com.example
import com.tersesystems.echopraxia.api.{Condition => JCondition, _}
import com.tersesystems.echopraxia.plusscala.{DefaultLoggerMethods, Logger}
import com.tersesystems.echopraxia.plusscala.api.{FieldBuilder, _}
import scala.jdk.FunctionConverters.enrichAsJavaFunction
case class Foo(name: String, age: Int)
case class Bar(name: String, age: Int)
View logrewrite.scala
package fix
import scalafix.v1._
import scala.meta._
class RewriteToStructured extends SemanticRule("RewriteToStructured") {
override def fix(implicit doc: SemanticDocument): Patch = {
doc.tree.collect {
case logger@Term.Apply(Term.Select(loggerName, methodName), List(Term.Interpolate(Term.Name("s"), parts, args))) if matchesType(loggerName) =>
package com.tersesystems.buffer.serde;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
import java.util.function.Function;
package com.tersesystems.rifter.spi;
import java.nio.ByteBuffer;
import java.util.function.Consumer;
import static com.tersesystems.rifter.spi.LogInstant.createLogInstant;
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 / build.gradle
Created March 31, 2019 17:10
Gradle with external javadoc
View build.gradle
plugins {
id 'java'
repositories {
dependencies {
wsargent / Directions for creating PEM files
Created August 1, 2018 18:03 — 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 / Gemfile
Last active May 24, 2018 14:15
Octopress configuration files for
View Gemfile
source ""
gem "jekyll", "~> 3.6.0"
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.9.2"
gem 'jekyll-paginate'
gem 'jekyll-redirect-from'
gem 'jekyll-sitemap'