int main(){     while(1)         fork(); }
Wednesday, February 1, 2012
Fork Bomb: A simple bomb that makes you restart
Below is the few lines of code in C. It creats a Bomb called Fork Bomb.
Its just a few lines but it is sufficient to spawn infinitely many child processes. Each child again spawns infinite children. This continues.. and your system cries. Unable to take handle those many processes, your system gets slow, slower and finally stops responding. You got to restart your system.
Warning! You will loose your unsaved data. Also don't make any pranks out of it.
Monday, January 30, 2012
Blocking websites in your computer
If you want to block certain websites due to several reasons like parental restrictions or whatever use the following guidelines.
You will have to edit the host file. Here I will show you how to edit it in Ubuntu. The format of the host file is same in linux or windows so you will be fine even in windows.
Open your terminal
Your hosts file may be read only. so change it to read write. To do so you have to type in the command
right click on the hosts file
Click on properties
Click on Security
Choose your username then click edit
Check on the full control option.
Click on Apply and then on Ok
You can now edit the file.
What follows now is applicable to both windows and linux
You don't need to care about IPV6. Just ignore it. Now you need to add a line in the first block. Line to be added would be something like
Congratulations! Your sites are blocked
You will have to edit the host file. Here I will show you how to edit it in Ubuntu. The format of the host file is same in linux or windows so you will be fine even in windows.
Open your terminal
Your hosts file may be read only. so change it to read write. To do so you have to type in the command
sudo chmod +w /etc/hostsOpen the hosts file to edit it. You may open it using the commands :
sudo gedit /etc/hostsYou will see following things in your file.
127.0.0.1 localhostIn windows 7, the hosts file is located at
127.0.1.1 abc-laptop
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
C:\Windows\System32\drivers\etcYou won't have the access to edit it. So in order to enable the editing:
right click on the hosts file
Click on properties
Click on Security
Choose your username then click edit
Check on the full control option.
Click on Apply and then on Ok
You can now edit the file.
What follows now is applicable to both windows and linux
You don't need to care about IPV6. Just ignore it. Now you need to add a line in the first block. Line to be added would be something like
127.0.0.1 www.facebook.comHere I used it to block facebook, instead you can replace www.facebook.com with any domain name you would like to be blocked. So your final file would look something like this
127.0.0.1 localhostNow save the file and close it.
127.0.1.1 mahesh-laptop
127.0.0.1 www.facebook.com
127.0.0.1 twitter.com
127.0.0.1 http://www.youtube.com
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
Congratulations! Your sites are blocked
Saturday, January 7, 2012
Adding copyright to your image
If you want to add copyright to image which you want to upload to your picasa web albums, its as easy as this.
1) run Picasa application
2) go to tools
3) go to options...
4) go to Web Albums
5) select option "Add a watermark for all photo uploads. "
6) now you need to copy the copyright symbol © using Ctrl + C command.
7) use ctrl +v to paste it in the textbox in picasa.
8) add any text you want after the © symbol
eg. when I use ©maheshmhs in my photo it appears as in the image below.
1) run Picasa application
2) go to tools
3) go to options...
4) go to Web Albums
5) select option "Add a watermark for all photo uploads. "
6) now you need to copy the copyright symbol © using Ctrl + C command.
7) use ctrl +v to paste it in the textbox in picasa.
8) add any text you want after the © symbol
eg. when I use ©maheshmhs in my photo it appears as in the image below.
iPhone 5: Release Date and Specifications
iPhone 5: Release Date and Specifications: I don't own an iPhone yet. I was planning to have one. But then a thought crossed my mind. What if Apple guys decide to launch iPhone 5? ...
Subscribe to:
Comments (Atom)