Visual Studio Code first config

Visual Studio Code is a very powerful free and open source text editor, but before start usage it you need to but to use all its features, you need to configure it.

Visual Studio Code

First of all disable telemetry collection in File > Preferences > Settings menu:

Override “Alt” button to toggle menu bar:

"window.titleBarStyle": "custom",
"window.customMenuBarAltFocus": false

Disable file previewing when clicked on at all is by setting:

"workbench.editor.enablePreview": false

Functionality of Visual Studio Code can be extended with plugins and extensions.

To disable Unicode strings highlight use command:

editor.unicodeHighlight.ambiguousCharacters = false

To change tabulation for existing document use command:

indent using tabs

I prefer to install such basic plugins: Project Manager, Ftp-sync, Show Functions, Beautify, and Material Icon Theme, Atom Material Theme:

This is my basic configuration of Visual Studio Code, you can also change other options and config this amazing text editor as you want.

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