Skip to content

Instantly share code, notes, and snippets.

Mike Gehard mikegehard

Block or report user

Report or block mikegehard

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Help.scala
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
View Example.kt
enum class EducationLevel {
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 / Installing .net
Last active Aug 29, 2015
dotNet Learnings
View Installing .net
* - aspnet home
* - code editor
View gist:0de4097da14a1bba158f
BOSH manifest
- name: harvey
- aggregate:
- get: harvey
- task: unit-tests
file: harvey/concourse/unit-tests.yml

Keybase proof

I hereby claim:

  • I am mikegehard on github.
  • I am 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:


Keybase proof

I hereby claim:

  • I am msgehard on github.
  • I am 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:

View gist:6147967
TDD by Example
Extreme Programming Explained
mikegehard / Test File
Last active Dec 17, 2015
Test file and errors encountered when trying to run two browser based tests in the same Play test file.
View 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 / application.js
Last active Dec 22, 2016
Lineman questions
View application.js
/* 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: [
mikegehard / code.scala
Created Dec 15, 2012
Problems with JSON API tests in Play2
View code.scala
object BetaInvitationRequestController extends Controller {
val successResponse = Map("success" -> true)
val betaInvitationRequestMapping = Forms.mapping(
"email" ->
val betaInvitationRequestForm = Form(betaInvitationRequestMapping)
def create = Action {
You can’t perform that action at this time.