We'll be adding a feature to Bootzooka, a skeleton Scala microservice/web application project.
This will involve using doobie, monix, tapir, http4s, circe and compile-time dependency injection.
If you'd like to follow along:
// Author: Sokdara Cheng | |
// Contact me for web or mobile app development using React or React Native | |
// https://chengsokdara.github.io | |
import React, { createContext, useContext, useReducer } from "react"; | |
import initialState from "./initialState"; // object of initial states | |
import reducer from "./reducer"; // https://reactjs.org/docs/hooks-reference.html#usereducer | |
const Store = createContext({ | |
dispatch: () => null, | |
state: initialState, | |
}); |
We'll be adding a feature to Bootzooka, a skeleton Scala microservice/web application project.
This will involve using doobie, monix, tapir, http4s, circe and compile-time dependency injection.
If you'd like to follow along:
object Main extends App { | |
import math._ | |
// The Expression Problem and my sources: | |
// http://stackoverflow.com/questions/3596366/what-is-the-expression-problem | |
// http://blog.ontoillogical.com/blog/2014/10/18/solving-the-expression-problem-in-clojure/ | |
// http://eli.thegreenplace.net/2016/the-expression-problem-and-its-solutions/ | |
// http://www.ibm.com/developerworks/library/j-clojure-protocols/ | |
package com.typesafe.config.impl | |
import com.typesafe.config.ConfigFactory.parseMap | |
import com.typesafe.config.{Config, ConfigFactory} | |
import scala.collection.JavaConverters._ | |
import scala.io.Source | |
import scala.util.Try | |
// discussion: https://groups.google.com/forum/#!topic/play-framework-dev/t2g-TWbqtzY |
I have been an aggressive Kubernetes evangelist over the last few years. It has been the hammer with which I have approached almost all my deployments, and the one tool I have mentioned (shoved down clients throats) in almost all my foremost communications with clients, and it was my go to choice when I was mocking my first startup (saharacluster.com).
A few weeks ago Docker 1.13 was released and I was tasked with replicating a client's Kubernetes deployment on Swarm, more specifically testing running compose on Swarm.
And it was a dream!
All our apps were already dockerised and all I had to do was make a few modificatons to an existing compose file that I had used for testing before prior said deployment on Kubernetes.
And, with the ease with which I was able to expose our endpoints, manage volumes, handle networking, deploy and tear down the setup. I in all honesty see no reason to not use Swarm. No mission-critical feature, or incredibly convenient really nice to have feature in Kubernetes that I'm go
require('./module.js') // { a: 1 } | |
import module from './module.js' // undefined | |
import { a } from './module.js' // 1 | |
require('./module2.js') // { default: { a: 1 }, b: 2 } | |
import module2 from './module2.js' // { a: 1} | |
import { b } from './module2.js' // 2 | |
require('./module3.js') // { default: { a: 1 }, b: 2 } |
import os | |
import shutil | |
from sstash.sstash import SecureStash | |
from getpass import getpass | |
stash_path = "/my/path/to/stash/file" | |
def store_machine(machine_name): | |
""" | |
Export a docker-machine from to the machines dir. |
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
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 |