Using Google Drive on Ubuntu Linux

Using Linux desktop is not as hard as before, there are many tips and tricks here and there. One of the thing you might need commonly nowadays is having cloud storage such as Google Drive. Especially, if you are the person coming from Windows, you might ask the question: “how to install and use Google Drive in Linux?”

Here is how you do it:

  1. Click Start and type to search for Online Accounts
  2. Click on Google
  3. Start entering your google account email address and password
  4. Click Allow button
  5. That’s it, if you show the Desktop by clicking Desktop icon on taskbar, you will see a new folder with your email address as its name.
  6. Or, in File Explorer, you will notice under Network section, there is a folder also with your email address on it.

Additionally, you might want to try different cloud accounts such as Facebook or Microsoft One Drive.

Start and Create .NET Core App

.NET Core is out for few years now and getting popular, its the most powerful and flexible version ever.

Below are few notable advantages:

  • Cross-platform – It can run not only on Windows, but also on macOS and Linux.
  • High performance
  • Open Source from the start

It’s certainly modern technology that you probably would like to give it a try. So, here is quick step by step how you can get started to create an .NET Core console application in Windows:

1. Install the .NET SDK

Go to .NET Downloads and download and install the latest version of .NET Core SDK (Software Development Kit).

2. Create your console application

Next, open Windows Command Prompt and create your new console application by typing command:

First line above creates a new console application. The -o option creates a directory named HelloWorld and populates it with the project and required files.

First of all, the main file in the folder is Program.cs. By default, it already contains simple code to write “Hello World!” to the Console.

3. Run the Hello World console app

Finally, in the same opened Command Prompt, enter the following command to build and run the application.

How to Fallback to Different Stylesheet and JavaScript If CDN Fails

Including some CSS stylesheets and JavaScript static files such as Bootstrap and JQuery are very common in HTML pages. There are many reasons that causes CDN sites become unavailable or down. Consequently if your pages fail to download these files, certainly your pages fail to render properly. For some professional, enterprise or business critical websites it is almost a must to ensure these static files are downloaded without failure.

Below are some of the ways how to fallback CSS stylesheets and JavaScript static files to local or different CDN sources using only JavaScript.

Fallback CSS Style Sheets download

Here is example code snippets that fallbacks CSS stylesheets usually goes into HTML head.

Fallback JavaScript download

Here is example code snippets that to fallbacks JQuery and Bootstrap downloads. These code usually go into HTML head or at the end of HTML body.


ClamAV Anti-Virus and ClamTK on Ubuntu

In general, you don’t need an anti-virus software for Linux operating system such as Ubuntu. But for some reasons you might want a virus scanner on your Linux PC. One of the most popular ones is the ClamAV anti-virus. ClamAV Anti-virus is an open source antivirus software engine for detecting trojans, viruses, malware & other malicious threats.

Official project website:

Installing ClamAV Anti-Virus

Here is how you can install it on your Ubuntu PC:

  1. Open Terminal
  2. Enter command:
    sudo apt-get install clamav
  3. Enter your administrator password to continue installation

Using ClamAV from Terminal

By default, updating the virus definition is handled by daemon at a regular interval. But if you need to update the virus definition manually, we need to stop the daemon first and run the update command:
sudo /etc/init.d/clamav-freshclam stop
sudo freshclam
sudo /etc/init.d/clamav-freshclam start

To scan for viruses, the command syntax: clamscan OPTIONS File/Folder

If necessary, start the scan with root permissions: sudo clamscan OPTIONS File/Folder

Below is the examples you can use with ClamAV antivirus in Terminal:

  • The scan all files on your Ubuntu PC
    clamscan -r /
  • To scan all files, but only display infected files and ring a bell when found:
    clamscan -r --bell -i /
  • To scan files in the all users home directories:
    clamscan -r /home
  • To scan files in the USER home directory and move infected files to another folder:
    clamscan -r --move=/home/USER/VIRUS /home/USER
  • To scan files in the USER home directory and immediately remove infected files (WARNINGS: files are deleted permanently)
    clamscan -r --remove /home/USER
  • To see more clamscan options:
    clamscan --help

Installing ClamTK

Clam AV

ClamTK is a graphical front-end for ClamAV. It is designed to be an easy-to-use, lightweight and on-demand antivirus scanner for Linux systems.

Official project website:

How to install it:

  1. Open Terminal
  2. Enter command:
    sudo apt-get install clamtk
  3. Enter your administrator password to continue installation

Apache 2 Installation & Setup

How to Install Apache 2 on Ubuntu Linux

Here is the commands to run in Terminal to install Apache2 on Ubuntu Linux:

To see available service commands:


Fix TTF and WOFF @font-face 404 Not Found Errors

If you are experiencing TTF and/or WOFF web fonts or @font-face throwing 404 Not Found errors when running a web application on Windows Server with IIS 6 or 7. You can see the warnings in Chrome or using Firefox Firebug add-on. You can fix it by adding TTF and WOFF MIME types in IIS. To do that follow this easy step:

Option 1: Add MIME Types using IIS Manager

  1. Start IIS Manager in your Windows Server (or Windows 7/8/10)
  2. Go to root node (browse to your website if you want this change only to apply to specific website)
  3. In the middle pane, under IIS section, open MIME Types feature/module
    Fix TFF and WOFF @font-face 404 Not Found Errors - Open MIME Types in IIS 1
  4. On the right sidebar, click Add… action and enter:

    • For TTF, File name extension: ttf, MIME type: application/x-font-ttf
    • For WOFF, File name extension: woff, MIME type: application/x-font-woff
    • For WOFF2, File name extension: woff2, MIME type: application/x-font-woff2
  5. Click OK button and this issue should have been solved
  6. Refresh your website and you should no longer see 404 Not Found errors
  7. In case the errors still there, check if the actual font files are available

Note: Chrome may continue showing warnings if you enter application/x-woff instead of application/x-font-woff MIME type.

Option 2: Add the MIME Types in Web.config

  1. Open Web.config file usually resides in your website root folder
  2. Under system.webServer/staticContent nodes, change or add the following codes:
  3. Save and refresh your website and see the issues have been resolved
  4. But if the problem is not resolved, you may need to add the following security section as well under system.webServer node:

Disable Strong Password Enforcement & Password Aging in Windows Server

Microsoft Windows Server 2008 (R2) by default enforces Administrator users to use strong passwords. Normal home users usually do not need this password complexity policy when creating a password and using Windows. For whatever reasons, here are the steps to disable this password complexity requirements:

  1. From Start menu, click Run, enter gpedit.msc and press Enter or click OK button. In the Local Group Policy Editor window, expand Computer Configuration, then Windows Settings, then Security Settings, then Account Policies, and then finally click Password Policy.
  2. In the right pane, open by double clicking Password must meet complexity requirements and choose Disable. Click OK button to save the change. The system will no longer force you to use strong passwords and you can even use blank password.
  3. Optionally, you can choose to have a never expired passwords. To do this, with the Local Group Policy Editor window still open, in the right pane, open Maximum password age policy and set the value to 0 days. Click OK button to save the policy change.

Install & Configure OpenSSH on Ubuntu

Install and Enable OpenSSH Server on Ubuntu Linux

Open Terminal and enter the following commands:

Stop, Start and Restart OpenSSH service, Status and Reload

Open Config File and Change SSH Server Port Number

Change port 22 to different port number.

Optionally, For improved security:

  1. Find and change PermitRootLogin from yes to no
  2. At the end of the config file, add the following lines:
    UseDNS no
    AllowUsers [username]

    After reload, only above users can connect to the SSH server
  3. Save, close and reload SSH service

How to use SSH to connect to a remote server

And enter password. To quit from the connected session: