Skip to content

Instantly share code, notes, and snippets.

HISTCONTROL=ignoredups
HISTSIZE=50000
peco_history() {
declare l=$(HISTTIMEFORMAT= history | sort -k1,1nr | perl -ne 'BEGIN { my @lines = (); } s/^\s*\d+\s*//; $in=$_; if (!(grep {$in eq $_} @lines)) { push(@lines, $in); print $in; }' | peco --query "$READLINE_LINE")
READLINE_LINE="$l"
READLINE_POINT=${#l}
}
bind -x '"\C-r":peco_history'
// Place your key bindings in this file to override the defaults
[
{
"key": "ctrl+;",
"command": "workbench.action.terminal.focus",
"when": "editorTextFocus"
},
{
"key": "ctrl+;",
"command": "workbench.action.focusFirstEditorGroup",
#include <stdio.h>
#include <assert.h>
/*
BNF
A: (A)A | {A}A | [A]A | null
*/
int find_pair(char *input, char symbol, int start, int end) {
@terassyi
terassyi / Vagrantfile
Last active October 21, 2020 14:49
Vagrant configuration of using xdp
['vagrant-reload'].each do |plugin|
unless Vagrant.has_plugin?(plugin)
raise "Vagrant plugin #{plugin} is not installed!"
end
end
Vagrant.configure('2') do |config|
config.vm.box = "generic/ubuntu2004" # Ubuntu
config.vm.network "private_network", ip: "192.168.50.4"