Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Thomas Darimont thomasdarimont

🏠
Working from home
View GitHub Profile
@thomasdarimont
thomasdarimont / open-source-sso.md
Created Apr 15, 2020 — forked from bmaupin/open-source-sso.md
Comparison of open-source SSO implementations
View open-source-sso.md
@thomasdarimont
thomasdarimont / RsyncOverSsh_Fast_Documentation.md
Created Nov 12, 2019 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)
View RsyncOverSsh_Fast_Documentation.md

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
View gist:b7540bfb8771fa666b59a61426a205c2
Sub unprotected()
If Hook Then
MsgBox "VBA Project is unprotected!", vbInformation, "*****"
End If
End Sub
View gist:056fc3100b5989e4ccd82a9d3abbac69
Option Explicit
Private Const PAGE_EXECUTE_READWRITE = &H40
Private Declare PtrSafe Sub MoveMemory Lib "kernel32" Alias "RtlMoveMemory" _
(Destination As LongPtr, Source As LongPtr, ByVal Length As LongPtr)
Private Declare PtrSafe Function VirtualProtect Lib "kernel32" (lpAddress As LongPtr, _
ByVal dwSize As LongPtr, ByVal flNewProtect As LongPtr, lpflOldProtect As LongPtr) As LongPtr
View kafka-productivity-hacks.md

I've been working with 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

@thomasdarimont
thomasdarimont / webcryptoapi.html
Created Dec 28, 2018 — forked from deiu/webcryptoapi.html
Web Crypto API: RSA keygen & export & import & sign & verify & encrypt & decrypt
View webcryptoapi.html
<html>
<head>
<script>
function generateKey(alg, scope) {
return new Promise(function(resolve) {
var genkey = crypto.subtle.generateKey(alg, true, scope)
genkey.then(function (pair) {
resolve(pair)
})
})
View keycloak_impex.sh
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
show_help() {
cat << EOF
Usage: $(basename "$0") <options>
-h, --help Display help
@thomasdarimont
thomasdarimont / postgres_to_kafka.sh
Created Jul 20, 2018 — forked from tilakpatidar/postgres_to_kafka.sh
Postgres to Kafka streaming using debezium
View postgres_to_kafka.sh
# 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
@thomasdarimont
thomasdarimont / create-react-ts-mobx-app.sh
Created Jun 26, 2018 — forked from docwalter/create-react-ts-mobx-app.sh
create-react-app + TypeScript + MobX
View create-react-ts-mobx-app.sh
#!/bin/env sh
set -e
if [ -z "$1" ] ; then
echo "Usage: `basename $0` appname"
exit 1
fi
name="$1"
@thomasdarimont
thomasdarimont / find-changed-files-in-git.sh
Created Aug 31, 2016 — forked from gernotstarke/find-changed-files-in-git.sh
find heavily changed files in git repository
View find-changed-files-in-git.sh
git log --since="90 days ago" --pretty=format:"" --name-only | \
grep "[^\s]" | \
sort | uniq -c | \
sort -nr | head -10
You can’t perform that action at this time.