Skip to content

Instantly share code, notes, and snippets.

View meerzulee's full-sized avatar

Meerzulee meerzulee

View GitHub Profile
@meerzulee
meerzulee / base.liquid
Created December 6, 2021 12:12
Directus v9 - Send email hook
// hooks/create-report/templates/base.liquid
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
@meerzulee
meerzulee / py310.sh
Last active December 21, 2023 08:32
auto install python
#!/bin/bash
# Add deadsnakes PPA
add-apt-repository ppa:deadsnakes/ppa -y
# Install Python 3.10 and required packages
apt-get install -y --no-install-recommends python3.10 \
python3.10-dev \
python3.10-venv \
python3-distutils-extra
@meerzulee
meerzulee / compose.yaml
Created March 24, 2024 12:30
Directus Docker compose file with fixed folder permissions: data, uploads, extensions
version: '3'
services:
database:
image: postgis/postgis:13-master
# Required when running on platform other than amd64, like Apple M1/M2:
# platform: linux/amd64
ports:
- 5432:5432
volumes:
- ./data/database:/var/lib/postgresql/data
@meerzulee
meerzulee / dynamodb-pagination.ts
Created April 30, 2024 09:17
DynamoDB pagination example code - SST
const LIMIT = 5
const PK = "STORE#123"
const getAuctionItems = (items: any[])=> {
return items.map((auction)=>(getAuctionItem(auction)))
}
const getPageKey = (item: any) => ({PK:item.PK, SK:item.SK})