Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Sunday, October 9, 2016

How to Block any website in MAC Os or linux

To be more productive some time you may want to block some website.  In my case sometimes I block amazon.com, amazon.in, facebook.com.
To block  website you need to edit your host file
go to terminal and type 
sudo vi /etc/hosts
It will ask for your password

in hosts file add the following line
127.0.0.1   www.facebook.com
127.0.0.1   www.amazon.com

you can add as many as you want to your host file. State above example block www.facebook.com and www.amazon.com.

You may find out some time those example not work with out reboot. In this case you need to clear  dns cache

just type following line in terminal to clear cache

dscacheutil -flushcache




Monday, April 25, 2016

Ubuntu desktop suddenly points to home folder or Documents Folder [solved]

Go to your home folder

and type

ctrl + H
that will show all hidden file

now click on follwing folder

.config
inside .config folder open following file in your favorite text editor
user-dirs.dirs now change your existing code by below code
XDG_DESKTOP_DIR="$HOME/Desktop" XDG_DOWNLOAD_DIR="$HOME/Downloads" XDG_TEMPLATES_DIR="$HOME/Templates" XDG_PUBLICSHARE_DIR="$HOME/Work" XDG_DOCUMENTS_DIR="$HOME/Documents" XDG_MUSIC_DIR="$HOME/Music" XDG_PICTURES_DIR="$HOME/Pictures" XDG_VIDEOS_DIR="$HOME/Videos
now restart pc



css snippet for blogger code highlighting

code, .code {     display: block;     background: beige;     padding: 10px;     margin: 8px 15px; }