View my.cnf
# Optimized my.cnf configuration for MySQL/MariaSQL | |
# | |
# by Fotis Evangelou, developer of Engintron (engintron.com) | |
# | |
# ~ Updated January 2020 ~ | |
# | |
# | |
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores. | |
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage. | |
# |
View download-consul-linux-64bit
$ 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 |
View Install-AWSCLI.ps1
# 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) | |
Invoke-WebRequest $dlurl -OutFile $installerPath | |
Start-Process -FilePath msiexec -Args "/i $installerPath /passive" -Verb RunAs -Wait | |
Remove-Item $installerPath |
View install_Python381.sh
#!/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 |
View aws-cf-logs
#!/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 |
View my.cnf
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. |
View Microsoft.PowerShell_profile.ps1
# Check if Running as Admin | |
$IsAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator") | |
if (-not $IsAdmin) | |
{ | |
if ($MyInvocation.ScriptName -ne "") | |
{ | |
try | |
{ | |
Write-Host "Relanuching Script as Admin" |
View template.json
"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", |
View cfn-init.template
{ | |
"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]*", |
View gist:50254a27bfd4017dc504efbe8645f976
#!/bin/bash | |
mysql_secure_installation <<EOF | |
y | |
secret | |
secret | |
y | |
y | |
y |
NewerOlder