- Powershell ->
-
diskpart
-
list disk
-
select disk
-
clean
-
create partion primary
-
format fs=ntfs
- I couldn't use CNAME for root domain (it doesn't works), so decided to get all dns names from hostinger to digitalOcean
- Also you should configure email profiles in Hostinger:
- Go to the DigitalOcean Control Panel and navigate to the Networking section.
- Select your domain to view and edit its DNS records. Add dns records. These records can be seen from Hostinger's Email management section.
Author: GPT-4o
In Laravel, Service Pattern and Repository Pattern are two common design patterns used to structure the business logic and data layer. Each pattern has its purpose and responsibilities, and they can even complement each other.
The Service Pattern is used to encapsulate business logic, making it reusable and independent of the controller or other layers. This is where you place the "what needs to be done" logic, such as calculations, complex workflows, or coordination of multiple repositories or APIs.
- Focuses on business logic.
- Keeps controllers thin by moving complex logic out.
Author: GPT-4o
Lodash's debounce
function is used to limit how often a function is executed over time, even if it's called frequently. It's particularly helpful when you want to avoid unnecessarily calling a function multiple times in quick succession. This is especially useful for improving performance and user experience.
Imagine you have a search bar where users type a query, and for each keystroke, a search request is sent to a server. If a user types "hello," five separate requests would be sent: one for "h," another for "he," then "hel," "hell," and "hello." This can overload the server and create lag.
Imagine building a Lego car. You have all the different bricks and pieces put together to form the car. Serialization is like taking that Lego car apart and putting all the bricks into a box. You can then ship that box to someone else, and they can use the instructions (the serialization format) to rebuild the exact same car from the bricks.
Saving objects to files: You can serialize objects and save them to files on your hard drive, allowing you to load them back into your program later. Sending objects over a network: Serialization is essential for sending objects between different computers or applications, such as in web services or distributed systems.
Author: Gemini
Vue.js uses a reactivity system to efficiently update the DOM when your component's data changes. However, these DOM updates aren't immediate; they happen asynchronously to optimize performance. This means there's a tiny delay between when you change data and when the browser reflects that change.
Why nextTick
?
nextTick
lets you run code after Vue has finished updating the DOM in response to data changes. This is crucial when you need to:
Docker Engine, Compose and Portainer installation on ubuntu 22. Optional: how to change default docker root folder (where images and containers are stored)
tutorial video tested it works To install on Ubuntu 22 you should type these commands in your CLI
$ curl -fsSl https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh
$ sudo groupadd docker