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
#! /usr/bin/env bash | |
clusters=("cluster-a" "cluster-b" "cluster-c") | |
# Delete all clusters | |
echo "Delete all clusters" | |
for c in ${clusters[@]}; do | |
kind delete cluster --name ${c} | |
done | |
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
By making a contribution to this project, I certify that: | |
(a) The contribution was created in whole or in part by me and I | |
have the right to submit it under the MIT license; or | |
(b) The contribution is based upon previous work that, to the best | |
of my knowledge, is covered under an appropriate open source | |
license and I have the right under that license to submit that | |
work with modifications, whether created in whole or in part | |
by me, under the MIT license; or |
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
2018-09-16 14:11:10.473 ERROR 9041 --- [io2-8888-exec-4] org.apache.tomcat.util.net.Nio2Endpoint : | |
java.io.IOException: Remaining data in the network buffer, can't send SSL close message, force a close with close(true) instead | |
at org.apache.tomcat.util.net.SecureNio2Channel.close(SecureNio2Channel.java:620) ~[tomcat-embed-core-8.5.34.jar!/:8.5.34] | |
at org.apache.tomcat.util.net.SecureNio2Channel.close(SecureNio2Channel.java:633) ~[tomcat-embed-core-8.5.34.jar!/:8.5.34] | |
at org.apache.tomcat.util.net.Nio2Endpoint.closeSocket(Nio2Endpoint.java:370) ~[tomcat-embed-core-8.5.34.jar!/:8.5.34] | |
at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1692) [tomcat-embed-core-8.5.34.jar!/:8.5.34] | |
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.34.jar!/:8.5.34] | |
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_172] | |
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor |
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
it should "call createTransport only once when sharing sessions" in { | |
val counter = new AtomicInteger | |
val spied = | |
(x: Stack.Params) => { | |
counter.incrementAndGet() | |
Http.client.params[HttpImpl].transporter(x) | |
} | |
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
object Foo { | |
def withTls(hostname: String, ciphers: Array[String]): Client = { | |
val socketAddressToEngine: SocketAddress => Engine = { | |
case sa: InetSocketAddress => | |
val c = Ssl.client(hostname, sa.getPort) | |
c.self.setEnabledCipherSuites(ciphers) | |
c | |
case _ => | |
val c = Ssl.client() | |
c.self.setEnabledCipherSuites(ciphers) |
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 com.twitter.finagle.netty3.proxy | |
import com.twitter.finagle._ | |
import com.twitter.finagle.client.Transporter | |
import com.twitter.finagle.client.Transporter.Credentials | |
import com.twitter.io.Charsets | |
import com.twitter.util.Base64StringEncoder | |
import java.net.{InetSocketAddress, SocketAddress} | |
import java.util.concurrent.atomic.AtomicReference |
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
// Scala 2.11.6-2.11.8 | |
object WeirdCompileError { | |
import java.util | |
import javax.servlet.http.HttpServletRequest | |
// In HttpServletRequest: public Enumeration<String> getHeaderNames(); | |
// http://docs.oracle.com/javaee/7/api/javax/servlet/http/HttpServletRequest.html#getHeaderNames-- | |
// Error |
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 com.twitter.util.Function; | |
public class Test { | |
public void test() { | |
final PartialFunction<Tuple2<Object, Try<Response>>, scala.Boolean> decider = | |
new Function<Tuple2<Object,Try<Response>>, Boolean>() { | |
@Override | |
public scala.Boolean apply(Tuple2<Object, Try<Response>> v1) { | |
if (v1._2().isReturn()) { |
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
/** | |
* Wraps two services in a new service which checks whether the {{primaryService}} is | |
* available and uses it when it is available. Otherwise, it will use the {{backupService}}. | |
*/ | |
class FailoveringService[Req, Rep](primaryService: Service[Req, Rep], | |
backupService: Service[Req, Rep]) | |
extends Service[Req, Rep] { | |
override def apply(request: Req) = |
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 com.twitter.finagle.Service; | |
import com.twitter.util.Future; | |
import com.twitter.util.Promise; | |
import rx.Observable; | |
import rx.Observer; | |
import rx.Subscription; | |
public class Convert { | |
static public <Res> Future<Res> fromObservable(final Observable<Res> observable) { |
NewerOlder