Skip to content

Instantly share code, notes, and snippets.


Sebastian Sdorra sdorra

View GitHub Profile
sdorra /
Created June 6, 2021 19:55
ecdsa: sign in go, verify in node
openssl ecparam -name prime256v1 -genkey -noout -out private.pem
openssl ec -in private.pem -pubout -out public.pem
sdorra /
Created July 22, 2020 05:02
Sign and verify commits with JGit
import org.bouncycastle.bcpg.ArmoredInputStream;
import org.bouncycastle.bcpg.ArmoredOutputStream;
import org.bouncycastle.bcpg.BCPGOutputStream;
import org.bouncycastle.bcpg.HashAlgorithmTags;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.bouncycastle.openpgp.PGPException;
import org.bouncycastle.openpgp.PGPKeyPair;
import org.bouncycastle.openpgp.PGPObjectFactory;
import org.bouncycastle.openpgp.PGPPrivateKey;
import org.bouncycastle.openpgp.PGPPublicKey;
sdorra / Vagrantfile
Created June 19, 2020 05:28
SCM-Manager on FreeBSD
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config| = "freebsd/FreeBSD-12.0-STABLE"
# forward SCM-Manager port to host "forwarded_port", guest: 8080, host: 8080
# add some more memory
sdorra / CorruptingProxy.groovy
Created April 29, 2020 19:33
svnkit-dav checksums
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='', module='guava', version='29.0-jre')
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 /
Created September 14, 2019 07:09
Keybase Verification

Keybase proof

I hereby claim:

  • I am sdorra on github.
  • I am sdorra ( on keybase.
  • I have a public key ASAqzQv8znLxEcLWEJWrQUhXib91ha5mwDspYuZST9C6Xwo

To claim this, I am signing this object:

sdorra / Jenkinsfile
Created October 23, 2016 20:05
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"
sdorra / cert.go
Created July 3, 2016 20:56
Certificate generation in Go
View cert.go
package main
import (
sdorra /
Created June 15, 2016 20:27
Jackson sample with deep field filter
public class App {
public static void main(String[] args) {
Type type = new Type("hg", "Mercurial");
Repository repository = new Repository("42", "scm", type, "SCM-Manager", "SCM-Manager Repository Hosting");
System.out.println(JSON.asString(repository, "id", "desc"));
System.out.println(JSON.asString(repository, "id", "name", "type", "", "displayName"));
sdorra / keys.go
Created April 17, 2016 19:31
Golang RSA Key Generation
View keys.go
* Genarate rsa keys.
package main
import (
sdorra / app.go
Created April 6, 2016 19:48
SSEvents with golang
View app.go
package main
import (