Skip to content

Instantly share code, notes, and snippets.

@Gavinok
Gavinok / docker-compose-sentinel.yaml
Last active February 19, 2026 16:48
Test Redis Sentinel mode with VC-AuthN OIDC
# Redis Sentinel test configuration
# Usage: docker compose -f docker-compose.yaml -f docker-compose-sentinel.yaml up
#
# This replaces the single Redis instance with a Sentinel setup:
# - redis-master: Primary Redis node
# - redis-replica: Replica node
# - sentinel-1, sentinel-2, sentinel-3: Sentinel nodes for HA
#
# Set these environment variables before starting:
# REDIS_MODE=sentinel
@Gavinok
Gavinok / docker-compose-cluster.yaml
Last active February 19, 2026 16:49
Script to start a redis cluster for testing with vc-authn
# Redis Cluster test configuration
# Usage: docker compose -f docker-compose.yaml -f docker-compose-cluster.yaml up
#
# This replaces the single Redis instance with a Redis Cluster setup:
# - 3 master nodes with 3 replica nodes (6 nodes total)
#
# Set these environment variables before starting:
# REDIS_MODE=cluster
# REDIS_HOST=redis-node-1:6379,redis-node-2:6379,redis-node-3:6379
@Gavinok
Gavinok / productive.org
Created April 26, 2024 03:39
Show notes from my Double Your Productivity With Emacs Org-mode video

Double Your Productivity With Org Mode

What is productivity?

Using the oxford dictionary

Productivity
the rate at which a worker, a company or a country produces goods, and the amount produced, compared with how much time, work and money is needed to produce them
# Created 2024-04-23 Tue 15:20
#+title: Lets Learn Emacs Lisp
#+author: Gavin Jaeger-Freeborn
* Emacs terminology
[[https://sachachua.com/blog/wp-content/uploads/2013/05/How-to-Learn-Emacs-v2-Large.png][How to Learn Emacs]]
- buffer :: The area containing text kinda like a *tab in a browser*
- point :: The *cursor*
- window :: A section of the emacs window containing text
@Gavinok
Gavinok / tables.org
Last active November 18, 2024 13:20
Show notes for my video on org tables

Org tables

Creating a table

| |
Designates a table
|-
Followed by a space will create a horizontal line
  • you can navigate them intuitively with tab return etc
    NameAge
    Gavin100
@Gavinok
Gavinok / eglot-codelens.el
Created March 12, 2024 22:10
Add support for code lenses in eglot for emacs
;; eglot-codelens.el --- Add support for codelenses to eglot -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
;;; Extending eglot to support lenses
;;;; Findings
;; Lenses often support the option to be used as a code action
;; some servers rely on custom code actions implemented by the client
;; - [[https://github.com/emacs-lsp/lsp-mode/issues/2250]] mentions this
@Gavinok
Gavinok / gist-from-region-v4.el
Last active March 8, 2024 20:34
Elisp code for quickly creating a github gist from a given region
(defun gist-from-region (BEG END fname desc &optional private)
"Collect the current region creating a github gist with the
filename FNAME and description DESC.
If the optional argument PRIVATE is non-nil then the gist will be
made private. Otherwise the gist will be default to public.
Depends on the `gh' commandline tool"
(interactive (list (mark) (point)
(read-string "File Name: ")
(read-string "Description: ")
@Gavinok
Gavinok / gist-from-region-v3.el
Created March 8, 2024 20:32
Elisp code for quickly creating a github gist from a given region
(defun gist-from-region (BEG END fname desc &optional private)
"Collect the current region creating a github gist with the
filename FNAME and description DESC.
If the optional argument PRIVATE is non-nil then the gist will be
made private. Otherwise the gist will be default to public.
Depends on the `gh' commandline tool"
(interactive (list (mark) (point)
(read-string "File Name: ")
(read-string "Description: ")
@Gavinok
Gavinok / learn.org
Created February 29, 2024 23:13
Learn Emacs Lisp in 30 Minutes

Lets Learn Emacs Lisp

Emacs terminology

How to Learn Emacs

buffer
The area containing text kinda like a tab in a browser
point
The cursor
window
A section of the emacs window containing text
@Gavinok
Gavinok / ll.c
Created March 27, 2023 19:43
Basic linked list library
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
/* typedef void *TaskHandle_t; */
/* enum task_type { VAL1, VAL2 }; */
/* typedef struct DD_Task { */
/* TaskHandle_t t_handle; */