Skip to content

Instantly share code, notes, and snippets.

View mikegehard's full-sized avatar

Mike Gehard mikegehard

  • VMware
  • Chattanooga, TN
  • 01:54 (UTC -04:00)
View GitHub Profile
[
{
"openapi": "3.0.1",
"info": {
"title": "Animal Rescue (from Gist)",
"description": "Sample application for Spring Cloud Gateway commercial product demos.",
"version": "1.0.0-K8s-hack"
},
"externalDocs": {
"url": "https://github.com/spring-cloud-services-samples/animal-rescue/"
def apply(petRepository: PetRepository, contestResultRepository: ContestResultRepository, rules: Rules)
(pet1Id: UUID, pet2Id: UUID)
(implicit ec: ExecutionContext): Future[Either[String, UUID]] = {
val id = java.util.UUID.randomUUID
for {
pet1: Option[Pet] <- petRepository.find(pet1Id)
pet2: Option[Pet] <- petRepository.find(pet2Id)
// this is messy, try to change it to a more functional style at some point
enum class EducationLevel {
HIGH_SCHOOL, BACHELORS, MASTERS, PHD
}
data class Person(val age: Int, val smoker: Boolean, val income: Int, val education: EducationLevel)
val people = listOf(
Person(19, false, 10000, EducationLevel.HIGH_SCHOOL),
Person(49, true, 120000, EducationLevel.BACHELORS),
Person(55, false, 400000, EducationLevel.MASTERS),
@mikegehard
mikegehard / Installing .net
Last active August 29, 2015 14:24
dotNet Learnings
* http://www.itworld.com/article/2917266/development/how-to-install-and-use-visual-studio-code-and-aspnet-5-on-mac-os-x.html
* https://github.com/aspnet/home - aspnet home
* https://code.visualstudio.com/Docs/setup - code editor
BOSH manifest
++++++++++++++++++
jobs:
- name: harvey
plan:
- aggregate:
- get: harvey
- task: unit-tests
file: harvey/concourse/unit-tests.yml
@mikegehard
mikegehard / keybase.md
Created February 2, 2015 14:54
keybase.md

Keybase proof

I hereby claim:

  • I am mikegehard on github.
  • I am mikegehard (https://keybase.io/mikegehard) on keybase.
  • I have a public key whose fingerprint is 76DF DBA9 B34B 8800 8D5F D321 C768 9F51 5BBF 176E

To claim this, I am signing this object:

@mikegehard
mikegehard / keybase.md
Created January 25, 2015 02:58
keybase.md

Keybase proof

I hereby claim:

  • I am msgehard on github.
  • I am mikegehard (https://keybase.io/mikegehard) on keybase.
  • I have a public key whose fingerprint is RETU RN T HIS. PGP. GET_ FING ERPR INT( ); }

To claim this, I am signing this object:

Books
TDD by Example
Extreme Programming Explained
Videos
http://vimeo.com/68375232
@mikegehard
mikegehard / Test File
Last active December 17, 2015 03:39
Test file and errors encountered when trying to run two browser based tests in the same Play test file.
package test.features
import org.specs2.mutable.Specification
import play.api.test.{Helpers, FakeApplication, WithBrowser}
import java.util.concurrent.TimeUnit
import play.api.db.DB
import slick.session.Database
import slick.jdbc.StaticQuery
import Database.threadLocalSession
import models.{BetaInvitationRequests, BetaInvitationRequest}
@mikegehard
mikegehard / application.js
Last active December 22, 2016 13:43
Lineman questions
/* Exports an object that defines
* all of the configuration needed by the projects'
* depended-on grunt tasks.
*
* You can find the parent object in: node_modules/lineman/config/application.js
*/
module.exports = require('lineman').config.extend('application', {
appTasks: {
common: [