Skip to content

Instantly share code, notes, and snippets.

@witzatom
witzatom / install_polynote.sh
Last active December 18, 2019 10:42
Script to use as a bootstrap step for polynote on EMR
#!/bin/bash
# Requirements (on non-EMR machines):
# * init-ctl or systemctl
# * packages python3.6 python3.6-venv python3.6-dev
# * python3 -V has to be 3.6+ (update-alternatives)
# * JAVA_HOME pointing to java 8 (openjdk or oracle)
# * SPARK_HOME set and included in PATH (see https://polynote.org/docs/01-installation.html)
set -ex
@witzatom
witzatom / MoveDotsToStartsOfLines.scala
Created May 10, 2019 12:40
MoveDotsToStartsOfLines
package fix
import scalafix.v1._
import scala.meta._
class MoveDotsToStartsOfLines extends SyntacticRule("MoveDotsToStartsOfLines") {
override def fix(implicit doc: SyntacticDocument): Patch = {
val (matches, _) = doc.tokens.foldLeft((Seq.empty[Seq[Token]], Seq.empty[Token])){
case ((matchingSequences: Seq[Seq[Token]], matchingSoFar: Seq[Token]), token: Token) =>
@witzatom
witzatom / README.md
Last active May 31, 2018 09:17
Sentry docker-compose automatic bootstrap

A docker-compose with a few scripts that ensure the complete bootstrap process of a sentry server. The bootstrap will:

  • do an initial setup of the database
  • create a superuser based on environment variables
  • create projects with a project key based on environment variables

The filenames in gists cannot contain '/' to indicate a directory, so i put a | to indicate a subdirectory.

To run the bootstrap first set the environment variables neccessary via:

source ./env.sh