Skip to content

Instantly share code, notes, and snippets.

View sbennettmcleish's full-sized avatar

Scott Bennett-McLeish sbennettmcleish

View GitHub Profile
@npearce
npearce / install-docker.md
Last active January 28, 2026 11:06
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@jweyrich
jweyrich / aws_alb_log_parser.py
Last active June 11, 2024 14:39
AWS ALB Log Parser written in Python
#!/usr/bin/env python3
# coding=utf8
#
# AUTHOR: Jardel Weyrich <jweyrich at gmail dot com>
#
from __future__ import print_function
import re, sys
def parse_alb_log_file(file_path):
fields = [
@martinlindenberg
martinlindenberg / format-aws-sso.js
Last active June 6, 2023 13:04
reformats AWS sso page. (greasemonkey script)
// ==UserScript==
// @name format-aws-sso
// @namespace signin.aws.amazon.com
// @description reformats that page
// @include https://signin.aws.amazon.com/saml
// @version 1.1
// @grant none
// ==/UserScript==
$('#saml_form').css('max-width', 'none');
$('fieldset').css('width', 'none');
@Eyjafjallajokull
Eyjafjallajokull / README.md
Last active April 8, 2025 15:20
AWS EBS - Find unused snapshots

This script can help you find and remove unused AWS snapshots and volumes.

There is hardcoded list of regions that it searches, adjust the value to suit your needs.

Use snapshot.py snapshot-report to generate report.csv containing information about all snapshots.

snapshot.py snapshot-cleanup lets you interactively delete snapshot if it finds it is referencing unexisting resources.

./snapshots.py --help
@joshuafernandes
joshuafernandes / README.md
Last active December 9, 2018 04:21 — forked from willjohnson/README.md
Server Status Widget for Dashing

Description

A Dashing widget that checks whether a server is responding to either an http or ping request. It displays either a check or alert depending on the response.

Usage

  1. Include the typhoeus gem to your Gemfile and then update with bundle
@mzupan
mzupan / lambda.py
Last active June 8, 2021 05:19
AWS Lambda job to backup RDS instances
import boto3
import datetime
def lambda_handler(event, context):
print("Connecting to RDS")
client = boto3.client('rds')
print("RDS snapshot backups stated at %s...\n" % datetime.datetime.now())
client.create_db_snapshot(
DBInstanceIdentifier='web-platform-slave',
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 18, 2026 22:54
A badass list of frontend development resources I collected over time.
@mrchief
mrchief / LICENSE.md
Last active May 20, 2025 13:10
Add "Open with Sublime Text 2" to Windows Explorer Context Menu (including folders)

MIT License

Copyright (c) [year] [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@nf
nf / hello-node.js
Created July 6, 2012 21:14
Hello world web server that scales across multiple processors
var cluster = require('cluster');
var http = require('http');
var numCPUs = require('os').cpus().length;
if (cluster.isMaster) {
// Fork workers.
for (var i = 0; i < numCPUs; i++) {
cluster.fork();
}
cluster.on('exit', function(worker, code, signal) {
@cpudney
cpudney / TODO.txt
Created September 22, 2011 00:44
Brownlow Medal Winners
Fix resize
Possibly add +1 to End year and 0.5 to medal years
Add year of birth and death
Colour medal lines (by team), player bar/name (by state of origin)
Add player URL and image URL to spreadsheet and infobox