Skip to content

Instantly share code, notes, and snippets.

View AlexAtkinson's full-sized avatar

Alex Atkinson AlexAtkinson

  • Toronto
View GitHub Profile

Keybase proof

I hereby claim:

  • I am alexatkinson on github.
  • I am evilkittenlord (https://keybase.io/evilkittenlord) on keybase.
  • I have a public key ASDWPiUXZ43yuzpkbnsKjleOCclpnUhoVwYQmLcKWaKGsAo

To claim this, I am signing this object:

@AlexAtkinson
AlexAtkinson / GOACCESS-AWS-ELB.md
Last active April 12, 2024 16:02
Analyzer AWS ELB logs (s3) with goaccess

GoAccess ELB Logs

Setup

Assuming you have an AWS account and a Load Balancer that's logging to S3, the only other things you'll need are:

  • s3 cli
  • goaccess
    • NOTE: Scroll down. You don't have to build from source.
  • goaccessrc file to map the log format. Create the file ~/.goaccessrc
@AlexAtkinson
AlexAtkinson / auto-autorandr.md
Last active July 13, 2023 15:31
Automatic autorandr change

autorandr don't auto...

  1. Setup directories (Or use whatever you use for crons, but adjust these instructions accordingly)

    mkdir -p $HOME/crons/logs/
    mkdir $HOME/crons/autorandr
    
  2. Create script $HOME/crons/autorandr/autorandr-reloader.sh

@AlexAtkinson
AlexAtkinson / pcloud.desktop
Created June 27, 2023 20:26
pCloud Desktop Entry
[Desktop Entry]
Icon=/home/<user>/.local/share/pCloud/pcloud.svg
Exec=/usr/local/bin/pcloud %u
Version=1.0
Type=Application
Categories=Network
Name=pCloud
StartupWMClass=pcloud
MimeType=application/x-executable
X-GNOME-Autostart-enabled=true
@AlexAtkinson
AlexAtkinson / constat.sh
Last active May 22, 2024 18:22
Generate a simple TCP Connection Report
#!/usr/bin/env bash
# constat.sh
# ------------------------------------------------------------------------------
# DESCRIPTION:
# Generate a TCP Connection Report
#
# USAGE:
# This script can be run directly, setup as a .bashrc function, or called remotely.
# Remote Use Example: (Tip: Get url by hitting the [RAW] button for this gist)
# source <(curl -s <url>)
@AlexAtkinson
AlexAtkinson / Fastly.md
Last active June 7, 2023 01:26
Some Fastly ProTips

Fastly ProTips

NOTE: This needs some organization work...

Certificate (TLS) Options

Pricing

The certificate pricing and options are not laid out clearly. As of July 30, 2020:

@AlexAtkinson
AlexAtkinson / API Design Tips.md
Last active June 6, 2023 23:56
API Design Tips for beginners and professionals alike.

API Design Tips

DO: Start by Understanding APIGW

APIGW is NOT the AWS service, but an industry standard technology for servicing resource access while providing facilities for oversight, governance, security, and operability considerations.

Some options:

  • The GW is open source and free to use, but many features (such as OIDC) are paywalled.

Env0

Env0 is an IaC Control Plane.

Admin Helper Functions

You can add these to your .bashrc to improve your API workflow. Note that most of these require the following environment variables.

  • ENV0_ORGANIZATION_ID
  • ENV0_AUTH_TOKEN

Filesystem CLI Tips

Watch the following process

Open a terminal and run the following to observe the commands interaction with the fs as they happen.

watch tree top/
@AlexAtkinson
AlexAtkinson / Kong-Scripts.md
Last active May 25, 2023 20:28
Some Kong MGMT Scripts.

Kong MGMT Scripts

No fancy flags, help, etc. Pure utility.

Generate Kong Report

#!/usr/bin/env bash
# generateKongReport.sh

host="${1}"