Skip to content

Instantly share code, notes, and snippets.

View waltercoan's full-sized avatar
🏠
Working from home

Walter Silvestre Coan waltercoan

🏠
Working from home
View GitHub Profile
@waltercoan
waltercoan / das-2-2025-2.md
Last active October 7, 2025 12:23
das-2-2025-2
Aluno Repo Anotações Module 2 Know Lab IAM Module 3 Know Lab Static S3 LAB EFS Lab VPC Module 7 Know
ARTHUR FRA... arthurrfrancis/das-2-2025-2 👎Descrever 👍 👍 👍 👍 👍 👍 👍
ARTUR BO... NÃO ENCONTRADO 👎 👍 👍 👍 👍 👍 👍 👍
FABIANA ... FabianaPauli/das-2-2025-2 👍 👍 👍 👍 👍 👍 👍 👍
FELIPE ... thekogami/das-2-2025-2 👍 👍 👎 👍 👍 👍 👍 👍
GABRIEL NA... SrSuco/das-2-2025-2 👎S3 👍 👍 👍 👍 👍 👍 👍
GABRIEL GUI... gabrielguidini/das-2-2025-2 👎S3 👍 👍 👍 👍 👍 👍 👍
GUILHERME ... guizinhoL/das-2-2025-2 👍 👎 👍 👍 👍 👎 👍 👍
HENRIQUE ... riqueolvr/das-2-2025-2 👎Descrever 👍 👍 👍 👍 👍 👍 👍
$url = "google.com"
(Measure-Command -Expression { $site = Invoke-WebRequest -Uri $url -UseBasicParsing }).Milliseconds
@waltercoan
waltercoan / demo-steps.md
Created March 14, 2024 15:50 — forked from jlian/demo-steps.md
Steps taken for IoT MQ Jumpstart Lightning demo video
@waltercoan
waltercoan / gist:43c3e7a078273a9bcaba8ab59d733c37
Created December 2, 2023 01:01
Cloudformation EC2 + RDS
AWSTemplateFormatVersion: 2010-09-09
Description: Webserver and RDS Postgresql
Parameters:
VPCID:
Description: ID of an existing VPC
Type: AWS::EC2::VPC::Id
AvailabilityZone:
Type: AWS::EC2::AvailabilityZone::Name
EnvironmentType:
#!/bin/bash
yum update -y
yum install -y php httpd
systemctl start httpd
systemctl enable httpd
usermod -a -G apache ec2-user
chown -R ec2-user:apache /var/www
chmod 2775 /var/www
find /var/www -type d -exec chmod 2775 {} \;
find /var/www -type f -exec chmod 0664 {} \;
#cloud-config
apt_update: true
packages:
- apache2
- php
- php7.4-curl
runcmd:
- echo "<h1>Instancia:</h1> <?php echo json_decode(file_get_contents('http://169.254.169.254/metadata/instance/compute?api-version=2021-02-01&format=json', false, stream_context_create(array('http'=>array('method'=>'GET','header'=>'Metadata:true')))),true){'vmId'}; phpinfo();?>" > /var/www/html/index.php
Parameters:
SUBNETID:
Description: ID subnet
Type: AWS::EC2::Subnet::Id
VPCID:
Description: ID of an existing VPC
Type: AWS::EC2::VPC::Id
Resources:
InstanceSecurityGroup:
Type: AWS::EC2::SecurityGroup
#cloud-config
package_update: true
package_upgrade: true
packages:
- apache2
runcmd:
- systemctl enable apache2
- curl -s -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance/compute?api-version=2021-02-01" | sudo tee /var/www/html/index.html