Skip to content

Instantly share code, notes, and snippets.

@jakob
jakob / build-clangd.sh
Last active September 1, 2022 22:19
How To Build clangd
#!/bin/bash
set -e
mkdir clangd
cd clangd/
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
@af-inet
af-inet / watch-dynamodbstream.py
Last active September 5, 2022 05:44
A working example of DynamoDB Stream usage.
#!/usr/bin/env python
#
# A working example of DynamoDB Stream usage.
#
# Given a DynamoDB table name, this script will go find the first shard in the first stream and
# perform 1 iteration every 10 seconds. Resulting records will be dumped to stdout.
#
import argparse
import time
import boto3
@dsanders11
dsanders11 / StringConstant.h
Last active February 15, 2023 21:53
An implementation of compile time string constants in C++14. The StringConstant class provides an intuitive interface for concatenating and comparing equality of the string constants. Heavily commented since example template code never seems to be.
#ifndef STRING_CONSTANT_H
#define STRING_CONSTANT_H
#include <cstddef>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <utility>