Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Matt Cavanagh Maelstromeous

🏠
Working from home
View GitHub Profile
@Maelstromeous
Maelstromeous / main.tf
Created Jul 26, 2019
Simple AWS Terraform script
View main.tf
# Install terraform and run "terraform apply" to use this
provider "aws" {
region = "eu-west-2"
}
data "aws_availability_zones" "all" {}
variable "web_port" {
description = "The port that will serve HTTP requests"
View extend-upload.php
<?php
// This line needs to be called after initialize but before run
$app['upload'] = $app->extend(
'upload',
function ($handler, $app) {
if ($app['request']->get('contenttype') && $app['request']->get('id')) {
$handler->setPrefix("/{$app['request']->get('contenttype')}/{$app['request']->get('id')}/");
}