Skip to content

Instantly share code, notes, and snippets.

View jamescherti's full-sized avatar

James Cherti jamescherti

View GitHub Profile
@JoshHayes
JoshHayes / concepts_for_composition_over_inheritance.cpp
Created September 13, 2023 09:10
Using C++20 concepts to avoid inheritance - a tiny demo
// Using C++20 concepts to enable composition over inheritance - a tiny demo.
// Notes from a lovely talk by Jonathan Gopel
//
// Source:
// Using Modern C++ to Eliminate Virtual Functions - Jonathan Gopel - CppCon 2022
// https://www.youtube.com/watch?v=gTNJXVmuRRA
// See also:
// https://en.cppreference.com/w/cpp/language/constraints
#include <concepts>
@jamescherti
jamescherti / inputrc_hjkl_motion.conf
Last active March 5, 2025 10:13
inputrc: add hjkl bindings to ~/.inputrc (used by the shells bash, sh...).
" Config file: Add lines to ~/.inputrc
" Description: Add hjkl bindings to ~/.inputrc
" (used by the readline and command line
" shells bash, sh...).
" Alt-h: left
" Alt-j: down
" Alt-k: up
" Alt-j: right
" Author: James Cherti
" GitHub Gist: https://gist.github.com/jamescherti/3b6582c6079ba80e55c9927021d1edc5