Skip to content

Instantly share code, notes, and snippets.

@leonmydla
leonmydla / lvm-on-luks.sh
Created December 1, 2021 01:06
A guided setup script for lvm on luks
#!/usr/bin/env bash
set -eu
quit() {
echo "$@"
exit 1
}
if [ $# -lt 2 ]; then
@leonmydla
leonmydla / quick-env.sh
Last active December 1, 2021 01:10
Quick setup for testing environments
#!/usr/bin/env bash
set -eux
# execute using curl "https://gist.githubusercontent.com/leonmydla/79fc157529ad3f430f5ec02bc975a2cf/raw" | bash
sudo apt install -y git curl zsh
mkdir -p $HOME/.local/lib
mkdir -p $HOME/.local/lib
@leonmydla
leonmydla / clone-all.sh
Last active March 28, 2020 14:59
Clone all repos listed in a file
#!/usr/bin/env bash
# This file should contain a list of remotes to clone.
# Every remote is put in a single line
# The file has to end on an empty line
repo_file=".repos-to-clone"
if ! [[ -f $repo_file ]]; then
echo "$repo_file file doesn't exist"
exit 1
@leonmydla
leonmydla / git-clean-deep.sh
Last active August 26, 2022 03:22
Clean your git repo. Don't "rm -rf repo && git clone repo"
#!/usr/bin/env bash
set -e
function usage() {
printf "$0 <git-repo|path-in-git-repo>\n"
exit 1
}
if [[ $# -lt 1 ]]; then