This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// make the editor font look nice | |
"editor.fontSize": 18, | |
"editor.fontFamily": "Monaco, 'Courier New', monospace", | |
// format on pasting and saving | |
"editor.formatOnPaste": true, | |
"editor.formatOnSave": true, | |
// save files automatically | |
"files.autoSave": "afterDelay", | |
// delete trailing whitespace |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Turn on syntax highlighting | |
syntax on | |
" For plugins to load correctly | |
filetype plugin indent on | |
let mapleader = " " | |
" Security: do not trust modelines set in files | |
set modelines=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Package twofer gives a two for one phrase back | |
package twofer | |
import "fmt" | |
// ShareWith returns the two for one statement | |
func ShareWith(name string) string { | |
if name == "" { | |
name = "you" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hamming | |
import ( | |
"errors" | |
) | |
// Distance calculates the Hamming distance between two strings | |
func Distance(a, b string) (int, error) { | |
if len(a) != len(b) { | |
return 0, errors.New("Not same length") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hamming | |
import ( | |
"errors" | |
) | |
// Distance calculates the Hamming distance between two strings | |
func Distance(a, b string) (int, error) { | |
if len(a) != len(b) { | |
return 0, errors.New("Not same length") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scalaVersion := "2.11.8" | |
scalaOrganization := "org.typelevel" | |
libraryDependencies ++= Seq( | |
"org.typelevel" %% "cats" % "0.9.0", | |
"org.atnos" %% "eff" % "4.0.0" | |
) | |
addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.9.3") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package eg.repository.interpreter | |
import cats.{ MonadError, MonadState } | |
import java.time.LocalDate | |
import scala.collection.mutable.{Map => MMap} | |
import cats.Eval | |
import cats.arrow.FunctionK | |
import cats.data.StateT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package learn | |
import java.io.File | |
import cats.{~>, Id} | |
import cats.free.Free | |
import cats.data.Xor | |
import cats.instances.option._ | |
import freek._ | |
import scala.concurrent.Future |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setenv "SBT_OPTS" | |
"-XX:+CMSClassUnloadingEnabled -Xmx2g -Djava.library.path=/usr/local/lib -Djava.awt.headless=true -Dfile.encoding=utf8 -Duser.timezone=UTC") | |
(defun mine-set-sbt-keys-if-possible () | |
(if (sbt:find-root) | |
(mine-set-sbt-keys))) | |
(defun mine-set-sbt-keys () | |
(local-set-key (kbd "C-c s s") 'mine-sbt-switch) | |
(local-set-key (kbd "C-c s c") 'mine-sbt-compile) |
NewerOlder