Skip to content

Instantly share code, notes, and snippets.

View sfosdal's full-sized avatar

Steve Fosdal sfosdal

View GitHub Profile
@sfosdal
sfosdal / Main.scala
Last active July 19, 2017 17:28
1039519: mistaken unused import
import cats.implicits._ // IntelliJ thinks this is unused
import cats.kernel.Semigroup
object Main extends App {
val f: (Int) => Int = Semigroup.combine((_: Int) + 1, (_: Int) * 10)
println(s"f(6): ${f(6)}")
}
@sfosdal
sfosdal / web-servers.md
Created January 31, 2018 18:48 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
package com.apptentive.profile.routes
import java.util.UUID
import java.util.UUID.fromString
import akka.http.scaladsl.server.Directive1
import akka.http.scaladsl.server.Directives._
import com.apptentive.profile.routes.Paging._
import scala.util._
Make me one with everything.