Skip to content

Instantly share code, notes, and snippets.

View soenkeliebau's full-sized avatar

Sönke Liebau soenkeliebau

  • Frankfurt, Germany
View GitHub Profile
# OpenVPN Installation
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
rpm -i rpmforge-release-0.5.2-2.el6.rf.i686.rpm
yum -y install openvpn
cp /usr/share/doc/openvpn-2.2.0/sample-config-files/server.conf /etc/openvpn/
sed 's/;dev tap/dev tap0/' /etc/openvpn/server.conf
@soenkeliebau
soenkeliebau / gist:1306162
Created October 22, 2011 16:20
Server Stuff
#Mercurial
yum install -y python-devel gcc python-docutils make vim-enhanced
wget http://mercurial.selenic.com/release/mercurial-1.9.2.tar.gz
tar xvfz mercurial-1.9.2.tar.gz
cd mercurial-1.9.2
make install
echo "[ui]
; editor used to enter commit logs, etc. Most text editors will work.
editor = vim
public class App
{
public static void main( String[] args )
{
HashMap<String, String> results = new HashMap<String, String>();
String[] names = new String[40];
for (int i = 0; i<40;i++) {
names[i] = "Name" + i;
}
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" This is the Vundle package, which can be found on GitHub.
" " For GitHub repos, you specify plugins using the
" " 'user/repository' format
Plugin 'gmarik/vundle'
@soenkeliebau
soenkeliebau / emptyconnectornames
Last active November 16, 2017 08:47
Documentation of Kafka Connect behavior for empty and whitespace padded connector names (Confluent 3.3.0)
➜ curl 127.0.0.1:8083/connectors
[]%
➜ curl --request POST \
--url http://127.0.0.1:8083/connectors \
--header 'content-type: application/json' \
--data '{
"name": "",
"config":
{
# 1. Generate server keypair (broker1)
keytool -genkeypair -alias $(hostname -f)-server -keyalg RSA -keystore \
$(hostname -f)-server.jks -keysize 2048 -dname \
"CN=$(hostname -f),OU=Dept,O=Dilbert.com,L=Ffm,ST=hessen,C=DE" \
-storepass dilbert -keypass dilbert
# 2. Create certificate signing request for broker certificate
keytool -certreq -alias $(hostname -f)-server \
-keystore $(hostname -f)-server.jks \
-file $(hostname -f)-server.csr -storepass dilbert \
@soenkeliebau
soenkeliebau / ComplexKafkaPrincipal.java
Created February 25, 2019 12:13
ComplexKafkaPrincipal implementation to allow adding group information to user principals
public class ComplexKafkaPrincipal extends KafkaPrincipal{
protected List<KafkaPrincipal> additionalPrincipals = new ArrayList<>();
public ComplexKafkaPrincipal(String principalType, String name) {
super(principalType, name);
}
public ComplexKafkaPrincipal(KafkaPrincipal kafkaPrincipal) {
this(kafkaPrincipal.getPrincipalType(), kafkaPrincipal.getName());
}
@soenkeliebau
soenkeliebau / MemoryLeak.java
Created March 1, 2019 20:41
Test of suspected mem leak in KafkaConsumer
import com.google.common.collect.Maps;
import java.util.Arrays;
import java.util.Collection;
import java.util.Map;
import java.util.Properties;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.kafka.clients.consumer.ConsumerConfig;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.apache.kafka.clients.consumer.ConsumerRecords;
@soenkeliebau
soenkeliebau / gist:c66b957dd144e3170048ad52cbffbe5e
Last active May 21, 2019 13:15
apache training insecure dependencies
➜ incubator-training git:(master) ✗ grep -r --include "pom.xml" "http[^s]" .
./tools/maven-revealjs-asciidoctor-templte/pom.xml: http://www.apache.org/licenses/LICENSE-2.0
./tools/maven-revealjs-asciidoctor-templte/pom.xml:<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
./tools/maven-revealjs-asciidoctor-templte/pom.xml: xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
./tools/pom.xml: http://www.apache.org/licenses/LICENSE-2.0
./tools/pom.xml:<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
./tools/pom.xml: xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
./content/Incubator/ReleaseChecklist/pom.xml: http://www.apache.org/licenses/LICENSE-2.0
./content/Incubator/ReleaseChecklist/pom.xml:<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/
[sssd]
config_file_version = 2
services = nss, pam
domains = {{ KRB_REALM }}
[nss]
filter_groups = root
filter_users = root
reconnection_retries = 3
entry_cache_timeout = 300