It is two and half years since I have started staying out of my home town. Basically my city is famous for its cultural enrichment due to the temples and monuments here. It is the second largest city in Tamilnadu. But yet it is lagging in terms of faster development when compared to Coimbatore. But I hope this is the right time to pick up.
Till now it was a helm of local political rowdies. Now they are all taken away from here. I haven’t seen any posters/banners around the city now. It is a very good change. Yesterday I was roaming around the city. I am seeing many changes and more improvements on infrastructure development. And there are many car showrooms opened in the city. But still the roads are not that much vast anywhere. It needs more bridges at many places. The city limit is extended currently. The total city is stimulated to celebrate the upcoming festival Deepavali. Planning to get into the crowd today also. I met a lot of friends on the past two days. Still there are more people to meet.
Here really we don’t have much places to roam around other than old monuments. There is no entertainment other than theaters. I am looking for a change in it. It is really the right time for investors here.
Everybody have a dream of staying in their native itself. Yes, me too. Thinking of the day to come sooner.
I thought of writing a lot of blog posts but I am not able to sit and do it. So I was thinking of writing something very short as I can do it daily. Here after I am going to write to express the biggest moment of the day in a single word!
In the recent vodafone advertisement we can hear the line “He is always on facebook”. Facebook team is making so much effort to make people to spend more time on their portal. They analyses people mind where they will waste time very easily and implements it exactly. It was the same case for me before 15 days. Nowadays I am not using it frequently. Accessing hardly on weekly once or twice for ten minutes. To ensure the constraint I have wrote one batch script. No more time wasting on Facebook hereafter.
I am using Windows 7. If you want to enable this in your system just copy the below scripts to your system and schedule it accordingly.
echo |type c:\Windows\System32\drivers\etc\hosts|findstr /v facebook > C:\Windows\System32\drivers\etc\hosts
ping 18.104.22.168 -n 1 -w 60000 > NUL
echo 127.0.0.1 www.facebook.com>> c:\Windows\System32\drivers\etc\hosts
Save it in your C: on any name of your wish with .bat extension. In the given example I have given access to facebook for 10 minutes which is 60000 milli seconds. You can change the timings accordingly to your need.
The first line deletes all the lines which contains the keyword “facebook”. And in the second line the script waits for ten minutes by pinging a non available IP Address. It is the available way of making wait for a batch script. In the third line, I am adding facebook.com to the restriction list by redirecting it to the localhost(system local URL).
There I had an issue that, for the 10 minutes waiting period the command prompt will be the foreground process. It means we need to minimize the window for that 10 minutes which disturbed me. SO I thought of making it as an invisible process(background process). So I have used an existing VB Script(source:Google) to make it invisible for that period.
Set WshShell = CreateObject(“WScript.Shell”)
WshShell.Run chr(34) & “C:\goawayfacebook.bat” & Chr(34), 0
Set WshShell = Nothing
Now schedule the VB script for the time you need using SCHTASKS command or using Task Scheduler.
And forget the problem with facebook!
This batch script will be useful when you want to take periodic mysql dumps and archive it.
Change the folder names accordingly if you want to use it.
mysqldump -u root -p password –result-file=”c:\backup%DATE:~4,2%%DATE:~7,2%%DATE:~10,4%%time:~0,2%%time:~3,2%%time:~6,2%%time:~9,2%.sql” <database_name>
cd C:\Program files\Winrar
Winrar a c:\RARbackup%DATE:~4,2%%DATE:~7,2%%DATE:~10,4%%time:~0,2%%time:~3,2%%time:~6,2%%time:~9,2%.rar C:\*.sql
Further add this to windows task scheduler or use AT command which is similar to crontab in linux.
Use it as,
AT 2:00 /every:M <script_path>
This will run at 2 AM on every Monday.
For the past one week I was not able to post anything to post because of the issue with my wordpress.
It gives this, when I try to post.
501 Method Not Implemented
GET to /blog/wp-admin/post.php not supported.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Atlast the issue is resolved after turning off mod security by editing php.ini. My host did that since I don’t have access to that file.
This may work sometimes. But not sure on all the cases for this particular issue.
Options All Mulitviews
<Limit POST GET OPTIONS>