Using a hypothetical museum floorplan to demonstrate hover and click interactivity, as well as fitBounds.
This file contains 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 org.testcontainers.containers; | |
import com.couchbase.client.core.utils.Base64; | |
import com.couchbase.client.java.CouchbaseCluster; | |
import com.couchbase.client.java.env.CouchbaseEnvironment; | |
import com.couchbase.client.java.env.DefaultCouchbaseEnvironment; | |
import org.testcontainers.containers.traits.LinkableContainer; | |
import org.testcontainers.containers.wait.HttpWaitStrategy; | |
import java.io.DataOutputStream; |
This file contains 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
class ControllerWithBasicAuth extends Controller { | |
private val WithBasicAuth = new BasicAuthAction("user", "pass") | |
def index = WithBasicAuth { | |
Ok("Correct basic auth credentials") | |
} | |
} |
This file contains 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
#Requests from outside | |
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3080 | |
iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 3443 | |
#Requests from localhost | |
iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 3080 | |
iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 443 -j REDIRECT --to-ports 3443 |
This file contains 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
lines with $ are commands | |
### install mkvtoolnix: | |
$ brew install mkvtoolnix | |
### list content of the mkv-file: | |
$ mkvmerge -i mymoviefile.mkv | |
### what will give you: |
This file contains 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
ORIGINAL_JENKINS_SERVER= | |
ORIGINAL_SERVER_USER= | |
NEW_JENKINS_SERVER= | |
NEW_SERVER_USER= | |
# ON THE ORIGINAL JENKINS SERVER | |
ssh $ORIGINAL_SERVER_USER@$ORIGINAL_JENKINS_SERVER | |
cd /var/lib/jenkins/ | |
for i in `ls jobs`; do echo "jobs/$i/config.xml";done > config.totar |
This file contains 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 scala.concurrent._ | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.util._ | |
import java.util.concurrent.atomic.AtomicInteger | |
def firstSucceededOf[T](futures: TraversableOnce[Future[T]])(implicit executor: ExecutionContext): Future[T] = { | |
val p = Promise[T]() | |
val size = futures.size | |
val failureCount = new AtomicInteger(0) |
This file contains 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 cats.{Id,Monad} | |
import cats.state.State | |
import cats.std.function._ | |
import scala.language.higherKinds._ | |
// Call Example.example.run to see the example running | |
object Example { | |
type MyState[A] = State[Int, A] |
This file contains 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 scala.concurrent.duration._ | |
import scala.concurrent.ExecutionContext | |
import scala.concurrent.Future | |
import akka.pattern.after | |
import akka.actor.Scheduler | |
/** | |
* Given an operation that produces a T, returns a Future containing the result of T, unless an exception is thrown, | |
* in which case the operation will be retried after _delay_ time, if there are more possible retries, which is configured through | |
* the _retries_ parameter. If the operation does not succeed and there is no retries left, the resulting Future will contain the last failure. |
OlderNewer