Skip to content

Instantly share code, notes, and snippets.

View sigzegv's full-sized avatar

Cavern sigzegv

  • France
View GitHub Profile
@sigzegv
sigzegv / vimrc
Last active March 2, 2025 18:45
vimrc for vim9+
vim9script
# https://vimhelp.org/vim9.txt.html
set nocompatible
if has("mac")
set clipboard=unnamed
else
set clipboard=unnamedplus # requires vim-gui-common
endif
@sigzegv
sigzegv / post-install-dev.sh
Last active December 24, 2024 14:37
debian post install
#!/bin/bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install alacritty
curl -sL https://github.com/alacritty/alacritty/releases/latest/download/Alacritty.svg -o ~/.local/share/icons/Alacritty.svg
curl -sL https://github.com/alacritty/alacritty/releases/latest/download/Alacritty.desktop -o ~/.local/share/applications/Alacritty.desktop
sudo apt install -y python3-venv golang tmux
#curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
@sigzegv
sigzegv / winesource
Last active June 9, 2023 18:16
wine cli scripts
#!/bin/bash
# Source this script to set a given wineprefix as current prefix,
# and winerunner as default wine command is the current terminal.
# You will be able to just use 'wine' command in the terminal and make action to prefix.
#
# Wine runner path must be the path containing the bin/wine directory.
# if /some/wine/path/bin/wine then use /some/wine/path (this also applies to Proton runners)
#
# ie: $ source winesource /to/some/prefix /with/some/winerunner
#
@sigzegv
sigzegv / file_get_contents.c
Last active September 14, 2023 14:16
C snippets
char*
file_get_contents(const char* fname) {
FILE* f = fopen(fname, "r");
if (!f) {
printf("failed reading %s", fname);
return NULL;
}
fseek(f, 0, SEEK_END);
long sz = ftell(f);