Skip to content

Instantly share code, notes, and snippets.

@sdorra
sdorra / server-config-v1.xml
Created Oct 18, 2014
SCM-Manager and the POODLE vulnerability
View server-config-v1.xml
<Arg>
<New class="org.eclipse.jetty.http.ssl.SslContextFactory">
<Set name="excludeProtocols">
<Array type="java.lang.String">
<Item>SSLv2Hello</Item>
<Item>SSLv3</Item>
</Array>
</Set>
</New>
</Arg>
@sdorra
sdorra / docker-sample.sh
Created Nov 21, 2014
SCM-Manager Docker
View docker-sample.sh
# run the latest scm-manager version
docker run sdorra/scm-manager
# expose scm-manager http port
docker run -p 8080:8080 sdorra/scm-manager
# run a specific scm-manager version
# version 1.42 is currently the only available version
docker run -p 8080:8080 sdorra/scm-manager:1.42
View Listener.java
@EagerSingleton
public class Listener {
@Subsribe
public void handleEvent(PostReceiveRepositoryHookEvent event){
// handle event
}
}
@sdorra
sdorra / adf.html
Last active Sep 4, 2015
ADF shared data
View adf.html
<div>
<h3>angular-dashboard-framework</h3>
<p>Dashboard framework with Angular.js and Twitter Bootstrap.</p>
</div>
@sdorra
sdorra / NotificationService.java
Created Dec 20, 2012
scm-mail-plugin usage example.
View NotificationService.java
/**
*
* @author Sebastian Sdorra
*/
public class NotificationService
{
private static final Logger logger = LoggerFactory.getLogger(
NotificationService.class);
private MailService mailService;
View ReportContextListener.java
@Extension
public class ReportContextListener implements ServletContextListener {
private final AdministrationContext adminContext;
private final SchedulerFactory schedulerFactory;
@Inject
public ReportContextListener(AdministrationContext adminContext,
SchedulerFactory schedulerFactory){
this.adminContext = adminContext;
@sdorra
sdorra / keybase.md
Created Sep 14, 2019
Keybase Verification
View keybase.md

Keybase proof

I hereby claim:

  • I am sdorra on github.
  • I am sdorra (https://keybase.io/sdorra) on keybase.
  • I have a public key ASAqzQv8znLxEcLWEJWrQUhXib91ha5mwDspYuZST9C6Xwo

To claim this, I am signing this object:

@sdorra
sdorra / app.go
Created Apr 6, 2016
SSEvents with golang
View app.go
package main
import (
"io"
"strconv"
"time"
"github.com/gin-gonic/gin"
)
View CorruptingProxy.groovy
@Grab(group='org.eclipse.jetty', module='jetty-server', version='9.1.6.v20160112')
@Grab(group='org.eclipse.jetty', module='jetty-servlet', version='9.1.6.v20160112')
@Grab(group='org.eclipse.jetty', module='jetty-proxy', version='9.1.6.v20160112')
@Grab(group='com.google.guava', module='guava', version='29.0-jre')
import com.google.common.io.ByteStreams;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.util.BytesContentProvider;
import org.eclipse.jetty.proxy.ProxyServlet;
import org.eclipse.jetty.server.Server;
@sdorra
sdorra / Jenkinsfile
Created Oct 23, 2016
Docker jenkins pipeline example
View Jenkinsfile
node('docker') {
stage 'start database'
docker.image('redis:3.0.7-alpine').withRun { c ->
def ip = hostIp(c)
stage 'client set'
docker.image('redis:3.0.7-alpine').inside {
sh "redis-cli -h ${ip} set test 123"