brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
convertRecordsTask : Task Http.Error (List (List String)) -> Task Http.Error (List TrajectoryPoint) | |
convertRecordsTask task = | |
Task.map convertRecords task | |
convertRecords : List (List String) -> List TrajectoryPoint | |
convertRecords records = | |
List.take 10000 records | |
|> List.map convertRecord |
#include <ESP8266WiFi.h> | |
#include <PubSubClient.h> | |
#include <Adafruit_Sensor.h> | |
#include <Adafruit_BME280.h> | |
#include <ArduinoJson.h> | |
const char* SSID = "ssid"; | |
const char* PSK = "wifi key"; | |
const char* MQTT_BROKER = "mqtt ip"; |
private def buildTransactor(c: Connection): Resource[IO, Transactor[IO]] = | |
Blocker[IO].map { b => | |
Transactor.fromConnection[IO](c, b) | |
} | |
private def prestoTransactor(): Resource[IO, Transactor[IO]] = | |
Resource.fromAutoCloseable[IO, Connection] { | |
IO.fromTry(Try { | |
val url = "jdbc:presto://your-presto-jdbc-url" | |
val properties = new Properties() |
prestoTransactor().use { xa => queryProgram(xa) }.unsafeRunSync() |
def queryProgram(xa: Transactor[IO]) = | |
sql"""SELECT your_fields FROM your_table""" | |
.query[YourModel] | |
.stream | |
.transact(xa) | |
.evalMap(d => IO(println(d))) | |
.compile | |
.drain |
docker system prune -a --volumes | |
curl cheat.sh/curl |
# ZIO usage | |
## ZLayer for dependency management | |
- Type safe | |
- Composable | |
- No Magic / No reflection (unlike Guice) | |
- Support for modeling failing dependencies (such as config loading) | |
## Module pattern |