Skip to content

Instantly share code, notes, and snippets.

@pohzipohzi
pohzipohzi / clangd.md
Last active July 28, 2026 12:43
setting up clangd

Here are some examples of how to setup clangd for a project

If the project:

  • uses meson

meson setup <build_dir> generates a compilation database in <build_dir>/compile_commands.json. Since clangd automatically looks for the compilation database in build, we don't need to do anything else if build is the name of the build directory

meson setup build
@pohzipohzi
pohzipohzi / walg-pitr.md
Last active April 25, 2023 15:47
PostgreSQL Point-In-Time-Recovery (PITR) with WAL-G

WAL-G PITR

This gist summarises a way to simulate point-in-time recovery (PITR) using WAL-G. Most of the material is adapted from Creston's tutorial.

Setup

First we initialize a database cluster

pg_ctl init -D cluster
@pohzipohzi
pohzipohzi / forexfactory_econcal.py
Created November 3, 2017 15:35
A scraper for forex factory economic calendar data
from bs4 import BeautifulSoup
import requests
import datetime
import logging
import csv
def setLogger():
logging.basicConfig(level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(message)s',
filename='logs_file',