Skip to content

Instantly share code, notes, and snippets.

@24HOURSMEDIA
24HOURSMEDIA / install-docker-x86.sh
Last active November 7, 2023 15:01
AWS AMI 2023 Add docker and docker compose plugin
#/bin/bash
set -e
set -o pipefail
# Install docker and docker compose plugin on AWS Linux AMI 2023
# Defaults to compose plugin for intel machines
# Run this with:
# bash <(curl -sL https://gist.githubusercontent.com/24HOURSMEDIA/52b3f516ee1427437b6f52b9b65ac969/raw/install-docker-x86.sh?_cb=$(date +%s))
@DarthSim
DarthSim / 00.imgproxy_vs_alternatives.md
Last active May 27, 2025 03:12
imgproxy vs alternatives benchmark

imgproxy vs alternatives benchmark

Setup

  • c5.xlarge AWS instance: 4 CPUs, 8 GB RAM
  • Ubuntu 18.04
  • Go 1.12
  • Python 2.7
  • Vips 8.7.4
@24HOURSMEDIA
24HOURSMEDIA / ec2-describe-instances-policy.json
Last active November 4, 2018 09:46
aws ec2 get instance and ami tags and write them to a file. here is the file and the policy for the AWS role needed om the instances
{
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:DescribeInstances",
"ec2:DescribeTags"
],
"Resource": "*"
}
@tylerhall
tylerhall / strong-passwords.php
Created August 12, 2010 21:38
A user friendly, strong password generator PHP function.
<?PHP
// Generates a strong password of N length containing at least one lower case letter,
// one uppercase letter, one digit, and one special character. The remaining characters
// in the password are chosen at random from those four sets.
//
// The available characters in each set are user friendly - there are no ambiguous
// characters such as i, l, 1, o, 0, etc. This, coupled with the $add_dashes option,
// makes it much easier for users to manually type or speak their passwords.
//
// Note: the $add_dashes option will increase the length of the password by