This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # copy this file somewhere in your $PATH | |
| echo "*** APT update..." | |
| sudo /usr/bin/apt update | |
| sudo /usr/bin/apt full-upgrade -V | |
| [ -x /usr/bin/flatpak ] && echo "*** FlatPak update..." && command flatpak update -y | |
| [ -x $HOME/dev/.cargo/bin/cargo-upgrade ] && echo "*** Cargo update..." && cargo-upgrade -u |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- | |
| local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" | |
| if not (vim.uv or vim.loop).fs_stat(lazypath) then | |
| local lazyrepo = "https://github.com/folke/lazy.nvim.git" | |
| local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) | |
| if vim.v.shell_error ~= 0 then | |
| vim.api.nvim_echo({ | |
| { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, | |
| { out, "WarningMsg" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); |