Skip to content

Instantly share code, notes, and snippets.

Avatar

Loki Lust lokilust

  • The Umbrella Corporation
  • Toronto, ON, CA
View GitHub Profile
@lokilust
lokilust / dev_signed_cert.sh
Created May 3, 2022 — forked from dobesv/dev_signed_cert.sh
Script to create (1) a local certificate authority, (2) a host certificate signed by that authority for the hostname of your choice
View dev_signed_cert.sh
#!/usr/bin/env bash
#
# Usage: dev_signed_cert.sh HOSTNAME
#
# Creates a CA cert and then generates an SSL certificate signed by that CA for the
# given hostname.
#
# After running this, add the generated dev_cert_ca.cert.pem to the trusted root
# authorities in your browser / client system.
#
@lokilust
lokilust / upgrade.sh
Last active May 4, 2022 — forked from bocharsky-bw/upgrade.sh
Shell Script for Upgrade Ubuntu via APT in one step
View upgrade.sh
#!/bin/bash
TEXT_RESET='\e[0m'
TEXT_YELLOW='\e[0;33m'
TEXT_RED_B='\e[1;31m'
# Get list of installed kernels. The `head -n -1` removes the
# last kernel in the list, which should be the latest kernel.
old_kernels=($(dpkg -l | grep linux-image | tr -s " " | \
cut -f 2 -d ' ' | sort -V | uniq | head -n -1))