Skip to content

Instantly share code, notes, and snippets.

@plourenco
plourenco / avahi-daemon.conf
Created February 18, 2026 23:57
avahi-daemon.conf
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# avahi is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
@plourenco
plourenco / api-gw-handler.ts
Last active September 8, 2025 15:36
quick gist for mfa
// With claim-matching in the middleware (simpler - just returns claims needed)
// generic
// app-wide level claim
apiRouter.post(
'/api/v2/wallet/{walletId}/payout',
postPayoutTransactionHandler,
walletAuthorizer,
(event) => {
if (event.requestContext.authorizer?.context['risk'] > 100) {
@plourenco
plourenco / organization.service.spec.ts
Last active January 13, 2023 18:23
Test creation of credix pass
it("test", async () => {
const org = new Organization();
org.users = Promise.resolve([]);
org.compliances = [];
const { publicKey } = new Keypair();
const user = new UserEntity();
user.id = "1";
user.organization = org;
user.publicKey = publicKey.toString();
@plourenco
plourenco / validators.ts
Created December 1, 2022 21:05
Validator comparison
/* eslint-disable no-console */
import Ajv, { JTDDataType } from "ajv/dist/jtd";
import Joi from "joi";
import { z } from "zod";
import yup, { ValidationError } from "yup";
export type AuthResponse = {
investorId: string;
expiration: number;
};
@plourenco
plourenco / bash
Created March 16, 2021 13:40
Celagem.sh
#!/bin/bash
echo 'WE WILL CELAR YOU'
sleep 1
echo 'clear'
sleep 1
echo '-bash: clear: command not found'
sleep 2
@plourenco
plourenco / app.js
Created August 1, 2020 23:56
Using CodePipeline to automate serverless applications deployment
const express = require('express')
const app = express()
const port = 3000
const awsServerlessExpress = require('aws-serverless-express')
const server = awsServerlessExpress.createServer(app)
app.get('/', (request, response) => {
response.send('Hello Medium universe!');
});