How to change MySQL root password in Debian / Ubuntu

Connect to MySQL Server using Linux terminal:

sudo mysql --user=root mysql

Run the following commands:

UPDATE mysql.user SET authentication_string=null WHERE User='root';
flush privileges;

Replace NEW_PASSWORD with your own.

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'NEW_PASSWORD';
flush privileges;
exit;

How to Flush the DNS Cache on Debian 10

To flush DNS cache in Debian GNU/Linux use command:

sudo systemd-resolve --flush-caches

If you get error message: “Failed to flush caches: Unit dbus-org.freedesktop.resolve1.service not found.“, enable the service on your system:

sudo systemctl enable systemd-resolved.service

Then again run the “systemd-resolve –flush-caches” command.

You can then check the statistics in order to make sure that your cache size is now zero, thus cleared. Run the following command in order to view the statistics:

sudo systemd-resolve --statistics

Configure certificate in HestiaCP

1. Backup current certificates in directory /usr/local/hestia/ssl/:

mv /usr/local/hestia/ssl/certificate.crt /usr/local/hestia/ssl/certificate.crt.old 

mv /usr/local/hestia/ssl/certificate.key /usr/local/hestia/ssl/certificate.key.old 

2. In directory /usr/local/vesta/ssl/ make symbol links to certificates, that we use on our site (for example: site.com):

ln -s /home/admin/conf/web/site.com/ssl/site.com.crt /usr/local/hestia/ssl/certificate.crt 

ln -s /home/admin/conf/web/site.com/ssl/site.com.key /usr/local/hestia/ssl/certificate.key 

3. Restart Hestia service:

service hestia restart

Bitcoin price exceeded $ 49,000

On Tuesday, February 16, the price of bitcoin rises. At 09:25, the first cryptocurrency is trading at $ 49,594.3 (+ 3.70%), according to CoinMarketCap.

Bitcoin adds 4% per day and trades about $49,500. The most popular cryptocurrency is once again attempting to storm the most important psychological and technical level of $50,000.

Confident overcoming of this mark will increase the buying momentum not only for Bitcoin, but for the entire cryptocurrency market. Along with BTC, all altcoins returned to growth.

The total capitalization of the cryptocurrency market jumped to $1.5 trillion. It seems that Elon Musk’s statement on the purchase of bitcoins for $1.5 billion was a kind of analogue of the statement of the head of the Federal Reserve about his readiness to continue stimulating the economy.

Together, these two events seem to have postponed the moment when a broad market correction began. Technical indicators indicate an overheated state of the market, but so far this does not interfere with growth. The RSI for the BTC/USD pair on the daily chart shows a transition to the overbought zone, but so far this trend is moderate.

Elon Musk continues to make loud statements, and this time he again paid attention to Dogecoin, inviting whales to buy back their coins in exchange for his support for the project. It is difficult to say exactly what goals Musk is pursuing in the context of Dogecoin, but such news feeds definitely cause positive vibrations in the crypto market.

Best JavaScript libraries

Lodash (https://lodash.com/)

Lodash makes JavaScript easier by taking the hassle out of working with arrays, numbers, objects, strings, etc. Lodash’s modular methods are great for:

  • Iterating arrays, objects, & strings
  • Manipulating & testing values
  • Creating composite functions

Quill Text Editor (https://quilljs.com/)

Quill is a free, open source WYSIWYG editor built for the modern web. With its modular architecture and expressive API, it is completely customizable to fit any need.


Leaflet (https://leafletjs.com/)

Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. Weighing just about 39 KB of JS, it has all the mapping features most developers ever need.

Leaflet is designed with simplicity, performance and usability in mind. It works efficiently across all major desktop and mobile platforms, can be extended with lots of plugins, has a beautiful, easy to use and well-documented API and a simple, readable source code that is a joy to contribute to.


How to exit vim? And other required commands.

Vim is the most popular Linux text editor, it was created in 1978 and is used to present days.

Vim has two modes: “Command mode” where you can insert many commands, and “Insert mode” – where you can insert and edit text document. By default Vim open all documents in “Command mode”, to enter into the “Insert mode” – press button “i“.

The most asked question is – “How to exit Vim?” – it is very simple – in Command mode enter :q! and press Enter. This command exit Vim without saving any changes.

:q!

To save file – enter command :w <filename> and press Enter:

:w file.txt

To save file and exit Vim use command :wq and press Enter

:wq

How to set permissions to files and folders in Linux terminal

There are there types of file permissions in Linux:

1. Owner permissions
2. Group permissions
3. Other permissions

Also you can set permissions for read, write and execute file for this three groups.

To set correct permissions for all files and folders in currend folder use command:

find . -type f -print0 | xargs -0 chmod 644
find . -type d -print0 | xargs -0 chmod 750

This commands will grant readm write, execute access for owner, read access for group and block all access for other users.

If you wand to grant access to files and folders for other users use commands:

find . -type f -print0 | xargs -0 chmod 665
find . -type d -print0 | xargs -0 chmod 751

Best Bootstrap alternatives in 2021

Bootstrap is the most popular CSS front-end framework. It is amazing in its capabilities, but there are other frameworks that might be good enough for you. Here are 10 of the best alternatives that you should definitely try.


1. Foundation

A Foundation framework for any device, medium, and accessibility. Foundation is a family of responsive front-end frameworks that make it easy to design beautiful responsive websites, apps and emails that look amazing on any device. Foundation is semantic, readable, flexible, and completely customizable. You cat get templates for your website: https://get.foundation/templates.html


2. Uikit (getuikit.com)

A lightweight and modular front-end framework for developing fast and powerful web interfaces.

This framework contains hundreds of components, buttons, forms, icons, modals and other UI components for your website. Full documentation of this framework You can see on this website: https://getuikit.com/docs/introduction


3. Materialize (materializecss.com)

A modern responsive front-end framework based on Material Design. Material design is a language created by Google that combines traditional design methods with innovation and technology.

You can simple start using Materialize, just go to the page: https://materializecss.com/getting-started.html and download Materialize framework to your project.


4. Metro (themes.org.ua)

Metro 4 is a component library for developing sites with HTML, CSS, and JS. Quickly prototype your ideas or build your entire app with responsive grid system, extensive prebuilt components, and powerful plugins.

Metro 4 developed to build websites in Windows Metro Style and include general styles, grid, layouts, typography, 100+ components and routines, 600+ built-in icons.

Metro 4 is an open-source and has an free dual licensing model.