Skip to content

Instantly share code, notes, and snippets.

@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
@styblope
styblope / docker-api-port.md
Last active July 14, 2024 08:29
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"]}
    

Proxmox VE Installation on Hetzner Server via Rescue System

Follow these steps to install Proxmox VE on a Hetzner server via the Rescue System. The Rescue System is a Linux-based environment that can be booted into to perform system recovery tasks. We'll be using it to install Proxmox VE.

In order to complete the process, it is indeed necessary to first boot into the Rescue System and then connect to it via SSH. This will allow you to run the commands for installing Proxmox VE. Here are the steps:

Starting the Rescue System

  1. Log into the Hetzner Robot.
  2. Under "Main Functions; Server" select the desired server and then open the tab "Rescue".
@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;
}
@scyto
scyto / docker-swarm-architecture.md
Last active July 10, 2024 11:27
My Docker Swarm Architecture
@tcpipuk
tcpipuk / postgresql-synapse-tuning.md
Last active December 19, 2023 23:08
Tuning PostgreSQL for a Matrix Synapse Homeserver