Skip to content

Instantly share code, notes, and snippets.

@pabloariasal
pabloariasal / convert_to_lsp_snippet.py
Last active December 29, 2024 10:11
Convert snippets in SnipMate syntax to LSP snippet syntax
#!/usr/bin/python3
import sys
import re
import json
def main():
with open(sys.argv[1], encoding='utf-8') as f:
s = f.read()
@pabloariasal
pabloariasal / iterator_facade.cpp
Last active November 16, 2023 17:58
Example implementation of a C++ Iterator Facade using CRTP
#include <array>
#include <cassert>
#include <catch2/catch_test_macros.hpp>
#include <cstddef>
#include <iterator>
#include <memory>
#include <type_traits>
// Facade for input and bidirectional iterator, but can be expanded to any type
// of iterator