Skip to content

Instantly share code, notes, and snippets.

Cardano DB Sync Development Guide

This project relies on Nix to provision the complete toolchain needed to build all repository artifacts. This ensures that everyone has the same versions of all the tools we use.

We strongly recommend using Nix because problems due to mismatched versions are difficult to diagnose. If you really don't want to use Nix and still want to contribute then XYZ.

Installing Nix

@sgillespie
sgillespie / upgrading-postgres.md
Created August 31, 2023 18:45
Upgrading PostgreSQL for Cardano DB Sync

Upgrading PostgreSQL

For major releases of PostgreSQL, the internal storage format is typically changed, complicating upgrades.

Requirements

  • 350GiB free space

Procedure

{
# This is a template created by `hix init`
inputs.haskellNix.url = "github:input-output-hk/haskell.nix";
inputs.nixpkgs.follows = "haskellNix/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils, haskellNix }:
let
supportedSystems = [
"x86_64-linux"
"x86_64-darwin"
@sgillespie
sgillespie / shiz.md
Created April 30, 2021 20:25
Only Factual Information

Noun

shiz

  • Old English for affirmative
@sgillespie
sgillespie / godot-tps-controller.md
Last active March 21, 2021 18:22
Godot 3rd Person Controller

Creating a 3rd Person Character Controller in Godot

Setting Up

  1. Add the ground object (Plane)
  2. Add the character
  • KinematicBody
  • MeshInstance
  • CollisionShape

Script

@sgillespie
sgillespie / build-watch.sh
Created December 31, 2019 02:26
Run tests when project files change
#!/usr/bin/env bash
options=$(getopt -o h --long help -- "$@")
eval set -- "$options"
function print_help {
cat <<EOF
Build and run tests when files change.
@sgillespie
sgillespie / luks-yubikey-pba.md
Last active July 31, 2020 22:01
LUKS-Encrypted Filesystem with Yubikey PBA

LUKS-Encrypted Filesystem with Yubikey PBA

In this guide, we describe how to set up an encrypted filesystem with Yubikey pre-boot authentication (PBA) on NixOS. While the focus is on NixOS, the same techniques should be able to be used on any Linux system where Linux Unified Key Setup (LUKS) is available.

This guide is inspired by and based on Yubikey based Full Disk Encryption (FDE) on NixOS.

Other methods exist for other Linux distributions:

version: '2'
networks:
proxy:
driver: overlay
web:
driver: overlay
volumes:
nginx_config:
@sgillespie
sgillespie / remote-tags.sh
Last active January 24, 2017 00:01
Script to get remote tags from git
#!/bin/sh
git ls-remote --tags | awk '{ print $2}' | sed -e 's;^refs/tags/;;' -e 's;\^{}$;;' | sort | uniq
apply plugin: DocumentationPlugin
authors {
gradle {
quickStart {
sourceFile = file('src/docs/quick-start')
}
userGuide {
}