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 | |
mysql_secure_installation <<EOF | |
y | |
secret | |
secret | |
y | |
y | |
y |
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", | |
"Description": "simple template", | |
"Parameters": { | |
"KeyName": { | |
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the web server", | |
"Type": "String", | |
"MinLength": "1", | |
"MaxLength": "64", | |
"AllowedPattern": "[-_ a-zA-Z0-9]*", |
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
"UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [ | |
"<powershell>\n", | |
"pip install -U cumulus-bundle-handler\n", | |
"# Join the AD domain\n", | |
"$password = \"MyPassW0rd\" | ConvertTo-SecureString -asPlainText -Force\n", | |
"$username = \"example.com\\username\"\n", | |
"$credential = New-Object System.Management.Automation.PSCredential($username,$password)\n", | |
"Add-Computer -domainname example.com -OUPath \"OU=Servers,OU=Resources,OU=ORGANIZATION,DC=example,DC=com\" -Credential $credential -passthru \n", |
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
root@c836246fc87c:/etc/mysql# cat my.cnf | |
# MariaDB database server configuration file. | |
# | |
# You can copy this file to one of: | |
# - "/etc/mysql/my.cnf" to set global options, | |
# - "~/.my.cnf" to set user-specific options. | |
# | |
# One can use all long options that the program supports. |
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 | |
# original source/tip: https://www.workaround.cz/howto-compile-install-latest-python-37-38-centos-7-8/ | |
wget https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz -P /tmp/ | |
tar xzfv /tmp/Python-3.8.1.tgz -C /tmp | |
cd /tmp/Python-3.8.1 |
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
$ wget https://releases.hashicorp.com/consul/1.4.3/consul_1.4.3_linux_amd64.zip -O consul.zip | |
--2019-03-10 00:14:07-- https://releases.hashicorp.com/consul/1.4.3/consul_1.4.3_linux_amd64.zip | |
Resolving releases.hashicorp.com (releases.hashicorp.com)... 151.101.37.183, 2a04:4e42:9::439 | |
Connecting to releases.hashicorp.com (releases.hashicorp.com)|151.101.37.183|:443... connected. | |
HTTP request sent, awaiting response... 200 OK | |
Length: 34777003 (33M) [application/zip] | |
Saving to: ‘consul.zip’ | |
consul.zip 100%[============================>] 33.17M 4.46MB/s in 9.2s |
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
$path = "C:\Sites\Website123" | |
$user = "domain\user" | |
$acl = Get-Acl $path | |
$arguments = $user, "ReadAndExecute", "ContainerInherit, ObjectInherit", "None", "Allow" | |
$accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $arguments | |
$acl.SetAccessRule($accessRule) |
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
#!/usr/bin/env bash | |
BUCKET=$1 | |
CWD=$(pwd) | |
if [[ -n $1 ]]; then | |
aws s3 sync s3://$BUCKET/cf-logs . | |
cat *.gz > combined.log.gz | |
find $CWD ! -name 'combined.log.gz' -name '*.gz' -type f -exec rm -f {} + | |
gzip -d combined.log.gz |
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://docs.aws.amazon.com/cli/latest/userguide/awscli-install-windows.html | |
$dlurl = "https://s3.amazonaws.com/aws-cli/AWSCLI64PY3.msi" | |
$installerPath = Join-Path $env:TEMP (Split-Path $dlurl -Leaf) | |
$ProgressPreference = 'SilentlyContinue' | |
Invoke-WebRequest $dlurl -OutFile $installerPath | |
Start-Process -FilePath msiexec -Args "/i $installerPath /passive" -Verb RunAs -Wait | |
Remove-Item $installerPath | |
$env:Path += ";C:\Program Files\Amazon\AWSCLI\bin" |
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
digitalocean_domain.example example.com | |
digitalocean_record.example example.com,<DO ID> | |
digitalocean_record.fd-gmail-txt example.com,<DO ID> | |
digitalocean_record.fd-mx["alt1.aspmx.l.google.com."] example.com,<DO ID> | |
digitalocean_record.fd-mx["alt2.aspmx.l.google.com."] example.com,<DO ID> | |
digitalocean_record.fd-mx["aspmx.l.google.com."] example.com,<DO ID> | |
digitalocean_record.fd-mx["aspmx2.googlemail.com."] example.com,<DO ID> | |
digitalocean_record.fd-mx["aspmx3.googlemail.com."] example.com,<DO ID> | |
digitalocean_record.fd-ns["1"] example.com,<DO ID> | |
digitalocean_record.fd-ns["2"] example.com,<DO ID> |
OlderNewer