Skip to content

Instantly share code, notes, and snippets.

View thomasdarimont's full-sized avatar
🏠
Working from home

Thomas Darimont thomasdarimont

🏠
Working from home
View GitHub Profile
@thomasdarimont
thomasdarimont / find-changed-files-in-git.sh
Created August 31, 2016 16:00 — forked from gernotstarke/find-changed-files-in-git.sh
find heavily changed files in git repository
git log --since="90 days ago" --pretty=format:"" --name-only | \
grep "[^\s]" | \
sort | uniq -c | \
sort -nr | head -10
@thomasdarimont
thomasdarimont / create-react-ts-mobx-app.sh
Created June 26, 2018 07:35 — forked from docwalter/create-react-ts-mobx-app.sh
create-react-app + TypeScript + MobX
#!/bin/env sh
set -e
if [ -z "$1" ] ; then
echo "Usage: `basename $0` appname"
exit 1
fi
name="$1"
@thomasdarimont
thomasdarimont / postgres_to_kafka.sh
Created July 20, 2018 22:34 — forked from tilakpatidar/postgres_to_kafka.sh
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
#!/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 / webcryptoapi.html
Created December 28, 2018 12:26 — forked from deiu/webcryptoapi.html
Web Crypto API: RSA keygen & export & import & sign & verify & encrypt & decrypt
<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)
})
})

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 / gist:056fc3100b5989e4ccd82a9d3abbac69
Last active September 9, 2019 23:27
Remove VBA Macro Password (Module 1)
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
@thomasdarimont
thomasdarimont / gist:b7540bfb8771fa666b59a61426a205c2
Created September 9, 2019 23:26
Remove VBA Macro Password (Module 2)
Sub unprotected()
If Hook Then
MsgBox "VBA Project is unprotected!", vbInformation, "*****"
End If
End Sub
@thomasdarimont
thomasdarimont / RsyncOverSsh_Fast_Documentation.md
Created November 12, 2019 14:01 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

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
@thomasdarimont
thomasdarimont / open-source-sso.md
Created April 15, 2020 06:02 — forked from bmaupin/open-source-sso.md
Comparison of open-source SSO implementations