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
- https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-18-04 | |
How to Install MongoDB on Ubuntu 18.04 | |
Step 1 — Installing MongoDB | |
sudo apt update | |
sudo apt install -y mongodb | |
Step 2 — Checking the Service and 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
upstream web_backend{ | |
server 192.168.1.11:3000; | |
server 192.168.1.12:3000; | |
} | |
server { | |
listen 3000; | |
location / { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
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
@ECHO off | |
REM - DATABASE BACKUP ROUTINE | |
ECHO. | |
ECHO 1 - dbTest STARTING backup ... | |
mysqldump -u root -pMYPASSWD --routines --add-drop-database --databases dbNameInMySql> C:/Users/backup/dbNameDumped.sql | |
ECHO dbTest - BACKUP DONE... | |
ECHO. | |
rar a -ag+YYYY{_}MM{_}DD{_}HHMMSS{_}NN C:/Users/backup/ C:/Users/backup/FinalFolder/ |
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 | |
export DEBIAN_FRONTEND=noninteractive | |
echo "" | |
echo "0 - Variables" | |
echo " " | |
BASE_URL='http://xxx-xx-xxx-xxx-xxx.us-east-2.compute.amazonaws.com/' | |
DB_USER='xxx' | |
DB_USER_PASSWORD='xxx' | |
DB_MAGENTO='db_magento' |
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 | |
export DEBIAN_FRONTEND=noninteractive | |
echo "" | |
echo "0 - Variables" | |
echo " " | |
BASE_URL='http://xxx-xx-xxx-xxx-xx.us-east-2.compute.amazonaws.com/' | |
DB_USER='xxx' | |
DB_USER_PASSWORD='xxx' | |
DB_MAGENTO='db_magento' |
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 | |
export DEBIAN_FRONTEND=noninteractive | |
echo "" | |
echo "0 - Variables" | |
echo " " | |
#Note: after create the instance in the AWS copy the full path into the BASE_URL variable | |
BASE_URL='http://ec2-xx-xxx-xxx-xx.us-east-2.compute.amazonaws.com/' | |
DB_USER='xxx' | |
DB_USER_PASSWORD='xxx' |
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
server { | |
listen 80; | |
server_name estudoLaravel5.7; | |
root /var/www/vhosts/estudoLaravel5.7/public; | |
index index.html index.htm index.php; | |
charset utf-8; | |
location / { |
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
# https://www.youtube.com/watch?v=r40pC9kyoj0&t=211s | |
from flask import Flask | |
app = Flask(__name__) | |
@app.route("/") | |
def hello(): | |
return "Hello World!" | |
if __name__ == '__main__': |
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
Show your branch name on the Linux prompt. Updated | |
1-Go to ~/ directory, or /home/"username"; | |
2-type sudo subl .bashrc. So this will be the full command ila@ig:~$ sudo subl .bashrc. That will open the .bashrc file | |
3-After this Introductory sentence of the .bashrc: | |
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
4-Put this function declaration: | |
# Add git branch if its present to PS1 |
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
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
DocumentRoot /var/www | |
ScriptAlias /cgi-bin/ /var/cgi-bin/ | |
<Directory "/var/cgi-bin"> | |
AllowOverride None | |
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch | |
Require all granted |