Skip to content

Instantly share code, notes, and snippets.

View EmilMaric's full-sized avatar

Emil Marić EmilMaric

View GitHub Profile
@EmilMaric
EmilMaric / rpi-backup.sh
Created July 22, 2024 05:15
RPI Backup Generation & Rotation Script
#!/bin/bash
# When this script is run, it generates a new incremental RPI backup .img file
# using RonR's image-backup script, deletes the oldest .img file and renames the
# remaining .img file to to not contain the `latest` word in the file name. The
# idea is that by running this script consistently, there will always be two .img
# files:
# 1) The .img file generated on the last run.
# 2) The .img file generated on the run before the last run.
# When the script is run again, the .img file in step 2 is deleted (rotated out) and
# the one in step 1 is renamed, while a .img file is generated.
@EmilMaric
EmilMaric / neovim_local_install.sh
Last active November 7, 2015 19:39
Script to install neovim on UBC servers
#!/bin/sh
DEPS="$HOME/local/"
BIN="$DEPS/bin"
# Kill script if any command exits with non-zero exit status
set -e
@EmilMaric
EmilMaric / tmux_local_install.sh
Last active December 10, 2015 22:01 — forked from ryin/tmux_local_install.sh
Script to install tmux on UBC servers
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=2.1