Skip to content

Instantly share code, notes, and snippets.

Avatar

Will Sargent wsargent

View GitHub Profile
@dwijnand
dwijnand / localArtifactRepo.sbt
Last active Apr 16, 2017
Local Artifactory & Nexus sbt setup
View localArtifactRepo.sbt
def buildTimestampSuffix = ";build.timestamp=" + new java.util.Date().getTime
val localArtifactoryRelease = "local-artifactory-release" at "http://localhost:8081/artifactory/libs-release"
val localArtifactorySnapshot = "local-artifactory-snapshot" at "http://localhost:8081/artifactory/libs-snapshot"
val localArtifactoryReleaseLocal = "local-artifactory-release-local" at "http://localhost:8081/artifactory/libs-release-local"
def localArtifactorySnapshotLocal = "local-artifactory-snapshot-local" at "http://localhost:8081/artifactory/libs-snapshot-local" + buildTimestampSuffix
val localArtifactoryCreds = Credentials("Artifactory Realm", "localhost", "admin", "password")
// credentials += localArtifactoryCreds
@viktorklang
viktorklang / Gistard.scala
Last active Jun 9, 2017
Gistard — an sbt autoplugin for depending on Gists — such as Gistard itself
View Gistard.scala
/*
Copyright 2015 Viktor Klang
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@acolyer
acolyer / service-checklist.md
Last active Sep 11, 2020
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?
@patriknw
patriknw / LoggingMailbox.scala
Last active Sep 11, 2020
Logs the mailbox size when exceeding the configured limit. Implemented in Scala and Java. Copy one of them to your project and define the configuration. This code is licensed under the Apache 2 license.
View LoggingMailbox.scala
/**
* Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com>
*/
package akka.contrib.mailbox
import scala.concurrent.duration._
import java.util.concurrent.atomic.AtomicInteger
import java.util.concurrent.atomic.AtomicLong
import com.typesafe.config.Config
import akka.actor.{ ActorContext, ActorRef, ActorSystem, ExtendedActorSystem }
@gre
gre / deploy.sh
Last active Nov 15, 2018
Super-small scripts for easy PlayFramework deployment
View deploy.sh
#!/bin/bash
REMOTE=play@SERVER_IP
REMOTE_APP=/home/play/PROJECT_NAME/
sbt stage || exit 1;
rsync -va target/ $REMOTE:$REMOTE_APP/target;
ssh $REMOTE "cd $REMOTE_APP; ./stop.sh";
ssh $REMOTE "cd $REMOTE_APP; ./start.sh";
@tomdz
tomdz / gist:5339163
Last active Jan 22, 2016
Vagrant test setup for haproxy with ssl client certificates
View gist:5339163

Setup vagrant vm

vagrant box add precise64 http://files.vagrantup.com/precise64.box
vagrant init precise64
sed -i 's/# config.vm.network :hostonly/config.vm.network :hostonly/' Vagrantfile
vagrant up
vagrant ssh

Install base software and apache (to have something to proxy)

You can’t perform that action at this time.