Skip to content

Instantly share code, notes, and snippets.

View admo's full-sized avatar

Adam Oleksy admo

View GitHub Profile
@admo
admo / .tmux.conf
Created August 2, 2019 11:27
dotfiles
# remap prefix from 'C-b' to 'C-a'
#unbind C-b
#set-option -g prefix C-a
#bind-key C-a send-prefix
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
@admo
admo / wrapper.md
Created April 8, 2019 07:08
WTK: C++

Wrap function with template with pointer argument

The general idea can be found here. The idea is to write a template which wraps function. Template takes as an argument pointer to the function.

Until C++17

Implementation:

#include <utility>
@admo
admo / WindowsConsole.md
Last active June 10, 2019 08:16
WTK: Windows console

cmd.exe console

Colorful console

It allows to set the color scheme of the consoles. More information there.

Enable interpretation of the escape sequences

It is possible to enable interpret escape sequences (e.g. setting colors) for cmd console. Just add DWORD value named VirtualTerminalLevel set to 1 in HKEY_CURRENT_USER\Console. More information there.

Add old cmd to context menu in explorer.

Import context_menu_cmd.reg file into Windows' Registry.