| # 1. Backup image tags to text file. | |
| # $ docker images --format "{{.Repository}}:{{.Tag}} {{.ID}}" > img_id.txt | |
| # | |
| # 2. Execute clean-docker-for-mac script | |
| # $ bash clean-docker-for-mac.sh $(docker images --format "{{.ID}}" | xargs) | |
| # | |
| # source: https://gist.github.com/MrTrustor/e690ba75cefe844086f5e7da909b35ce#file-clean-docker-for-mac-sh | |
| # | |
| # 3. Execute this script to restore tags from text file. |
| #!/bin/bash | |
| # Copyright 2017 Théo Chamley | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy of | |
| # this software and associated documentation files (the "Software"), to deal in the Software | |
| # without restriction, including without limitation the rights to use, copy, modify, merge, | |
| # publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons | |
| # to whom the Software is furnished to do so, subject to the following conditions: | |
| # | |
| # The above copyright notice and this permission notice shall be included in all copies or |
Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.
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| primary: | |
| image: mongo:3.0 | |
| volumes: | |
| - ./p:/data | |
| ports: | |
| - "27017:27017" | |
| # Our current version of docker-compose doesn't allow extra_hosts which would be the best way | |
| # to add curcular dependency container links in this case. We cant upgrade docker-compose | |
| # without upgrading docker to 1.7, and we can't do that without upgrading the kernel on our | |
| # CentOS VM's. As such we are using the hostname hask below to allow primary and secondary |
| object jto { | |
| type _1 = Succ[_0] | |
| type _2 = Succ[_1] | |
| type _3 = Succ[_2] | |
| type _4 = Succ[_3] | |
| type _5 = Succ[_4] | |
| // Natural numbers (extracted from shapeless) |
| import scalaz.effect.IO | |
| import scalaz.std.function._ | |
| import scalaz.{Coyoneda, Free, Monad, State, ~>} | |
| object NonFunctor extends App { | |
| // my simple algebra | |
| sealed trait Console[A] | |
| case class PrintLine(msg: String) extends Console[Unit] | |
| case object ReadLine extends Console[String] |
| import static java.lang.System.*; | |
| import java.util.function.BiFunction; | |
| import java.util.function.Function; | |
| // Implementation of a pseudo-GADT in Java, translating the examples from | |
| // http://www.cs.ox.ac.uk/ralf.hinze/publications/With.pdf | |
| // The technique presented below is, in fact, just an encoding of a normal Algebraic Data Type | |
| // using a variation of the visitor pattern + the application of the Yoneda lemma to make it | |
| // isomorphic to the targeted 'GADT'. |
Recent improvements to the ClojureScript compiler have greatly simplified setting up development versus production outputs.
This example uses Figwheel as something that you want to exclude for production, but the pattern is general.
With this simple setup you only need one html file/view and it will work for developement and production.
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).