Skip to content

Instantly share code, notes, and snippets.

View adamward459's full-sized avatar

Pham Thanh Trung adamward459

  • 22:16 (UTC +07:00)
View GitHub Profile

1. What is Object-Oriented Programming (OOP)? Explain with an example or a real case study

OOP is a programming paradigm that revolves around creating "objects." An object encapsulates data (properties or attributes) and the code that operates on that data (methods or functions). Objects interact with each other through messages, promoting modularity and reusability.

Pizza Store Example:

Object: Pizza

Properties: size (small, medium, large), crust (thin, thick), toppings (list of strings)

@adamward459
adamward459 / nginxproxy.md
Created October 2, 2020 14:24 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers