$ demo on|off [hhmm]
Enable or disable the demo mode on a connected Android device or emulator. You can also pass in a custom value for the system clock in the HHMM
format (only used when you use the on
command).
package com.example.hello.api | |
import akka.NotUsed | |
import com.example.hello.api.SlackCustomIntegration.Message | |
import com.lightbend.lagom.scaladsl.api.{Descriptor, Service, ServiceCall} | |
import com.lightbend.lagom.scaladsl.api.Service._ | |
import com.lightbend.lagom.scaladsl.api.transport.Method | |
import play.api.libs.json._ | |
import play.api.libs.functional.syntax._ |
$ demo on|off [hhmm]
Enable or disable the demo mode on a connected Android device or emulator. You can also pass in a custom value for the system clock in the HHMM
format (only used when you use the on
command).
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Copyright 2016 Google Inc. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
import java.util | |
import org.apache.kafka.clients.consumer.KafkaConsumer | |
import scala.collection.JavaConverters._ | |
object ConsumerExample extends App { | |
import java.util.Properties |
import akka.actor.ActorSystem | |
import akka.http.scaladsl.Http | |
import akka.stream.ActorMaterializer | |
object Boot extends App with Service with CorsSupport { | |
override implicit val system = ActorSystem() | |
override implicit val executor = system.dispatcher | |
override implicit val materializer = ActorMaterializer() | |
Http().bindAndHandle(corsHandler(routes), "0.0.0.0", 1337) |
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
# Install kernel extra's to enable docker aufs support | |
sudo apt-get -y install linux-image-extra-$(uname -r) | |
# Add Docker PPA and install latest version | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
import akka.stream.scaladsl.Flow | |
import scala.concurrent.{ ExecutionContext, Future } | |
import scalaz._ | |
import scalaz.std.scalaFuture.futureInstance // IntelliJ lies | |
/** | |
* Flowz provides Akka Stream Flow like methods for monadic types. | |
* | |
* You can define the `M` type and the input type, and let the compiler infer the output |
import android.content.Context; | |
import android.os.Debug; | |
import java.io.File; | |
public class OomExceptionHandler implements Thread.UncaughtExceptionHandler { | |
private static final String FILENAME = "out-of-memory.hprof"; | |
public static void install(Context context) { | |
Thread.UncaughtExceptionHandler defaultHandler = Thread.getDefaultUncaughtExceptionHandler(); |
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<color name="action_pause">#FF8F00</color> | |
<color name="action_resume">#43A047</color> | |
</resources> |