Skip to content

Instantly share code, notes, and snippets.

@LS80
LS80 / pitr.sh
Last active October 11, 2023 11:11
Demo PostgreSQL Point-in-time Recovery with Docker
#!/bin/bash
VERSION=9.6
function cleanup() {
docker rm -f master replica >&/dev/null
rm -Rf /tmp/data /tmp/wal_archive
}
function wait_until_ready() {
@messa
messa / asyncio_ssl_example.py
Created June 26, 2015 12:43
Python asyncio + SSL TCP client/server example
#!/usr/bin/env python3
import asyncio
import multiprocessing
import os
import ssl
from time import sleep
port = 9000
@socrateslee
socrateslee / stack_trace.py
Created November 4, 2012 11:24
A Stack Trace Decorator of Python Functions
import sys
import functools
'''
Usage:
consider following functions
import stack_trace
def foo():
pass
def bar():