Skip to content

Instantly share code, notes, and snippets.

View crunchie84's full-sized avatar
🦑
Focusing

Mark van Straten crunchie84

🦑
Focusing
View GitHub Profile
@crunchie84
crunchie84 / script.sh
Created January 21, 2021 14:11
Git Surgery blogpost - rewriting histories
# part one, put on your scrubs
mkdir git-surgery
cd git-surgery
git clone git@github.com:crunchie84/blogpost-git-surgery-source.git source
cd source
# extract our application from the source repository
git subtree split -P Configuration/application-1 -b rewritten-history-application-1
# Prepare our new repository
/**
This middleware verifies that the AWS api gateway authorizer lambda has been configured and executed
this middleware is meant to make sure that the seam between IaC and the implementation do not go out of sync
and for whatever reason this lambda is exposed without authorization logic having happened before
in the lambda authorizer
*/
export function assertAuthorizerExecuted() {
return ({
before: (handler, next) => {
const event = handler.event; //unbox middy
@crunchie84
crunchie84 / WhatsAppGroupContactExport.js
Created February 13, 2025 12:44 — forked from mzahidriaz/WhatsAppGroupContactExport.js
WhatsApp Group Contacts Export: This will download the members of group with their phone number, whatsapp name and if contact is stored on phone
class ContactFinder {
#db;
#chatToFind;
#dbName = "model-storage";
#chatsCol = "chat";
#contactCol = "contact";
#groupCol = "participant";
constructor(chatGroupName) {
this.#chatToFind = chatGroupName;