Skip to content

Instantly share code, notes, and snippets.

Working from home

Thomas Darimont thomasdarimont

Working from home
Block or report user

Report or block thomasdarimont

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

I've been working with Apache Kafka for over 7 years. I inevitably find myself doing the same set of activities while I'm developing or working with someone else's system. Here's a set of Kafka productivity hacks for doing a few things way faster than you're probably doing them now. 🔥

Get the tools

wybiral / noscript-tracking.go
Last active Nov 9, 2019
Tracking cursor position in real-time with remote monitoring (without JavaScript)
View noscript-tracking.go
// Tracking cursor position in real-time without JavaScript
// Demo:
package main
import (
lizthegrey / attributes.rb
Last active Nov 4, 2019
Hardening SSH with 2fa
View attributes.rb
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
giannivh /
Last active Sep 13, 2019 — forked from unguiculus/
Import/Export Keycloak Config running on Kubernetes
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
show_help() {
cat << EOF
Usage: $(basename "$0") <options>
-h, --help Display help
View gist:547c550a532be7e8235aa653725b2ba2
public void authenticationFinished(AuthenticationSessionModel authSession, BrokeredIdentityContext context) {
String prompt = authSession.getClientNote(OIDCLoginProtocol.PROMPT_PARAM);
if (OIDCLoginProtocol.PROMPT_VALUE_LOGIN.equals(prompt)) {
UserSessionModel usm = session.sessions().getUserSessionByBrokerSessionId(authSession.getRealm(), context.getBrokerSessionId());
if (!AuthenticationManager.isSessionValid(authSession.getRealm(), usm)) {
logger.debugf("User session '%s' is not valid, maybe creating a new one", context.getBrokerSessionId());
EventBuilder event = new EventBuilder(authSession.getRealm(), session, session.getContext().getConnection());
ClientSessionContext ctx = AuthenticationProcessor.attachSession(authSession, usm, session, authSession.getRealm(), session.getContext().getConnection(), event);
View App.js
import React, { Suspense, useState } from "react";
import { unstable_createResource as createResource } from "react-cache";
import {
} from "./Combobox2.js";
function App({ tabIndex, navigate }) {
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
show_help() {
cat << EOF
Usage: $(basename "$0") <options>
-h, --help Display help
timheap /
Last active Jan 13, 2019
Split a generator up in to chunks of size `n`, without walking the list or keeping items in memory needlessly
from itertools import chain, islice
class splitter:
"""Helper class for splitat."""
def __init__(self, iterable, count):
self.iterator = iter(iterable)
self.count = count
self.queue = []
docwalter /
Created Jun 25, 2018
create-react-app + TypeScript + MobX
#!/bin/env sh
set -e
if [ -z "$1" ] ; then
echo "Usage: `basename $0` appname"
exit 1
tilakpatidar /
Last active Aug 29, 2019
Postgres to Kafka streaming using debezium
# Run postgres instance
docker run --name postgres -p 5000:5432 debezium/postgres
# Run zookeeper instance
docker run -it --name zookeeper -p 2181:2181 -p 2888:2888 -p 3888:3888 debezium/zookeeper
# Run kafka instance
docker run -it --name kafka -p 9092:9092 --link zookeeper:zookeeper debezium/kafka
# Run kafka connect
You can’t perform that action at this time.