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 | |
set -e -o pipefail | |
if [ -x "$(command -v "$1")" ]; then | |
exec "$@" | |
fi | |
assertIsSet() { | |
# $1=variable_value $2=variable_name | |
if [ -z "$1" ]; then |
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
#NodeGroup | |
resource "aws_iam_role" "your-eks-cluster-ng" { | |
name = "your-eks-cluster-node-group" | |
permissions_boundary = var.iam_permissions_boundary | |
tags = merge(var.default_tags, map("Name", "your-eks-cluster-ng-sg")) | |
assume_role_policy = jsonencode({ | |
Statement = [{ | |
Action = "sts:AssumeRole" | |
Effect = "Allow" | |
Principal = { |
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
resource "aws_launch_template" "your_eks_launch_template" { | |
name = "your_eks_launch_template" | |
vpc_security_group_ids = [var.your_security_group.id, aws_eks_cluster.your-eks-cluster.vpc_config[0].cluster_security_group_id] | |
block_device_mappings { | |
device_name = "/dev/xvda" | |
ebs { | |
volume_size = 20 |
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
resource "aws_eks_node_group" "your-eks-cluster-ng" { | |
cluster_name = aws_eks_cluster.your-eks-cluster.name | |
node_group_name = "your-eks-cluster-ng-hardened" | |
node_role_arn = aws_iam_role.your-eks-cluster-ng.arn | |
subnet_ids = [var.network_subnets.pvt[0].id, var.network_subnets.pvt[1].id, var.network_subnets.pvt[2].id] | |
# instance_types = ["t3.medium"] -> this is removed and shifted to the custom launch template | |
tags = merge(var.default_tags, map("Name", "your-eks-cluster-ng")) | |
scaling_config { | |
desired_size = var.asg_desired_size | |
max_size = var.asg_max_size |
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 | |
# Author : Wang Poh Peng | |
# Description : Use FFMPEG to hardcode subs into videos into mkv or mp4 format | |
RED='\033[1;31m' | |
NC='\033[0m' # No Color | |
GREEN='\033[0;32m' | |
CYAN='\033[0;36m' |
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
while true; do | |
echo "Starting Bamboo Process Console - logs to /tmp" | |
./bamboo-agent.sh console >> /tmp/bamboo-logs & | |
BAMBOO_PID=$! | |
tail -f /tmp/bamboo-logs & | |
TAIL_PID=$! | |
echo "Tail PID is $TAIL_PID" | |
echo "Bamboo PID is $BAMBOO_PID" | |
wait $BAMBOO_PID | |
kill -9 $TAIL_PID |
docker run \
--rm \
-u root \
-p 8080:8080 \
-v jenkins-data:/var/jenkins_home \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "$HOME":/home \
jenkinsci/blueocean
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
Function Restart-RdpServices { | |
<# | |
.SYNOPSIS | |
Restarts services related to RDP. | |
.DESCRIPTION | |
Restarts services related to RDP: 'TermService' and 'Remote Desktop Services UserMode Port Redirector' | |
.PARAMETER ComputerName | |
ComputerName that will have it RDP related services restarted. | |
.EXAMPLE | |
Nuke-RDP -ComputerName 'Contoso1' |
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
{ | |
"platformName": "iOS", | |
"platformVersion": "12.1", | |
"deviceName": "iPhone XS", | |
"browserName": "Safari", | |
"automationName": "XCUITest" | |
} |
NewerOlder