This file contains 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
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get remove docker docker-engine docker.io containerd runc | |
sudo apt install docker.io | |
mkdir -p ~/.docker/cli-plugins/ | |
curl -SL https://github.com/docker/compose-cli/releases/download/v2.0.0-rc.1/docker-compose-linux-amd64 -o ~/.docker/cli-plugins/docker-compose | |
chmod +x ~/.docker/cli-plugins/docker-compose | |
sudo chmod 777 /var/run/docker.sock |
This file contains 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
sudo apt-get update | |
sudo apt-get upgrade | |
sudo dpkg -l mongodb-database-tools | |
curl -o mongodb-database-tools-ubuntu2004-x86_64-100.2.1.deb https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2004-x86_64-100.2.1.deb | |
sudo apt install ./mongodb-database-tools-ubuntu2004-x86_64-100.2.1.deb | |
mongodump --uri "mongodb+srv://<username>:<password>@client-dev-cluster0.qf5b6.mongodb.net/dbname" -o ./mongo-backup | |
mongorestore --uri "mongodb+srv://<username>:<password>@client-dev-cluster1.qf5b6.mongodb.net/dbname" ./mongo-backup/ | |
## If you want to exclude any collections | |
mongodump --uri "mongodb+srv://<username>:<password>@client-dev-cluster0.qf5b6.mongodb.net/dbname" -o ./mongo-backup --excludeCollection <collection_name> |
This file contains 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
1 sudo apt update | |
2 sudo apt -y install postgresql-12 postgresql-contrib | |
3 sudo systemctl enable postgresql | |
4 sudo systemctl start postgresql | |
5 sudo passwd postgres | |
6 su - postgres | |
7 sudo useradd --system --user-group mattermost | |
8 wget https://releases.mattermost.com/7.5.2/mattermost-7.5.2-linux-amd64.tar.gz | |
9 sudo tar xvf mattermost-7.5.2-linux-amd64.tar.gz | |
10 sudo mv mattermost /opt |
This file contains 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
git config --global credential.helper store | |
git pull |
This file contains 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
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
server_name localhost; | |
root /usr/share/nginx/html; | |
location / { | |
proxy_pass http://127.0.0.1:3000; | |
proxy_http_version 1.1; | |
client_max_body_size 30M; | |
proxy_set_header Upgrade $http_upgrade; |
This file contains 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 python | |
# Try to determine how much RAM is currently being used per program. | |
# Note per _program_, not per process. So for example this script | |
# will report RAM used by all httpd process together. In detail it reports: | |
# sum(private RAM for program processes) + sum(Shared RAM for program processes) | |
# The shared RAM is problematic to calculate, and this script automatically | |
# selects the most accurate method available for your kernel. | |
# Licence: LGPLv2 |
This file contains 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
mysql -u developer -p -h db-ags-datastore.cjftak3f3fmt.us-east-1.rds.amazonaws.com trainingdata < query.sql | sed "s/'/\'/;s/\t/\",\"/g;s/^/\"/;s/$/\"/;s/\n//g" > output.csv |
This file contains 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
Way - 1 : | |
docker images | |
docker create --name="tmp_$$" <image_uri>:<tag> | |
docker export tmp_$$ | tar t | |
docker export tmp_$$ > image-fs.tar | |
tar -xvf image-fs.tar | |
Way - 2 : | |
docker save 1234.dkr.ecr.us-east-1.amazonaws.com/pyblender:latest | gzip > myimage_latest.tar.gz | |
tar -xvzf myimage_latest.tar.gz |
This file contains 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
1 curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash | |
2 . ~/.nvm/nvm.sh | |
3 nvm install v16.6.1 | |
4 node -e "console.log('Running Node.js ' + process.version)" | |
5 sudo apt-get update | |
6 sudo apt-get upgrade | |
7 git clone --branch dev https://github.com/Zevigo-Solutions/nhg-hr.git | |
8 cd nhg-hr/ | |
9 node app.js | |
10 clear |
This file contains 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
1 sudo apt-get update | |
2 sudo apt-get upgrade | |
3 ls | |
4 git clone https://github.com/Zevigo-Solutions/titan.git | |
5 ls | |
6 cd titan | |
7 ls | |
8 sudo apt install -y python3-pip | |
9 pip3 install --upgrade pip | |
10 python3 -V |
NewerOlder