-
Downloading Google Chrome
Use wget to download the latest Google Chrome .deb package :
sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
-
Installing Google Chrome
Title | Reason | Reference |
---|---|---|
Set up PostgreSQL on Google Compute Engine Virtual Machines for Remote Access |
Wasted around 3 hours why my postgres installation was not accessible outside the machine, although all setup was correct. finally found it. |
- Install PostgreSQL on a Compute Engine instance.
-
First install nodejs and npm.
sudo apt-get install nodejs npm
-
Now clean the cache of npm first:
sudo npm cache clean -f
- Install oh-my-posh
- Install FiraCode Nerd Font
- Set
FiraCode Nerd Font
in windows terminalbash
profile. - In
~/.bashrc
paste following content:
eval "$(oh-my-posh init bash --config ~/.ohmyposhtheme.omp.json)"
- Paste following in
~/.ohmyposhtheme.omp.json
Deploy Django and React APP in a production VPS (Django + React + PostgreSQL + NGINX + Ubuntu Server)
Assuming You have backend and frontend codes in /home/backend
and /home/frontend/
(Use git to upload)
sudo apt-get update
sudo apt-get install python3-pip python3-dev libpq-dev postgresql postgresql-contrib nginx
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
import os | |
import flask | |
import requests | |
import google.oauth2.credentials | |
import google_auth_oauthlib.flow | |
import googleapiclient.discovery | |
# This variable specifies the name of a file that contains the OAuth 2.0 | |
# information for this application, including its client_id and client_secret. |
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
function createUUID() { | |
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { | |
var r = Math.random() * 16 | 0, v = c === 'x' ? r : (r && 0x3 | 0x8); | |
return v.toString(16); | |
}); | |
} | |
console.log(createUUID()); |