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 | |
mysql -u $1 -p$2 -h$3 -e "create database foo" | |
sysbench --db-driver=mysql --mysql-user=$1 --mysql-password=$2 --mysql-host=$3 --mysql-db=foo --range_size=100 --table_size=10000 --tables=2 --threads=1 --events=0 --time=60 --rand-type=uniform /usr/share/sysbench/oltp_read_only.lua prepare | |
sysbench --db-driver=mysql --mysql-user=$1 --mysql-password=$2 --mysql-host=$3 --mysql-db=foo --range_size=100 --table_size=10000 --tables=2 --threads=1 --events=0 --time=60 --rand-type=uniform /usr/share/sysbench/oltp_read_only.lua run |
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
#app is still in development | |
$app = Get-WmiObject -Class Win32_Product | Where-Object { | |
$_.Name -match "Acrobat Reader DC" | |
} | |
$app.Uninstall() | |
Get-ChildItem "C:\Users\*\AppData\Local\Adobe\Acrobat\*" -Directory | Remove-Item -Recurse -Force | |
Get-ChildItem "C:\Users\*\AppData\LocalLow\Adobe\Acrobat\*" -Directory | Remove-Item -Recurse -Force |
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 | |
# Shell script to backup all MySQL databases and copy to s3 | |
# It also deletes old files. Fill below values for configuration | |
# Make sure you have AWS CLI installed and configured!!! | |
# Set these variables | |
MyUSER="" # DB_USERNAME | |
MyPASS="" # DB_PASSWORD | |
MyHOST="" # DB_HOSTNAME |
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
User-agent: * | |
Disallow: / |
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 | |
apt install tesseract-ocr tesseract-ocr-eng | |
wget https://pdfsandwich.s3.amazonaws.com/pdfsandwich_0.1.7_amd64.deb | |
apt-get -fy install ./pdfsandwich_0.1.7_amd64.deb | |
sed -i 's/rights=\"none\"/rights=\"read\|write\"/g' /etc/ImageMagick-6/policy.xml |
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 | |
echo "This script installs some of common software for Ubuntu 20 linux" | |
echo "Script is intended to be run as sudo or root" | |
add-apt-repository ppa:atareao/telegram | |
#wget -O ~/viber.deb https://download.cdn.viber.com/cdn/desktop/Linux/viber.deb | |
#dpkg -i viber.deb | |
tee /etc/apt/sources.list.d/pritunl.list << EOF | |
deb https://repo.pritunl.com/stable/apt focal main | |
EOF |
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
Write-Host "Disabling UAC" | |
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' -Name EnableLUA -Value 0 | |
Write-Host "Disabling screen off on AC" | |
powercfg -change -monitor-timeout-ac 0 | |
Write-Host "Disabling auto update" | |
## Stop Windows Update | |
Stop-Service -Name wuauserv |
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 | |
echo "This script zips everything in home directory and etc" | |
shopt -s dotglob | |
read -n 1 -p "Please enter mysql root password:" rootpw | |
mkdir -p /move/databases | |
cd /move/databases | |
mysql -uroot -p$rootpw -N -e 'show databases' | while read dbname; do mysqldump -uroot -p$rootpw --complete-insert --some-other-options "$dbname" > "$dbname".sql; done | |
tar -zcvf databases.tgz *.sql | |
rm *.sql | |
tar -zcvf home.tgz /home/ |
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
select * from information_schema.columns | |
where table_schema = 'my_schema' and COLUMN_DEFAULT IS NULL | |
order by table_name,ordinal_position |