Compare commits

...

4 Commits

4 changed files with 63 additions and 9 deletions

View File

@ -40,6 +40,7 @@ pipewire-pulse
# #
# utility # utility
# #
dosfstools
which which
dnsutils dnsutils
@ -64,6 +65,7 @@ nmap
remmina remmina
python-pynvim python-pynvim
xorg-xinput xorg-xinput
xorg-xbacklight
neofetch neofetch
cloc cloc
@ -100,6 +102,8 @@ bash-language-server
vscode-css-languageserver vscode-css-languageserver
adwaita-color-schemes adwaita-color-schemes
lxappearance lxappearance
radare2
gdb
# .local/bin/calcpy/ script # .local/bin/calcpy/ script
ipython ipython

View File

@ -19,16 +19,24 @@ set showtabline=0
" performance? " performance?
set lazyredraw nocursorline ttyfast set lazyredraw nocursorline ttyfast
" use system clipboard instead of internal
set clipboard=unnamedplus
" when using c or s, do not overwrite clipboard
nnoremap c "-c
vnoremap c "-c
nnoremap s "-s
vnoremap s "-s
let mapleader = "," let mapleader = ","
" " use system clipboard instead of internal
" set clipboard=unnamedplus
" " when using c or s, do not overwrite clipboard
" nnoremap c "-c
" vnoremap c "-c
" nnoremap s "-s
" vnoremap s "-s
" easier binds to use system clipboard with
nnoremap <leader>cy "+yy
vnoremap <leader>cy "+y
vnoremap <leader>cd "+d
nnoremap <leader>cd "+dd
nnoremap <leader>cp "+p
nnoremap <leader>cP "+P
set shell=/bin/sh set shell=/bin/sh
hi Search cterm=NONE ctermfg=white ctermbg=blue hi Search cterm=NONE ctermfg=white ctermbg=blue

View File

@ -3,7 +3,7 @@
if has('python3') && ($SYSTEM_PROFILE == "DEFAULT" || $SYSTEM_PROFILE == "SLIM") if has('python3') && ($SYSTEM_PROFILE == "DEFAULT" || $SYSTEM_PROFILE == "SLIM")
Plug 'SirVer/ultisnips' Plug 'SirVer/ultisnips'
let g:UltiSnipsExpandTrigger="<c-m>" let g:UltiSnipsExpandTrigger="<c-m>"
let g:UltiSnipsJumpForwardTrigger="<c-m>" let g:UltiSnipsJumpForwardTrigger="<c-l>"
let g:UltiSnipsJumpBackwardTrigger="<c-b>" let g:UltiSnipsJumpBackwardTrigger="<c-b>"
let g:UltiSnipsSnippetDirectories=[$HOME.'/.config/nvim/ultisnips/'] let g:UltiSnipsSnippetDirectories=[$HOME.'/.config/nvim/ultisnips/']
endif endif

42
src/.local/bin/fuzztest.sh Executable file
View File

@ -0,0 +1,42 @@
#!/bin/sh
# cobbled together testing script for competitive programming
set -e
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
echo "usage: fuzztest.sh [test generator] [known-good] [to-test]"
echo
echo "test generator: prints a random test case to stdout"
echo "known-good: reads from stdin, prints to stdout"
echo "to-test: behaviour will be compared to known-good"
echo
echo "to use python programs here, add a python shebang and chmod +x"
exit
fi
if [ -z "$FUZZDIR" ]; then
FUZZDIR=~/.cache/fuzztester
fi
mkdir -p "$FUZZDIR"
while true; do
$1 > "$FUZZDIR"/input
wc -c "$FUZZDIR"/input
cat "$FUZZDIR"/input | $3 > "$FUZZDIR"/faulty
cat "$FUZZDIR"/input | $2 > "$FUZZDIR"/good
RES="$(diff "$FUZZDIR"/faulty "$FUZZDIR"/good || true)"
if [ ! -z "$RES" ]; then
printf "\n\n\n-----------\n"
echo failed test case detected!
echo
echo the known-good and to-test programs differed in output.
echo
echo stdin: "$FUZZDIR"/input
echo faulty output: "$FUZZDIR"/faulty
echo good output: "$FUZZDIR"/good
break
else
echo good
fi
done