Skip to content

Instantly share code, notes, and snippets.

jgogstad /
Created Nov 16, 2021
JSON to markdown

JSON → Markdown

brew install csvkit
jq -r '["pt", "c"], (.[] | [.pt, .c]) | @csv' <<< '[
jgogstad /
Created Nov 11, 2021
JVM management on macOS: Jabba and jEnv
  • Jabba: Manage JVMs installations
  • jEnv: What JVM to use in shell/global/local directory.

jEnv supports automatically changing JVMs based on current working directory


brew install jabba
brew install jenv
jgogstad /
Last active Nov 16, 2020
Disable unused scalac linters only in IntelliJ

sbt-tpolecat IntelliJ exemptions

This plugin lets you enforce strict linting rules and iterate quickly in IntelliJ at the same time.

Configure your build with sbt-tpolecat to prevent unused imports, unused parameters etc. to reach main. Adding the plugin below causes the following behavior:

  • All linters are enforced in sbt
  • The -Wunused:* flags are not enforced in IntelliJ
jgogstad / gist:38f1e58f6c43f6cac0efd2ec96537cff
Last active Apr 3, 2020 — forked from VladUreche/gist:8396624
Scaladoc tutorial for, in a pitiful state
View gist:38f1e58f6c43f6cac0efd2ec96537cff

Scaladoc Developer Guide


Scaladoc is the tool that enables developers to automatically generate documentation for their Scala (and Java) projects. It is Scala's equivalent of the widely-used Javadoc tool. This means that Javadoc (and even doxygen) users will be familiar with Scaladoc from day 1: for them, it is most beneficial to check out the Scaladoc/Javadoc comparison tables and if necessary, skim through this document to understand specific features.

The rest of this tutorial is aimed at developers new to Scaladoc and other similar tools. It assumes a basic understanding of the Scala language, which is necessary to follow the examples given throughout the tutorial. For the user perspective on the Scaladoc-generated documentation, such as finding a class, understanding the page layout, navigating through diagrams, please refer to the Scaladoc User Guide.

The tutorial will start by a short motivation and then will explain the main concept in Scaladoc: the doc comment.

Why document?

View Old airflow launcher
airflow@airflow-scheduler-5469fb5f8f-rkz76:/$ which airflow
airflow@airflow-scheduler-5469fb5f8f-rkz76:/$ cat $(!!)
cat $(which airflow)
# -*- coding: utf-8 -*-
# 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
View Composer 1.9 Airflow launcher
root@b77bc7671df6:/# which airflow
root@b77bc7671df6:/# cat $(!!)
cat $(which airflow)
# EASY-INSTALL-DEV-SCRIPT: 'apache-airflow===1.9.0-composer','airflow'
__requires__ = 'apache-airflow===1.9.0-composer'
__file__ = '/usr/local/lib/airflow/airflow/bin/airflow'
exec(compile(open(__file__).read(), __file__, 'exec'))

Keybase proof

I hereby claim:

  • I am jgogstad on github.
  • I am jgogstad ( on keybase.
  • I have a public key ASB2AhHQzjucICqQH8XQZ3P5dY6RVxxpq6g6oaEz1tQuqQo

To claim this, I am signing this object:

jgogstad / YamlJsonProtocol.scala
Last active Jun 14, 2018
YAML -> JSON -> HOCON -> CaseClass -> HOCON -> JSON -> YAML using Json4s, moultingyaml and pureconfig
View YamlJsonProtocol.scala
import org.json4s._
import org.json4s.JsonAST.{JArray, JNull, JObject, JNumber}
import net.jcazevedo.moultingyaml._
import net.jcazevedo.moultingyaml.DefaultYamlProtocol._
object YamlJsonProtocol extends CollectionFormats {
implicit object JValueYamlFormat extends YamlFormat[JValue] {
override def write(jv: JValue): YamlValue = jv match {
jgogstad /
Created Dec 4, 2017 — forked from kevin-smets/
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)