This file contains 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
# read more at: https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-public-parameters.html | |
# this will pickup the latest value of the parameter every time the template is run | |
# the parameter value must be the Key for that Parameter. Then CFN will retrieve the value | |
# this does not support SecureString SSM Parameter types | |
Parameters: | |
LatestLinuxAmiId: | |
Type: 'AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>' | |
# obtain list with |
This file contains 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
#!/bin/bash | |
# Specify the desired volume size in GiB as a command-line argument. If not specified, default to 20 GiB. | |
SIZE=${1:-20} | |
# Install the jq command-line JSON processor. | |
sudo yum -y install jq | |
# Get the ID of the envrionment host Amazon EC2 instance. | |
INSTANCEID=$(curl http://169.254.169.254/latest/meta-data//instance-id) |
This file contains 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 logging | |
import boto3 | |
from botocore.exceptions import ClientError | |
import time | |
AMI='ami-0f93b5fd8f220e428' | |
SUBNET='subnet-8f5e56e7' | |
SG=['sg-0d5d78dc3b411252b'] | |
REGION='us-east-2' | |
KEY='VyprVPN-us-east-2' |
This file contains 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
https://www.internetstaff.com/multiple-ec2-network-interfaces-on-red-hat-centos-7/ |
This file contains 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 alpine:3.10.1 | |
RUN apk add --update / | |
python3 / | |
py-pip / | |
curl | |
##Example CMD exec form | |
#CMD ['python3','--version'] |
This file contains 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
#!/bin/bash | |
#ffmg = ffmpeg -i 2.5-2.mp3 -ac 2 -codec:a libmp3lame -b:a 48k -ar 16000 2.5-2-e.mp3 | |
for i in $(ls *.mp3); do | |
#echo audio: $i | |
NAME=`echo "$i" | cut -d'.' -f1` |
This file contains 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
#!/bin/sh | |
# to use, copy this file into your .git/hooks folder in your git repo | |
# Rename the file to: pre-commit | |
# make sure to add execute permissions using: chmod +x .git/hooks/pre-commit | |
command -v pngcrush >/dev/null 2>&1 || { | |
echo "\033[1mPlease install pngcrush to reduce images size before commit\033[0m" | |
echo "Install pngcrush with the following:" | |
echo "\t \033[1mbrew install pngcrush\033[0m" | |
echo "OR" | |
echo "\t Site: \033[1m\033[4mhttp://pmt.sourceforge.net/pngcrush/\033[0m" |
This file contains 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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Outputs": { | |
"CCRoleArn": { | |
"Value": { | |
"Fn::GetAtt": [ | |
"CCRole", | |
"Arn" | |
] | |
} |
This file contains 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 base64 | |
import uuid | |
import httplib | |
import urlparse | |
import json | |
import boto3 | |
import string | |
import random | |
This file contains 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
{ | |
"Id": "Policy1397632521960", | |
"Statement": [ | |
{ | |
"Sid": "Stmt1397633323327", | |
"Action": [ | |
"s3:GetObject" | |
], | |
"Effect": "Allow", | |
"Resource": "arn:aws:s3:::example/*", |