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
import scala.tools.nsc._ | |
import java.io._ | |
val scalaLibraryPath = "/Users/wfaler/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.2.jar" | |
val s = new Settings() | |
s.bootclasspath.append(scalaLibraryPath) | |
s.classpath.append(scalaLibraryPath) | |
val g = new Global(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
import Control.Lens | |
import Heist | |
heistConfig = | |
(set hcNamespace "") $ | |
(set hcInterpretedSplices defaultInterpretedSplices) $ | |
(set hcLoadTimeSplices defaultLoadTimeSplices) $ | |
(set hcTemplateLocations [loadTemplates "templates"]) $ | |
emptyHeistConfig |
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
(require 'package) | |
(setq package-list '(markdown-mode | |
yaml-mode | |
js2-mode | |
find-file-in-project | |
auto-complete | |
ghc | |
nix-mode | |
dockerfile-mode | |
ensime |
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
docker rmi [image id] # remove image | |
docker ps -a # list all images | |
docker rm [container id/name] # remove container | |
docker stop [container id/name] | |
# start docker, bind container port 4000 to 4000 on host, use host network to access container (only in dev!) | |
docker run -p 4000:4000 --name [name] --net=host -d [image name] [command] |
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
{"name":"Afghanistan","country_code":"AF"} |
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
(require 'package) | |
(setq package-list '(markdown-mode | |
yaml-mode | |
js2-mode | |
find-file-in-project | |
auto-complete | |
ghc | |
haskell-mode | |
flycheck | |
flycheck-haskell |
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
ioMaybe :: Maybe a -> (a -> IO (Maybe b)) -> IO (Maybe b) | |
ioMaybe (Just a) fn = fn a | |
ioMaybe Nothing _ = return Nothing |
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
class Foo{ | |
val foo = List(bar) | |
val bar = baz | |
val baz = "foo" | |
} | |
// compiles |
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
(defun set-exec-path-from-shell-PATH () | |
(let ((path-from-shell (replace-regexp-in-string | |
"[ \t\n]*$" | |
"" | |
(shell-command-to-string "$SHELL --login -i -c 'echo $PATH'")))) | |
(setenv "PATH" path-from-shell) | |
(setq eshell-path-env path-from-shell) ; for eshell users | |
(setq exec-path (split-string path-from-shell path-separator)))) |
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
- name: ensure known hosts | |
shell: touch ~/.ssh/known_hosts creates=~/.ssh/known_hosts | |
- name: remove github.com from known host | |
shell: ssh-keygen -R github.com | |
- name: ensure github.com in known host | |
shell: ssh-keyscan -H github.com > ~/.ssh/known_hosts |