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
{ | |
"Sid": "Stmt1234", | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "sqs:SendMessage", | |
"Resource": "arn:aws:sqs:us-west-2:111111111111:QueueName", | |
"Condition": { | |
"ArnEquals": { | |
"aws:SourceArn": "arn:aws:sns:us-west-2:555555555555:TopicName" | |
} |
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
{ | |
"Effect": "Allow", | |
"Action": [ | |
"ec2:DescribeInstances", | |
"ec2:StartInstances", | |
"ec2:StopInstances" | |
], | |
"Resource": "*" | |
}, | |
{ |
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
provider "aws" { | |
region = "your_aws_region" | |
} | |
data "aws_caller_identity" "current" {} | |
resource "aws_iam_policy" "ssm_access_policy" { | |
name = "SSMAccessPolicy" | |
description = "Policy for AWS SSO role to access AWS Systems Manager" |
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
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 |
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
provider "aws" { | |
region = "your_aws_region" | |
} | |
resource "aws_elasticache_subnet_group" "example" { | |
name = "example" | |
subnet_ids = ["subnet-xxxxxxxxxxxxxxxxx", "subnet-yyyyyyyyyyyyyyyyy"] | |
} | |
resource "aws_elasticache_parameter_group" "example" { |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:ListBucket", | |
"s3:GetBucketLocation" | |
], | |
"Resource": [ |
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
--- | |
- name: Download JAR file | |
hosts: your_vm_group | |
become: yes | |
tasks: | |
- name: Create directory for JAR file | |
file: | |
path: /path/to/destination/directory | |
state: directory | |
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 random | |
def take_matches(matches, max_take): | |
# L'ordinateur prend des allumettes au hasard, mais en garantissant qu'il ne prend pas la dernière. | |
computer_choice = random.randint(1, max_take) | |
if matches - computer_choice == 1: | |
computer_choice = 1 | |
return computer_choice | |
def main(): |
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
# converts a VMware vmdk to an Azure compatible fixed VHD | |
# to use the VHD you've then to upload into a storage container as a BlobPage | |
# then create a Managed Disk | |
# then create a VM from that Managed Disk | |
# | |
ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath disk1.vmdk -VhdType Fixed -VhdFormat vhd -destination disk1.vhd |
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 | |
docker run --name myxedb \ | |
-d \ | |
-p 51521:1521 \ | |
-p 55500:5500 \ | |
-e ORACLE_PWD=mysecurepassword \ | |
-e ORACLE_CHARACTERSET=AL32UTF8 \ | |
-v /Users/abdenourbali/work/Docker/dockxedb/oradata:/opt/oracle/oradata \ | |
-v /Users/abdenourbali/work/Docker/dockxedb/data/scripts/setup:/opt/oracle/scripts/setup \ |
NewerOlder