Skip to content

Instantly share code, notes, and snippets.

View paulborm's full-sized avatar

Paul Borm paulborm

View GitHub Profile
@paulborm
paulborm / middleware.js
Last active April 11, 2024 08:17
Simple middleware implementation
/**
* @template Context
* @callback Handler
* @param {Context} context
* @param {function(): void} next
*/
/**
* @template Context
* @example
@paulborm
paulborm / README.md
Last active July 1, 2023 20:13
Little Snitch rule groups aka blocklists
@paulborm
paulborm / .env
Last active January 21, 2022 10:54
Rsync deploy script
DEPLOY_USER=""
DEPLOY_HOST=""
DEPLOY_HOST_DIR=""
DEPLOY_LOCAL_DIR=""
DEPLOY_EXCLUDE=""
@paulborm
paulborm / dm-fotoparadies-scriptable.js
Last active October 17, 2021 09:44
Scriptable Widget for viewing your dm Fotoparadies order status directly on your iOS homescreen.
/**
* @license
* Copyright (c) 2021 Paul Borm
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@paulborm
paulborm / share-ebay-kleinanzeigen-plain-link.js
Last active July 13, 2022 17:27
iOS sharesheet script for Scriptable to get the plain link of an ebay Kleinanzeigen article without description or tracking parameters.
@paulborm
paulborm / useAnimateHeight.js
Last active October 25, 2020 16:56
Custom React Hook for animating the height of a HTML Element.
import React from 'react';
import gsap from 'gsap';
function useAnimateHeight({ key, elementRef }) {
const prevKey = usePrevious(key);
const currentHeight = elementRef.current?.offsetHeight;
React.useEffect(() => {
if (!elementRef.current) {
return;