Skip to content

Instantly share code, notes, and snippets.

Avatar

Loki Lust lokilust

  • The Umbrella Corporation
  • Toronto, ON, CA
View GitHub Profile
@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))
@dobesv
dobesv / dev_signed_cert.sh
Last active Aug 24, 2022
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.
#
@croxton
croxton / SSL-certs-OSX.md Generate ssl certificates with Subject Alt Names
View SSL-certs-OSX.md

Generate ssl certificates with Subject Alt Names on OSX

Open ssl.conf in a text editor.

Edit the domain(s) listed under the [alt_names] section so that they match the local domain name you want to use for your project, e.g.

DNS.1   = my-project.dev

Additional FQDNs can be added if required:

@bocharsky-bw
bocharsky-bw / upgrade.sh
Last active Sep 6, 2022
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'
sudo apt-get update
echo -e $TEXT_YELLOW
echo 'APT update finished...'
echo -e $TEXT_RESET