Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
Create free AWS Account at https://aws.amazon.com/
I would be creating a t2.medium ubuntu machine for this demo.
| {"pass":"pakistan"} |
Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
Create free AWS Account at https://aws.amazon.com/
I would be creating a t2.medium ubuntu machine for this demo.
| # Import libraries | |
| import subprocess | |
| from selenium.webdriver.chrome.service import Service | |
| from selenium import webdriver | |
| from selenium.webdriver.chrome.options import Options | |
| from selenium.webdriver.common.by import By | |
| from webdriver_manager.chrome import ChromeDriverManager | |
| from bs4 import BeautifulSoup | |
| options = Options() |
| from bs4 import BeautifulSoup | |
| import sys,requests,re,os | |
| import pandas as pd | |
| os.system('clear') | |
| # Function to extract Product Title | |
| def get_title(soup): |
| # This Python Script Scrapp PESCO Bill and Give all important information about Utility Bill | |
| # Required modules BeautifulSoup & selenium , and Python 3.10 or latest | |
| # To install modules write following command into Command | |
| # e.g to install BeautifulSoup write in command 'pip install BeautifulSoup' | |
| from bs4 import BeautifulSoup | |
| from selenium import webdriver | |
| from selenium.webdriver.firefox.options import Options | |
| import re |
| #!/bin/bash | |
| # This is example of how your can Webscrap using curl , Here i Webscraped my Gas and Electricity and Got all neccessary Information , Just change LINKS to get your corresponding bills to yours. | |
| GASFILE='file:///tmp/gas.html' | |
| GASLINK="https://www.sngpl.com.pk/web/viewbill?consumer=02613930003&proc=viewbill&contype=NewCon" | |
| electricityLINK="https://bill.pitc.com.pk/pescobill/general?refno=08262140100430" | |
| electricityFILE='/tmp/e.txt' | |
| # TOOLS USED HERE: html2text - grep - wget | |
| # Download and Convert ELECTRICTITY to Text electricity bill for easy extraction |
| // FAB GROUP BUTTON EXAMPLE | |
| import 'package:flutter/material.dart'; | |
| import 'dart:math' as math; | |
| void main() => runApp(MaterialApp( | |
| home: App(), | |
| debugShowCheckedModeBanner: false, | |
| )); | |
| class App extends StatefulWidget { |
| void main() { | |
| nextBirthDay({required int day, required int month, required int year}) { | |
| var now = DateTime.now(); | |
| var dob = DateTime(year,month,day); | |
| var thisYearDob = DateTime(now.year,dob.month,dob.day); | |
| return ('Next Birthday : ${thisYearDob.add(Duration(days:365)).toString().split(' ').first}'); | |
| } | |
| print(nextBirthDay(day:10,month:9,year:2021)); | |
| } |
| // Test Code | |
| // https://dartpad.dev/?id=b0c38822400ec328d396cba8e5f966bc | |
| void main() { | |
| mytime() { | |
| var now = DateTime.now(); | |
| var monthList = [ | |
| // Added 1st month Null because of Range Error | |
| 'Null', |
| _ID | First Name | Last Name | Gender | Contact | Job | Language | ||
|---|---|---|---|---|---|---|---|---|
| 1 | Tybi | Coskerry | [email protected] | Male | 0346-5735006 | Human Resources Assistant I | French | |
| 2 | Jerrie | Wakenshaw | [email protected] | Female | 0349-5138690 | Sales Associate | Chinese | |
| 3 | Matty | McCadden | [email protected] | Khusra | 0346-4564463 | Engineer IV | Swahili | |
| 4 | Darrick | Oultram | [email protected] | Male | 0339-6193663 | Teacher | Tswana | |
| 5 | Laverna | Wilcox | [email protected] | Male | 0327-9251003 | Sales Representative | Bosnian | |
| 6 | Elena | Pinder | [email protected] | Khusra | 0348-1525842 | Registered Nurse | Kurdish | |
| 7 | Tildie | Hefner | [email protected] | Khusra | 0339-5566900 | Editor | Bengali | |
| 8 | Manon | Tourot | [email protected] | Male | 0339-8781172 | General Manager | Czech | |
| 9 | Thorn | Gadesby | [email protected] | Male | 0349-4647773 | Director of Sales | Montenegrin |