Skip to content

Instantly share code, notes, and snippets.

@tcpipuk
tcpipuk / postgresql-synapse-tuning.md
Last active December 19, 2023 23:08
Tuning PostgreSQL for a Matrix Synapse Homeserver
@scyto
scyto / docker-swarm-architecture.md
Last active April 29, 2024 19:12
My Docker Swarm Architecture
@Froelund
Froelund / _error.tsx
Last active November 30, 2023 04:35
Next.js Typescript error reporting
import { captureException, flush } from '@sentry/nextjs';
import NextErrorComponent from 'next/error';
import type { ErrorProps } from 'next/error';
import type { NextPage } from 'next';
interface AppErrorProps extends ErrorProps {
err?: Error;
hasGetInitialPropsRun?: boolean;
}
@styblope
styblope / docker-api-port.md
Last active May 4, 2024 20:17
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
    
@pucbabajob
pucbabajob / rds-lambda-s3.py
Last active September 26, 2023 16:36
Query RDS from lambda and save the result as CSV, Sent the result in Email, Save the Result in S3
# Query RDS From Lambda and Send Results in Email and Save it to S3
# Blog Post: https://blog.powerupcloud.com/automate-rds-and-aurora-mysql-processes-list-in-lambda-with-kms-736b2878349
# Verson 1.1
# Bug fix1 : Mulitple email receipts
import sys
import logging
import pymysql
import os