Skip to content

Instantly share code, notes, and snippets.

View joelhoelting's full-sized avatar

Joel Hölting joelhoelting

View GitHub Profile
@joelhoelting
joelhoelting / .vimrc
Created February 23, 2022 10:32
.vimrc
syntax on
colorscheme industry
set number
set tabstop=4
set softtabstop=4
set autoindent
set expandtab
set cursorline
@joelhoelting
joelhoelting / youtube2mp3
Last active February 23, 2022 10:30
Youtube to mp3 script for youtube-dlp
#!/bin/bash
function convert_link_to_mp3 {
echo "$1"
if [[ -n $1 ]]; then
youtube_link=$1
else
read -pr "Youtube link: " youtube_link
fi
@joelhoelting
joelhoelting / cleanup_docker.sh
Created January 28, 2021 03:42
Cleanup all docker images, containers, volumes and networks
#!/bin/bash
# Stop all containers
docker stop $(docker ps -aq)
# Remove all images (forced)
docker rmi $(docker images -q) -f
# Remove all containers
docker rm $(docker ps -aq)
@joelhoelting
joelhoelting / nginx_modsite.sh
Created January 28, 2021 03:35
Manage, activate and deactivate nginx conf files on server
#!/bin/bash
##
# File:
# nginx_modsite
# Description:
# Provides a basic script to automate enabling and disabling websites found
# in the default configuration directories:
# /etc/nginx/sites-available and /etc/nginx/sites-enabled
# For easy access to this script, copy it into the directory: