Skip to content

Instantly share code, notes, and snippets.

@tg44
tg44 / gist:ea5608bed083b62629eef023282c33f2
Created November 14, 2018 20:46
Android emulator minimum CLI install for Mac
/*
If you want to use Android studio ever, go and download + install that! (Huge but reliable!)
Min req:
- brew installed
- java installed:
brew cask install caskroom/versions/java8
The steps below sometimes requires user interaction (like accepting licenses)!
*/
@tg44
tg44 / ResponsTimeLoggerActor.scala
Last active December 15, 2017 13:59
ResponseTimeLoggerActor
object ResponseTimeLoggerActor {
case object LogMeasures
}
trait ResponseTimeLoggerActor {
x: Actor =>
implicit val executionContext: ExecutionContextExecutor
@tg44
tg44 / CombineLatest.scala
Last active July 27, 2018 06:09
Quick implementation of the CombineLatest RX operator in AkkaStreams
import akka.actor.ActorSystem
import akka.stream._
import akka.stream.scaladsl.{Flow, GraphDSL, Keep, RunnableGraph, Sink, Source}
import akka.stream.stage.{GraphStage, GraphStageLogic, InHandler, OutHandler}
import akka.testkit.TestKit
import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike}
import scala.concurrent.Await
class CombineLatest[A, B]
@tg44
tg44 / gist:ddb5e911b36838f580084e45e51a15a2
Created July 16, 2016 21:09
adb shell dumpsys | grep Width
C:\adb\src
λ adb shell dumpsys | grep Width
requiresSmallestWidthDp=0 compatibleWidthLimitDp=0 largestWidthLimitDp=0
requiresSmallestWidthDp=0 compatibleWidthLimitDp=0 largestWidthLimitDp=0
requiresSmallestWidthDp=0 compatibleWidthLimitDp=0 largestWidthLimitDp=0
requiresSmallestWidthDp=0 compatibleWidthLimitDp=0 largestWidthLimitDp=0
requiresSmallestWidthDp=0 compatibleWidthLimitDp=0 largestWidthLimitDp=0
options=Bundle[{appWidgetMaxHeight=492, appWidgetCategory=1, appWidgetMaxWidth=492, appWidgetMinHeight=306, appWidgetMinWidth=336}]
options=Bundle[{appWidgetMaxHeight=111, appWidgetCategory=1, appWidgetMaxWidth=492, appWidgetMinHeight=64, appWidgetMinWidth=336}]
options=Bundle[{appWidgetMaxHeight=492, appWidgetCategory=1, appWidgetMaxWidth=492, appWidgetMinHeight=306, appWidgetMinWidth=336}]