This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"NextToken": null, | |
"PodCatalogItems": [ | |
{ | |
"AvailableEC2Capacities": [ | |
{ | |
"Family": "m5", | |
"MaxSize": "24xlarge", | |
"Quantity": "6" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Demonstrate Bash | |
[Service] | |
ExecStartPre=/usr/bin/bash -c "/usr/bin/systemctl set-environment MYVAR=$(( 2 + 2 ))" | |
ExecStart=/usr/bin/echo "2 + 2 = ${MYVAR}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from aws_cdk import ( | |
core, | |
aws_ec2 as ec2, | |
aws_eks as eks, | |
aws_iam as iam | |
) | |
class StackK8SStack(core.Stack): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import os | |
import time | |
import json | |
import twitter | |
import boto3 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
# you can assign role in the function like below | |
# ROLE_ARN = 'arn:aws:iam::01234567890:role/my_role' | |
# | |
# or you can pass role as an evironment varibale | |
# ROLE_ARN = os.environ['role_arn'] | |
ROLE_ARN = = os.environ['role_arn'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"liveServer.settings.https": { | |
"enable": true, //set it true to enable the feature. | |
"cert": "/Users/jorgehrn/Documents/GitHub/get-qs-dashboard-url/ssl/server.crt", //full path of the certificate | |
"key": "/Users/jorgehrn/Documents/GitHub/get-qs-dashboard-url/ssl/server.key", //full path of the private key | |
"passphrase": "" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#in order to run the code above, install the python packages above: | |
#pip install ec2-metadata | |
#pip install boto3 | |
#!/usr/bin/python | |
import time | |
import boto3 | |
from ec2_metadata import ec2_metadata | |
#constants |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global user.name "Jorge Hernandez" | |
git config --global user.email my_email | |
git config --global credential.helper '!aws codecommit credential-helper $@' | |
git config --global credential.UseHttpPath true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* BASIC Authentication | |
* | |
* Lambda@Edge snippet for basic auth with CloudFront & Amazon S3 (static website) | |
* This code use viewer request integration btw CloudFront 7 Lambda@Edge | |
* | |
*/ | |
'use strict'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
from zipfile import ZipFile | |
import boto3 | |
S3 = boto3.resource('s3') | |
NewerOlder