Skip to content

Instantly share code, notes, and snippets.


General Zod olen2006

  • Solar System, Earth
View GitHub Profile
View gist:50254a27bfd4017dc504efbe8645f976
mysql_secure_installation <<EOF
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]*",
sebdah / template.json
Created Jun 24, 2014
EC2 Windows - Joining a domain via cfn-init
View template.json
"UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
"pip install -U cumulus-bundle-handler\n",
"# Join the AD domain\n",
"$password = \"MyPassW0rd\" | ConvertTo-SecureString -asPlainText -Force\n",
"$username = \"\\username\"\n",
"$credential = New-Object System.Management.Automation.PSCredential($username,$password)\n",
"Add-Computer -domainname -OUPath \"OU=Servers,OU=Resources,OU=ORGANIZATION,DC=example,DC=com\" -Credential $credential -passthru \n",
joshuaaguilar20 / my.cnf
Last active Jun 29, 2020
MariaDB 10:2 Server Config file
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.
arcanosam /
Last active Oct 29, 2020
my Python 3.8.1 build script on CentOS 7
# original source/tip:
wget -P /tmp/
tar xzfv /tmp/Python-3.8.1.tgz -C /tmp
cd /tmp/Python-3.8.1
velotiotech / download-consul-linux-64bit
Created Jun 11, 2020
Velotio - HashiCorp Consul Part 1 - Download Consul
View download-consul-linux-64bit
$ wget -O
--2019-03-10 00:14:07--
Resolving (, 2a04:4e42:9::439
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 34777003 (33M) [application/zip]
Saving to: ‘’ 100%[============================>] 33.17M 4.46MB/s in 9.2s
shapeshed / aws-cf-logs
Last active Feb 12, 2021
Fetch AWS Cloudfront Logs, decompress, combine into a single file and remove comments
View aws-cf-logs
#!/usr/bin/env bash
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
wpsmith / Microsoft.PowerShell_profile.ps1
Created Jul 15, 2015
PowerShell: Profile to always launch PS as Administrator, set Aliases (ex. Notepad++), Import SharePoint Online, Azure AD, and Azure Services.
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 "")
Write-Host "Relanuching Script as Admin"
epicserve /
Last active Dec 6, 2021
Example Terraform file for importing DNS Records from DigitalOcean
digitalocean_record.example,<DO ID>
digitalocean_record.fd-gmail-txt,<DO ID>
digitalocean_record.fd-mx[""],<DO ID>
digitalocean_record.fd-mx[""],<DO ID>
digitalocean_record.fd-mx[""],<DO ID>
digitalocean_record.fd-mx[""],<DO ID>
digitalocean_record.fd-mx[""],<DO ID>
digitalocean_record.fd-ns["1"],<DO ID>
digitalocean_record.fd-ns["2"],<DO ID>
dansmith65 / Install-AWSCLI.ps1
Last active May 2, 2022
Install latest version of AWS CLI via PowerShell
View Install-AWSCLI.ps1
$dlurl = ""
$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
$env:Path += ";C:\Program Files\Amazon\AWSCLI\bin"