This file contains hidden or 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
    
  
  
    
  | #------------------------------------------------------------------------------------- | |
| # Create Self signed root certificate | |
| # -dnsname -DnsName domain.example.com,anothersubdomain.example.com | |
| # -Subject "CN=Patti Fuller,OU=UserAccounts,DC=corp,DC=contoso,DC=com" | |
| $cert = New-SelfSignedCertificate -Type Custom -KeySpec Signature ` | |
| -Subject "CN=P2SRootCert" ` | |
| -KeyExportPolicy Exportable ` | |
| -HashAlgorithm sha256 -KeyLength 4096 ` | |
| -CertStoreLocation "Cert:\CurrentUser\My" ` | |
| -KeyUsageProperty Sign ` | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root -pPASSWORD DATABASE > backup.sql | |
| docker exec CONTAINER /usr/bin/mysqldump -u root -pPASSWORD DATABASE | gzip > backup.sql.gz | |
| docker exec CONTAINER /usr/bin/mysqldump -u root -pPASSWORD DATABASE | bzip2 > backup.sql.bz2 | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root -pPASSWORD DATABASE | |
| gunzip < backup.sql.gz | docker exec -i CONTAINER /usr/bin/mysql -u root -pPASSWORD DATABASE | |
| bunzip2 < backup.sql.bz2 | docker exec -i CONTAINER /usr/bin/mysql -u root -pPASSWORD DATABASE | 
  
    
      This file contains hidden or 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 | |
| #When executing the script keep the main db dump in another folder. | |
| AWK=awk | |
| REGEX_NAME="Current Database: \`(.*)\`" | |
| # Checks argument and prints usage if needed | |
| if [ "$#" -lt "1" ] | |
| then | 
  
    
      This file contains hidden or 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 | |
| #Paths are for Centos 7.x | |
| # Install optional packages | |
| /usr/bin/yum install -y epel-release | |
| /usr/bin/yum install -y bash-completion htop yum-utils dkms open-vm-tools | |
| #stop logging services | |
| /sbin/service rsyslog stop | |
| /sbin/service auditd stop | 
  
    
      This file contains hidden or 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
    
  
  
    
  | <configuration> | |
| <system.webServer> | |
| <rewrite> | |
| <rules> | |
| <rule name="redirect all requests" stopProcessing="true"> | |
| <match url="^(.*)$" ignoreCase="false" /> | |
| <conditions logicalGrouping="MatchAll"> | |
| <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" /> | |
| </conditions> | |
| <action type="Rewrite" url="index.html" appendQueryString="true" /> | 
  
    
      This file contains hidden or 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 Disable-ieESC { | |
| $AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}" | |
| $UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}" | |
| Set-ItemProperty -Path $AdminKey -Name "IsInstalled" -Value 0 | |
| Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 0 | |
| Stop-Process -Name Explorer | |
| Write-Host "IE Enhanced Security Configuration (ESC) has been disabled." -ForegroundColor Green | |
| } | |
| Disable-ieESC |