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
#!/usr/bin/bash | |
# | |
# @date 1/26/2021 | |
# @author Jack Kotheimer | |
# | |
# A simple ssh key manager | |
# | |
# Interface for adding a new ssh public key | |
# Wipes all keys in ~/.ssh/authorized_keys2 once a month with a crontab passing " | |
# !!MAKE SURE YOUR MASTER KEY IS STORED SAFELY IN ~/.ssh/authorized_keys!! |
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
#!/usr/bin/env bash | |
# run.sh | |
# | |
# @author: Jack Kotheimer | |
# @date: 12/5/2020 | |
# | |
# The main functionality of the script is listed just below in the '_help' function, but if you have any questions about | |
# the functionality or implementation of this script, feel free to send me a message via email at [email protected] | |
# | |
# Enjoy! |
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
#!/usr/bin/bash | |
# If the user does not have elevated privileges, do that now | |
[[ $(whoami) != 'root' || $EUID != 0 ]] && { | |
sudo "$0" "$@" | |
exit $? | |
} | |
function uncomment { | |
sudo sed -i "/${1}/s/^#//g" ${2} |
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 | |
[ -z $1 ] && echo "No package name specified" && exit 1 | |
# If the package does not exist in the aur, exit with an error | |
[ "$(curl -I -s "https://aur.archlinux.org/packages/${1}" | head -n 1 | cut -d$' ' -f2)" = 404 ] && { | |
echo "Could not locate package: ${1}" | |
exit -1 | |
} |
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
" General config | |
set history=500 | |
command! W execute 'w !sudo tee % > /dev/null' <bar> edit! | |
set noswapfile | |
set nobackup | |
set nowb |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
GREEN='\[\033[0;32m\]' | |
BLUE='\[\033[0;36m\]' | |
YELLOW='\[\033[0;33m\]' | |
NC='\[\033[00m\]' | |
# If not running interactively, don't do anything | |
case $- in |