Skip to content

Instantly share code, notes, and snippets.

Avatar

Will Sargent wsargent

View GitHub Profile
View .zshrc
export DEFAULT_USER=wsargent
source $HOME/.antigen/antigen.zsh
# Load the oh-my-zsh's library.
antigen use oh-my-zsh
# Bundles from the default repo (robbyrussell's oh-my-zsh).
antigen bundle git
antigen bundle pip
@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:

View gh-clone
# Usage: gh-clone lagom lagom to checkout lagom/lagom
function gh-clone() {
OWNERNAME=$1;
PROJNAME=$2;
cd $WORKDIR;
mkdir $PROJNAME;
cd $PROJNAME;
hub init -g
hub clone $OWNERNAME/$PROJNAME master;
cd master;
@wsargent
wsargent / worktree.sh
Created Oct 5, 2016
Git worktree script
View worktree.sh
export WORKDIR=$HOME/work
# Creates a working tree to check out a branch locally.
# This is useful when you have multiple branches on origin,
# and want to pull work work with them
function worktree() {
# We assume we're always under $WORKDIR somewhere.
# Go down the tree until we know what project we're in.
while [[ "$(dirname "$PWD")" != $WORKDIR ]] ; do
find "$PWD"/ -maxdepth 1 "$@"
@wsargent
wsargent / service-checklist.md
Created Sep 12, 2016 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist
View service-checklist.md

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@wsargent
wsargent / README.md
Created Sep 8, 2016 — forked from loicknuchel/README.md
Missing features in Play i18n
View README.md
View JavaActorLookup.java
import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.util.Timeout;
import scala.compat.java8.FutureConverters;
import scala.concurrent.Future;
import java.util.concurrent.CompletionStage;
import java.util.concurrent.TimeUnit;
public class JavaActorLookup {
@wsargent
wsargent / TracerBulletController.scala
Last active Jan 23, 2018
Supports tracer bullet dynamic logging
View TracerBulletController.scala
package controllers
import javax.inject._
import play.api.mvc._
@Singleton
class TracerBulletController @Inject() extends Controller {
private val logger = org.slf4j.LoggerFactory.getLogger("application")
/*
@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
View TrainDSL.scala
// a Train "at" time produces a TrainFromOps
// a TrainFromOps "from" station produces a Train
// a TrainInfo "at" time produces a TrainInfoFromOps
// a TrainInfoFromOps "from" station produces a TrainInfoAtOps
// a TrainInfoAtOps "at" time produces a TrainFromOps
// TrainOps(train)
// TrainInfoOps(info: TrainInfo)
// TrainFromOps(info, scheudle, time)
You can’t perform that action at this time.