These are the Kickstarter Engineering and Data role definitions for both teams.
/* | |
* Copyright 2017 Daniel Spiewak | |
* | |
* 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 |
// Works for scalafmt 0.5.5 | |
// From https://gist.github.com/hseeberger/03677ef75bfadb7663c3b41bb58c702b | |
// Thank you @hseeberger! | |
import org.scalafmt.bootstrap.ScalafmtBootstrap | |
import org.scalafmt.sbt.ScalafmtPlugin | |
import sbt._ | |
import sbt.Keys._ | |
import sbt.inc.Analysis |
// admittedly there is some optional implicit magic below to reduce some boiler place, | |
// but it is only using implicits, not runtime reflection as many test frameworks do | |
// usage: stand-alone test | |
object MyTest extends Test( | |
assert(2 == 1+1) | |
) | |
// usage: test suite | |
object MySuite extends TestSuite( |
Kris Nuttycombe asks:
I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?
I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.
I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.
// Used in shapeless here: https://github.com/milessabin/shapeless/blob/master/core/src/main/scala/shapeless/syntax/singletons.scala#L42 | |
scala> def narrow[T <: AnyRef](t: T): t.type = t | |
narrow: [T <: AnyRef](t: T)t.type | |
scala> val s1 = narrow("foo") // Widened | |
s1: String = foo | |
scala> def narrow[T <: AnyRef](t: T): t.type {} = t // Note empty refinement | |
narrow: [T <: AnyRef](t: T)t.type |
#!/usr/bin/ruby | |
require 'json' | |
DESC_HEAD = /^\.([^\.\[]+)/ | |
DEREF_HEAD = /^\[(\d+)\]/ | |
def usage | |
$stderr.puts <<USAGE | |
usage: json descriptor |
# | |
# Proof of concept for a HAProxy maintenance mode | |
# | |
# | |
# Control the maintenance page during runtime using the stats socket: | |
# | |
# To put the whole site in maintenance mode (for all IPs): | |
# > add acl #0 0.0.0.0/0 | |
# | |
# To exclude your own ip, so you are able to test things out: |
In the following, replace the REPO_NAME
value with the natural-language name of your repository, replace REPOSITORY
with the domain name (e.g. repo1.maven.org
) and replace USERNAME
with your repository user.
credentials += {
val Password = """.*password: "([^"]+)".*""".r
var lines: String = ""
val logger = new ProcessLogger {
def info(s: => String) = {}