Skip to content

Instantly share code, notes, and snippets.

@mkows
mkows / modern_sql_style_guide.md
Created May 12, 2022 09:23 — forked from mattmc3/modern_sql_style_guide.md
Modern SQL Style Guide
layout author title revision version description
default
mattmc3
Modern SQL Style Guide
2019-01-17
1.0.1
A guide to writing clean, clear, and consistent SQL.

Modern SQL Style Guide

@mkows
mkows / load-resource.scala
Created November 5, 2018 16:57 — forked from banjeremy/load-resource.scala
scala: load files from resources directory
def loadResource(filename: String) = {
val source = scala.io.Source.fromURL(getClass.getResource(filename))
try source.mkString finally source.close()
}

Advanced Functional Programming with Scala - Notes

Copyright © 2017 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@mkows
mkows / iterm.scpt
Last active June 2, 2016 10:47 — forked from gnachman/iterm.scpt
Fix docker quickstart terminal for iTerm2 version 3.0
-- /Applications/Docker/Docker\ Quickstart\ Terminal.app/Contents/Resources/Scripts/iterm.scpt
set itermRunning to (application "iTerm" is running)
set scriptPath to quoted form of POSIX path of ((path to me as text) & "::" & "start.sh")
set user_shell to do shell script "dscl /Search -read /Users/$USER UserShell | awk '{print $2}'"
tell application "iTerm"
activate
if not (exists window 1) or (itermRunning = false) then
reopen
end if
@mkows
mkows / init-sbt.sh
Last active June 22, 2018 10:28 — forked from maciej/init-scala.sh
Init sbt project
#!/bin/bash
# Usage: init-sbt.sh my-new-project
PROJECT_NAME="$1"
SCALA_VERSION="2.11.6"
SCALATEST_VERSION="2.2.4"
mkdir $PROJECT_NAME
cd $PROJECT_NAME
@mkows
mkows / init-scala.sh
Last active August 29, 2015 14:15 — forked from maciej/init-scala.sh
#!/bin/bash
PROJECT_NAME="$1"
SCALA_VERSION="2.9.1"
SCALATEST_VERSION="1.6.1"
MOCKITO_VERSION="1.8.5"
mkdir $PROJECT_NAME
cd $PROJECT_NAME