Password Protect Directory With .htaccess

To create authentication using htaccess do the following:

  1. Open up console and type htpasswd -c .htpasswd username to create .htpasswd file.
    or alternatively you can search for .htpasswd generator online
  2. Put the newly created .htpasswd file somewhere hidden.
  3. Create .htaccess file with the following content:
    AuthType Basic
    AuthName "Any title you want"
    AuthUserFile /path/to/.htpasswd
    require valid-user
  4. Put the .htaccess file inside the directory you want to password protect

Create Hotspot Using Ubuntu

Assuming you already know how to setup new wifi connection.

  1. Disable wifi
  2. Create new wifi connection from network connection
  3. Type in your preferred hotspot name on SSID
  4. Open /etc/NetworkManager/system-connection/[wifi file name]
  5. Change mode=infrastructure to mode=ap
  6. Save, enable wifi, and connect to your newly created hotspot SSID above.

Create a Unique Strong Memorable Password for Every Account

A strong password need to have the combination of letters, numbers, and symbols. Also you need to make it as lengthy as you can.
Problem is, when we have many accounts it can be hard to remember each one, not to mention the must use of combination and symbols all that stuff.

Here’s a trick I use to make unique different strong password for every account:
Create or generate a strong password that is easy for you to remember. Consider making a lengthy and full of combination password,  for tutorial purpose lets take *3X4MpL3_Pa5S# as a password.

Take the first and last letter of the site name. For example we’ll use sitename.com, so you would have s and e

Combine it with your password and you will have s*3X4MpL3_Pa5S#e as a password, and if you create an account in another site, e.g: another.com you will have a*3X4MpL3_Pa5S#r as a password.

Therefore it would be different for each account in different site. Of course this is only a simple method to create a unique pass, you can be creative and make your own pattern, that way only you will know and understand the pattern.

Enable Apache2 Mod Rewrite on Ubuntu

To enable Apache2 mod rewrite, write the following command on console:
a2enmod rewrite

Edit /etc/apache2/apache2.conf
and search for this code:

<Directory /var/www/html/>
        Options Indexes FollowSymLinks
        AllowOverride all
        Require all granted
</Directory>

Change AllowOverride None to AllowOverride All

And lastly restart Apache:
service apache2 restart

Prevent Virus Spreads on Windows XP by Disabling USB Autoplay

Windows autoplay actually was created to simplify the use of peripheral devices like USB storage devices, memory cards, and MP3 players by running the software needed to access and view the content on these devices automatically.

To prevent virus accessing your computer from USB devices you can stop the autoplay feature by following these steps :

  • Open up windows Run and type gpedit.msc
  • Now choose administrative templates then system on the viewtree.
  • Look to windows column on the right and search for Turn off autoplay, double click it.
  • A new windows will appear, click the enable radio button and select all drives.

And thats it, you are one step more protected from viruses.