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
| sudo apt-get update && sudo apt-get dist-upgrade | |
| sudo sed -i -e 's/bullseye/bookworm/g' /etc/apt/sources.list | |
| sudo sed -i -e 's/bullseye/bookworm/g' /etc/apt/sources.list.d/raspi.list | |
| sudo apt update | |
| sudo apt -y full-upgrade | |
| sudo apt -y autoremove | |
| sudo apt -y clean | |
| sudo reboot | |
| # | |
| # remove old config files after doing sanity checks |
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
| == Adb Server | |
| adb kill-server | |
| adb start-server | |
| == Adb Reboot | |
| adb reboot | |
| adb reboot recovery | |
| adb reboot-bootloader | |
| == Shell |
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
| package test; | |
| import java.io.IOException; | |
| import java.net.InetSocketAddress; | |
| import java.nio.ByteBuffer; | |
| import java.nio.channels.SelectableChannel; | |
| import java.nio.channels.SelectionKey; | |
| import java.nio.channels.Selector; | |
| import java.nio.channels.SocketChannel; | |
| import java.util.Arrays; |
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
| sealed abstract class Perhaps[+A] { | |
| def foreach(f: A => Unit): Unit | |
| def map[B](f: A => B): Perhaps[B] | |
| def flatMap[B](f: A => Perhaps[B]): Perhaps[B] | |
| def withFilter(f: A => Boolean): Perhaps[A] | |
| } | |
| case class YesItIs[A](value: A) extends Perhaps[A] { | |
| override def foreach(f: A => Unit): Unit = f(value) | |
| override def map[B](f: A => B): Perhaps[B] = YesItIs(f(value)) |
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 zio._ | |
| import zio.random._ | |
| import zio.console._ | |
| import zio.duration._ | |
| object Main extends App { | |
| override def run(args: List[String]) = program.exitCode | |
| sealed trait Diagnostic |
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
| #!/usr/bin/env bash | |
| if ! aws_bin="$(which aws)" 2>/dev/null; then | |
| echo "aws cli is missing; you can get it from https://aws.amazon.com/cli/" | |
| exit 1 | |
| fi | |
| if ! jq_bin="$(which jq)" 2>/dev/null; then | |
| echo "jq is missing; you can get it from https://stedolan.github.io/jq/" | |
| exit 1 |
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 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 |