Skip to content

Instantly share code, notes, and snippets.

View indiosmo's full-sized avatar

Luiz Siqueira indiosmo

  • São Paulo, SP - Brazil
View GitHub Profile
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
export FZF_DEFAULT_COMMAND='fd --type f --strip-cwd-prefix --hidden --follow --exclude .git'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_CTRL_T_OPTS="
--preview 'batcat -n --color=always {}'
--bind 'ctrl-/:change-preview-window(down|hidden|)'"
export FZF_CTRL_R_OPTS="
--preview 'echo {}' --preview-window up:3:hidden:wrap
set nocompatible
filetype off
call plug#begin()
Plug 'junegunn/fzf.vim'
Plug 'easymotion/vim-easymotion'
Plug 'morhetz/gruvbox'
call plug#end()
let mapleader=" "
"vim.visualModeKeyBindings": [
{
"before": [
"tab"
],
"commands": [
"tab"
]
}
],
{"name":"cpp","settings":"{\"settings\":\"{\\n // ===================\\n // Editor\\n // ===================\\n \\\"editor.tabSize\\\": 2,\\n \\\"editor.insertSpaces\\\": true,\\n \\\"editor.minimap.enabled\\\": false,\\n \\\"editor.inlayHints.enabled\\\": \\\"off\\\",\\n \\\"editor.stickyScroll.enabled\\\": false,\\n \\\"editor.inlineSuggest.enabled\\\": true,\\n // ===================\\n // Language-specific\\n // ===================\\n \\\"[cpp]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"xaver.clang-format\\\"\\n },\\n \\\"cmake.cmakePath\\\": \\\"/home/msi/cpp_workspace/cmake-4.2.1/bin/cmake\\\",\\n \\\"editor.semanticTokenColorCustomizations\\\": {\\n \\\"[Gruvbox Dark Medium]\\\": {\\n \\\"rules\\\": {\\n \\\"parameter\\\": \\\"#ebdbb2\\\",\\n }\\n }\\n },\\n \\\"C_Cpp.intelliSenseEngine\\\": \\\"disabled\\\",\\n // ===================\\n // Workbench / UI\\n // ==================
@indiosmo
indiosmo / gist:3f625d400f4243bfc28fbdc7d8039682
Last active May 8, 2020 17:49
C++20 parameter pack perfect capture
#include <iostream>
#include <string>
template <class T, class...Args>
auto ftemplate(T& t) {
auto thunk = [&t](auto& f, Args&&... args) {
auto post = [&t, &f, ... args = std::forward<Args>(args)] {
f(t, std::forward<decltype(args)>(args)...);
};
@indiosmo
indiosmo / fsm.hpp
Created August 14, 2018 01:58
SML - Hierarchical Machine
struct client_protocol
{
// clang-format off
// public interface
struct ev_connect{};
struct ev_disconnect{};
// connection handlers
struct ev_error{};