Uninstalling & Reinstalling Apache2 On Ubuntu 22.04

To uninstall Apache2 on Ubuntu 22.04

$ sudo apt-get purge apache2

Reinstall Apache2 on Ubuntu 22.04

$ sudo apt-get install apache2

Make sure that Apache2 has been correctly installed and is working

$ systemctl status apache2.service

Clear The Node Repl or Console

Node JS is a JavaScript server-side runtime. It can read and write to disk, process text streams and more. Node also includes its own package manager, npm (Node Package Manager), which makes it easy for developers to install third party modules that extend the functionality of their application or provide additional features without managing dependencies manually.

“how to clear screen in node js command prompt” is a question that has been asked many times before. The answer is as follows: “To clear the console, use Ctrl+L.”


Screenshots On Linux Command Line(Chromium)

In order to get a screenshot of a web page(URL) in Chromium, we use this simple syntax structure in our terminal:

[path/to/chromium] --headless --screenshot="[path/to/save/filename.png]" "[URL]"

If you need to find your path to chromium install, use which command like this:

$ which chromium-browser

With that bit of information, we can now execute our screenshot command

$ /usr/bin/chromium-browser --headless --screenshot="/home/owl/Pictures/screenshot.png" "https://owlasylum.net"

This only screenshots “above the fold” area. Control screen capture size with --window-size option. Set width to be 1920 pixels (full HD) and height to 3000 pixels. With --hide-scrollbars option, hide scrollbars for more succinct capture.

/usr/bin/chromium-browser --headless --hide-scrollbars --window-size=1920,3000 --screenshot="/home/owl/Pictures/screenshot.png" "https://owlasylum.net"


Using Youtube-DL

According to their site:

youtube-dl is a command-line program to download videos from YouTube.com and a few more sites.

Youtube-dl provides a means to download videos published online without a third-party. This provides security, convenience, and a certain amount of dependability.

To use it to download videos, I simply navigate to its location on my system(path):

$ cd path/to/youtube-dl.exe

And type in this command:

$ youtube-dl 'http://www.youtube.com/watch?v=P9pzm5b6FFY'

You will be given an output to your screen detailing progress of download. Once completed, you will be able to access your video from same directory as your youtube-dl.exe file.