Skip to content

Instantly share code, notes, and snippets.

@koplenov
koplenov / extractor.v
Created November 24, 2023 07:34
extract zip func with force overwrite files in v
fn fucking_extract_zip_to_dir(file string, dir string) {
temp_path := os.join_path(os.temp_dir(), rand.string(10))
os.mkdir_all(temp_path) or { panic(err) }
szip.extract_zip_to_dir(file, temp_path) or { panic(err) }
os.cp_all(temp_path, dir, true) or { panic(err) }
os.rmdir_all(temp_path) or { panic(err) }
}
@koplenov
koplenov / v_linux.sh
Last active January 14, 2024 12:24
install lastest v on linux server
# curl https://gist.githubusercontent.com/koplenov/4d802035920b1ff70080c30c5e13e23d/raw/158901369b3b26bf095274806e10409fb5be1786/v_linux.sh | bash
wget https://github.com/vlang/v/releases/latest/download/v_linux.zip
unzip v_linux.zip
rm -f v_linux.zip
v/v symlink