bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
| package akkahttptest | |
| import akka.actor.ActorSystem | |
| import akka.http.Http | |
| import akka.stream.FlowMaterializer | |
| import akka.http.server._ | |
| import akka.http.marshalling.PredefinedToResponseMarshallers._ | |
| import akka.stream.scaladsl.{HeadSink, Source} | |
| object Proxy extends App { |
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
| alias kc='kubectl' | |
| alias kclf='kubectl logs --tail=200 -f' | |
| alias kcgs='kubectl get service -o wide' | |
| alias kcgd='kubectl get deployment -o wide' | |
| alias kcgp='kubectl get pod -o wide' | |
| alias kcgn='kubectl get node -o wide' | |
| alias kcdp='kubectl describe pod' | |
| alias kcds='kubectl describe service' | |
| alias kcdd='kubectl describe deployment' | |
| alias kcdf='kubectl delete -f' |
| type SomeResource struct { | |
| counter int | |
| } | |
| func (sr *SomeResource) incCounter(rw http.ResponseWriter, r *http.Request) { | |
| sr.counter++ | |
| } | |
| func (sr *SomeResource) getCounter(rw http.ResponseWriter, r *http.Request) { | |
| v := strconv.Itoa(sr.counter) |
My main development workstation is a Windows 10 machine, so we'll approach this from that viewpoint.
Recently, Google Chrome started giving me a warning when I open a site that uses https and self-signed certificate on my local development machine due to some SSL certificate issues like the one below:
| import io.circe._ | |
| import io.circe.parser._ | |
| import io.circe.syntax._ | |
| import akka.http.scaladsl.marshalling.{Marshaller, ToEntityMarshaller} | |
| import akka.http.scaladsl.model.{ContentTypeRange, HttpEntity} | |
| import akka.http.scaladsl.model.MediaTypes.`application/json` | |
| import akka.http.scaladsl.unmarshalling.{FromEntityUnmarshaller, Unmarshaller} | |
| import scala.concurrent.Future |
/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉
~/.ssh/config, set each ssh key for each repository as in this exemple: