Skip to content

Instantly share code, notes, and snippets.

View musale's full-sized avatar
Breaking Things 😜

Musale Martin musale

Breaking Things 😜
View GitHub Profile
@musale
musale / Makefile
Created July 26, 2017 14:53 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.

Keybase proof

I hereby claim:

  • I am musale on github.
  • I am musale (https://keybase.io/musale) on keybase.
  • I have a public key ASBOCqg17Qf9QZ-ajWU6i12_NDP5XJRdABikfXz3Ebq80Qo

To claim this, I am signing this object:

scalaVersion in ThisBuild := "2.12.4"
crossScalaVersions := Seq("2.11.12", "2.12.4")
name := "random-quote"
version := "1.0.0-SNAPSHOT"
libraryDependencies += guice
libraryDependencies += "net.codingwell" %% "scala-guice" % "4.1.1"
libraryDependencies += "org.scalatestplus.play" %% "scalatestplus-play" % "3.1.2" % Test
lazy val root = (project in file(".")).enablePlugins(PlayScala)
sbt.version=1.1.1
// The Typesafe repository
resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"
// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.12")
// Scala formatting: "sbt scalafmt"
addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.12")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")%
include "secure"
fixedConnectionPool = 5
repository.dispatcher {
executor = "thread-pool-executor"
throughput = 1
thread-pool-executor {
fixed-pool-size = ${fixedConnectionPool}
}
@musale
musale / routes
Last active March 12, 2018 09:13
GET /quotes controllers.QuotesController.fetch
POST /quotes controllers.QuotesController.add
package controllers
import javax.inject.Inject
import play.api.mvc._
import play.api.libs.json._
// Quotes contoller
class QuotesController @Inject()(cc: ControllerComponents) extends AbstractController(cc) {
# update the leave_duration function like this to return holidays and number_of_leave_days
def leave_duration(date_from, date_to):
with open('outfile', 'rb') as fp:
holidays = pickle.load(fp)
return number_of_holidays(holidays, date_from, date_to), holidays
@musale
musale / .travis.yml
Created April 2, 2018 21:17 — forked from ryboe/.travis.yml
Example .travis.yml for Golang
language: go
# Only the last two Go releases are supported by the Go team with security
# updates. Any versions older than that should be considered deprecated.
# Don't bother testing with them. tip builds your code with the latest
# development version of Go. This can warn you that your code will break
# in the next version of Go. Don't worry! Later we declare that test runs
# are allowed to fail on Go tip.
go:
- 1.9