Skip to content

Instantly share code, notes, and snippets.

View AlexAtkinson's full-sized avatar

Alex Atkinson AlexAtkinson

  • Toronto
View GitHub Profile
@AlexAtkinson
AlexAtkinson / make-ca-cert.sh
Last active May 28, 2024 23:39
Create a CA & Server Cert
#!/usr/bin/env bash
# ----------------------------------------------------------------------------------------------------------------------
#
# make-ca-cert.sh
#
# SYNOPSIS
# Creates a CA if one doesn't already exist, and installs it (debian).
# Creats a server certificate (including wildcard SAN) signed by the CA.
#
# ----------------------------------------------------------------------------------------------------------------------
@AlexAtkinson
AlexAtkinson / CORS.md
Last active May 29, 2024 20:58
A CORS Cheat...

CORS -- Just the edge knowledge

localhost

To set cookies on the localhost, either have a self signed cert setup (see refs), or exclude the 'secure', and 'sameSite' directives.

CORS

@AlexAtkinson
AlexAtkinson / BASH_Cheatsheet.md
Created April 10, 2024 04:38
BASH Cheatsheet
@AlexAtkinson
AlexAtkinson / check_failover_dhcp.ps1
Created April 2, 2024 14:08
PS1 From The Past: Nagios DHCP Failover Check
# ----------------------------------------------------------------------
# File: check_failover_dhcp.ps1
# Description: NRPE Nagios Check for Windows Server 2012 DHCP Failover Servers
# https://exchange.nagios.org/directory/Plugins/Network-Protocols/DHCP-and-BOOTP/Windows-2012-DHCP-Failover-and-Scope-Health-Check/details
#
# Checks: Failover State
# Failover Mode
# Scope State of Each Scope
# Scope Statistics (PercentInUse) of Each Scope
#
@AlexAtkinson
AlexAtkinson / Domain Names, DNS & URLs for DevOps & Friends.md
Last active May 7, 2024 23:01
Domain Names, DNS, and URLs for DevOps & Friends

Domain Names, DNS, and URLs for DevOps & Friends

Table of Contents

@AlexAtkinson
AlexAtkinson / Evernote_Alternative.md
Last active April 4, 2024 13:40
Free Evernote Alternative

Evernote Icon Evernote Alternative - Obsidian Evernote Icon

This is my free Evernote alternative.

Tech Stack

There are three components of this solution: the note taking app, cloud-sync utility, and the optional cloud storage.

NOTE: If you don't need more than 2GB of cloud storage, you can get away with simply putting the vault in Dropbox and accessing from all your devices. NO NEED FOR SYNCTHING. Otherwise, read on.

@AlexAtkinson
AlexAtkinson / TheNines.md
Created February 7, 2024 19:14
The Nines

The Nines

Availability is measured in nines. Here's the breakdown:

Availability % Downtime/Y DownTime/Mo Downtime/w Downtime/d Class
55.5555555% ("nine fives") 162.33 d 13.53 d 74.92 h 10.67 h
90% ("one nine") 36.53 d 73.05 h 16.80 h 2.40 h 1
95% ("one nine five") 18.26 d 36.53 h 8.40 h 1.20 h
97% 10.96 d 21.92 h 5.04 h 43.20 m
@AlexAtkinson
AlexAtkinson / Docker ProTips.md
Last active January 19, 2024 20:27
Docker ProTips

Introduction

This is not a reprint of the docs, but a collection of tips, tricks, and specific guidance for my own reference, and the development of others.

Using

Interactive Container

So long as your container has a CLI, you can access it by specifying 'interactive' and 'tty' (pseudo-tty).

@AlexAtkinson
AlexAtkinson / file_watch.sh
Last active January 5, 2024 21:35
Detects changes in a file.
#!/usr/bin/env bash
# file_watch.sh
# ------------------------------------------------------------------------------
# Description:
# Watches a file for changes.
# Includes output on inode changes as that may be desirable in some scenarios.
# NOTE: ... Just use inotifywait.
#
# Usage:
# ./file_watch <path/to/file>
@AlexAtkinson
AlexAtkinson / dnsSUBflyover.sh
Created January 4, 2024 19:47
Flyover subdomain detection.
#!/bin/env bash
# Checks if subdomain.$1 is registered.
# Iterates the 1000 most popular subdomains.
# NOTE: Can be changed to 10000, or even 100000.
#
# Usage:
# ./dnsSUBflyover.sh nike.com
#
# NOTE:
# For more subdomains: