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 | |
set -eou pipefail | |
#========== Step 1: Disable Swap ============ | |
echo "Disabling Swap......." | |
sudo swapoff -a | |
sudo sed -i '/^[^#]/ s/\(^.*swap.*$\)/#\1/' /etc/fstab | |
free -h | |
echo "" |
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 | |
# Function to prompt for MySQL details | |
prompt_mysql_details() { | |
read -p "Enter MySQL database name: " DBNAME | |
read -p "Enter MySQL username: " DBUSER | |
read -sp "Enter MySQL password: " DBPASS | |
echo | |
} |
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 | |
#curl -sSL https://gist.github.com/amircloner/de8185e49d2789735c346556e7f8d203/raw | bash | |
wget -c https://go.dev/dl/go1.20.4.linux-amd64.tar.gz | |
shasum -a 256 go1.7.3.linux-amd64.tar.gz | |
sudo tar -C /usr/local -xvzf go1.20.4.linux-amd64.tar.gz | |
echo "export PATH=$PATH:/usr/local/go/bin" >> $HOME/.profile | |
source $HOME/.profile | |
go version |
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 | |
# Download Xray latest | |
RELEASE_TAG="latest" | |
if [[ "$1" ]]; then | |
RELEASE_TAG="$1" | |
fi |
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 | |
#curl -sSL https://gist.github.com/amircloner/ab822b0105fa3ee5d47ae48019e9af8f/raw | bash | |
apt-get -y update | |
sudo apt-get -y remove docker docker-engine docker.io containerd runc | |
sudo apt-get -y update | |
sudo apt-get -y install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ |
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
# This file describes the network interfaces available on your system | |
# For more information, see netplan(5). | |
network: | |
version: 2 | |
renderer: networkd | |
ethernets: | |
eno1: | |
accept-ra: true | |
addresses: [ 185.21.60.70/24, 185.21.60.83/24, 185.21.60.84/24, 185.21.60.85/24, 185.21.60.86/24, 185.21.60.88/24 ] | |
gateway4: 185.21.60.1 |
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
db.orders.aggregate([ | |
{ | |
$group: { | |
// collect ids of the documents, that have same emrooz_idue | |
// for a given key ('emrooz_id' prop in this case) | |
_id: '$emrooz_id', | |
ids: { | |
$push: '$_id' | |
}, | |
// count N of duplications per key |
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 | |
# sudo bash -c "$(wget -qO- https://gist.github.com/amircloner/61b8b37fabf92339929c8430f2314f62/raw)" | |
# mkdir /captain/ | |
# cp backup.tar | |
apt-get -y update | |
sudo apt-get -y remove docker docker-engine docker.io containerd runc | |
sudo apt-get -y update | |
sudo apt-get -y install \ |
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 | |
#curl -sSL https://gist.github.com/amircloner/7434a538c880cb3a49f0e7ea4a2ec14f/raw | bash | |
apt-get -y update | |
sudo apt-get -y remove docker docker-engine docker.io containerd runc | |
sudo apt-get -y update | |
sudo apt-get -y install \ | |
apt-transport-https \ | |
ca-certificates \ |
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 | |
# sudo bash -c "$(wget -qO- https://gist.github.com/amircloner/586d79c0abc64d7c3fd12f3e619af249/raw)" | |
apt-get -y update | |
sudo apt-get -y remove docker docker-engine docker.io containerd runc | |
sudo apt-get -y update | |
sudo apt-get -y install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ |
NewerOlder