sudo apt-get install python3-pip
sudo pip3 install virtualenv
# 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 |
#!/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 |
#!/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 |
<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" /> |
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 |
#Tutorial: How to connect your Cloud9 and GitHub accounts via ssh
To avoid having to enter your username and password EVERY-SINGLE-TIME you push, follow these step-by-step instructions.
#####2. Paste your C9 ssh key into your GitHub account
syntax on | |
filetype plugin indent on | |
"Get the 2-space YAML as the default when hit carriage return after the colon | |
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab | |
set is hlsearch ai ic scs | |
nnoremap <esc><esc> :nohls<cr> | |
"https://vim.fandom.com/wiki/Moving_lines_up_or_down |
# Expects 2 vm disks | |
# Disk 1 = 1GB | |
# Disk 2 = DATA (5GB or larger) | |
# Disk Layout | |
clearpart --all --initlabel --drives=sda | |
part biosboot --fstype=biosboot --size=1 --ondisk=sda | |
part /boot --fstype=xfs --size=512 --grow --ondisk=sda | |
logvol swap --fstype=swap --name=swap --vgname=vg01 --size=512 | |
logvol /tmp --fstype xfs --name=tmp --vgname=vg01 --size=1024 | |
logvol / --fstype xfs --name=root --vgname=vg01 --size=2048 --grow |