Skip to content

Instantly share code, notes, and snippets.

private static class RemoveAcceptEncodingFilter implements ClientRequestFilter {
RemoveAcceptEncodingFilter() {}
@Override
public void filter(ClientRequestContext clientRequestContext) throws IOException {
clientRequestContext.getHeaders().remove("Accept-Encoding");
}
}
Failed to update Gitlab commit status for project '135'
javax.ws.rs.client.ResponseProcessingException: java.lang.RuntimeException: com.fasterxml.jackson.core.JsonParseException: Illegal character ((CTRL-CHAR, code 31)): only regular white space (\r, \n, \t) is allowed between tokens
at [Source: ����N�0 Ee S9i�>V|ĬP�6N'RӢ�� ��qa�f{�}�W��0�T7�v�u��H��64,��՚J���uݸ�7%)G�I1e��$ �,d�`:��uM�^bJ��0��Xq�n�)�&�P�kn��|�,��NО�9k�麃��G0���r����"�;n��Yu�B��U�k���/=��8�C; �R���5���y/w��|?�y�e���/{�|�; line: 1, column: 2]
at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(ClientInvocation.java:455)
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:102)
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:64)
at com.sun.proxy.$Proxy118.getCommit(Unknown Source)
at com.dabsquared.gitlabjenkins.util.CommitStatusUpdater.existsCommit(CommitStatusUpdater.java:97)
at com.dabsquared.gitlabjenkins.util.Commit
node("linux") {
sh 'printenv'
gitlabBuilds(builds: ["build", "test"]) {
/// See: https://jenkins.io/doc/pipeline/steps/gitlab-plugin/
stage("Build") {
echo "Action type: ${env.gitlabActionType}"
if (env.gitlabActionType == "NOTE") {
echo "Someone made a comment on a merge-request"
}
Index: src/main/java/com/github/jsgilmore/protoshell/ProtoSerializer.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/com/github/jsgilmore/protoshell/ProtoSerializer.java (revision a36f11a9d6db50521e878bbe1a82aca5faa04fda)
+++ src/main/java/com/github/jsgilmore/protoshell/ProtoSerializer.java (revision )
@@ -39,12 +39,14 @@
public static Logger LOG = Logger.getLogger(ProtoSerializer.class);
private DataOutputStream processIn;
@Alien2150
Alien2150 / gist:9cb43a28dfee087bdf2e
Last active August 29, 2015 14:14
TLSCipherActor with fix for IllegalStateException
package actor
import java.nio.ByteBuffer
import actor.TlsRecord._
import akka.util.ByteString
import javax.net.ssl.SSLEngineResult
import akka.actor.ActorLogging
import akka.stream.ssl.SslTlsCipherActor
import javax.net.ssl.SSLEngineResult.Status._
package connection
import java.net.InetSocketAddress
import java.security.{KeyStore, SecureRandom}
import javax.net.ssl.{SSLEngine, KeyManagerFactory, SSLContext, TrustManagerFactory}
import akka.stream.FlowMaterializer
import akka.stream.actor.ActorPublisherMessage.Request
import akka.stream.actor.ActorSubscriberMessage.{OnComplete, OnNext}
import akka.stream.actor._
@Alien2150
Alien2150 / gist:d0c74d99c19df59109ff
Created December 19, 2014 16:50
TLS Example with Reactive Streams
package connection
import java.net.InetSocketAddress
import java.security.{SecureRandom, KeyStore}
import javax.net.ssl.{TrustManagerFactory, KeyManagerFactory, SSLContext}
import akka.actor.Actor.Receive
import akka.stream.FlowMaterializer
import akka.stream.actor.ActorPublisherMessage.Request
import akka.stream.actor.ActorSubscriberMessage.{OnComplete, OnNext}