Skip to content

Instantly share code, notes, and snippets.

View MetGang's full-sized avatar

Patrick Stritch MetGang

  • 13:56 (UTC +02:00)
View GitHub Profile
@MetGang
MetGang / C++Tricks.md
Last active January 13, 2023 15:41
C++ Tricks
@MetGang
MetGang / Stritch-swap-v2.cpp
Created November 24, 2019 21:53
Stritch swap v2
// Stritch swap v2
// Live demo https://godbolt.org/z/gXEqjX
#include <iostream>
#include <type_traits>
#include <tuple>
#include <new>
template <typename T>
concept Trivial = std::is_trivial_v<T>;
# set -g default-command /usr/bin/zsh
set-option -sa terminal-overrides ',xterm*:Tc'
set -g mouse on
set -g mode-keys vi
unbind C-b
set -g prefix C-Space
" Use Vim settings rather than Vi settings
set nocompatible
" Setup plug.vim
if !filereadable($HOME . "/.vim/autoload/plug.vim")
silent ! curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif
" Setup plugins
call plug#begin()
#!/usr/bin/env bash
cmake -S . -B build -G "Unix Makefiles" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON "$@" && ln -frs build/compile_commands.json .