Skip to content

Instantly share code, notes, and snippets.

"Compile Code
map <F5> :call CompileRunGcc()<CR>
func! CompileRunGcc()
exec "w"
if &filetype == 'markdown'
exec "!pandoc -s -o $(basename % .md).pdf % && zathura $(basename % .md).pdf &"
elseif &filetype == 'c'
exec "!gcc -pthread -lm % -o %<"
exec "!time ./%<"
elseif &filetype == 'tex'
@copoer
copoer / say.sh
Created July 20, 2023 15:09
Clipboard TTS
#!/bin/bash
[ ! "$(docker ps -a | grep tts-server)" ] && docker run -d --name tts-server --rm -p 5002:5002 --gpus all --entrypoint python3 -v /home/user/.local/share/tts/:/root/.local/share/tts/ ghcr.io/coqui-ai/tts TTS/server/server.py --list_models tts --model_name tts_models/en/vctk/vits --use_cuda true
text=$(xclip -o)
curl --get --data-urlencode "text=${text}" --data-urlencode "speaker_id=p364" http://localhost:5002/api/tts --output ~/tmp/sound.wav
mpv ~/tmp/sound.wav
@copoer
copoer / gitbackup.sh
Last active July 16, 2024 12:58 — forked from erdincay/sugh.sh
su GitHub (downloading all repositories from a given user)
#!/bin/bash
name="copoer"
cntx="users"
page=1
echo $name
echo $cntx
START=1
END=3
@copoer
copoer / arch-linux-install.md
Last active December 21, 2022 15:08 — forked from kylemanna/arch-linux-install.md
Minimal instructions for installing arch linux on an UEFI NVMe system with full system encryption using dm-crypt and luks