Wednesday, January 19, 2011

To Get File Size using curl

To get a file size using curl

curl -sI $url | grep Content-Length | cut -d ' ' -f 2

Sunday, May 3, 2009

Huawei SmartAX 800 JDownloader Reconnect Script

ഇതാ... ഇടിവെട്ടി എന്റെ പുതിയ ബ്രോഡ്‌ബാന്റ് റൗട്ടര്‍ വറത്തു പോയ വഴി കണ്ടില്ല... എയര്‍ട്ടെല്ലുകാരന്‍ ചുമ്മാ തന്നതാണെങ്കിലും....!!

പൊടി പിടിച്ചിരുന്ന പഴയ BSNL വക Huawei SmartAX 800 തപ്പിയെടുത്തു..

ഏറെ ഡൌണ്ലോഡ് ചെയ്യാന്‍ ഞാന് "JDownloader" ആണു് ഉപയോഗിച്ചിരുന്നതു്‌... ഗൂഗിളില്‍ മുഴുവനും പരതിയിട്ടും ഒരു "Reconnection Script" -ഉം കിട്ടിയില്ല...

അവസാനം എന്റെ വക ഒന്ന് ഞാന്‍ തന്നെ ഒപ്പിച്ചെടുത്തു....

പക്ഷെ ബ്രോഡ്‌ബാന്റ് യൂസര്‍നേം / പാസ്‌വേര്‍ഡ് വേണം എന്ന കുഴപ്പം മാത്രം ...

അത് സഹിക്കാല്ലോ...??!!!

[code]
====================================================================
[[[HSRC]]]
[[[STEP]]]
[[[REQUEST]]]
AUTH /? HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]
[[[STEP]]]
[[[REQUEST]]]
GET /Action?id=141&ppp_action=3&ppp_status=1&d_route=1&ppp_mtu=1492&ex_param1=16&sec_proto=0&login=*********&passwd=********* HTTP/1.1
Host: %%%routerip%%%
[[[/REQUEST]]]
[[[/STEP]]]
[[[STEP]]]
[[[REQUEST]]]
GET /Action?id=141&ppp_action=1&ppp_status=1&d_route=1&ppp_mtu=1492&ex_param1=16&sec_proto=0&login=********&passwd=********&cmdSubmit=Submit HTTP/1.1
Host: %%%routerip%%%
[[[/REQUEST]]]
[[[/STEP]]]
[[[/HSRC]]]
====================================================================
[code]

ഏറെ നാളുകള്‍ക്ക് ശേഷം....

കുറെയേറെയായി ഇങ്ങോട്ടൊക്കെ ഒന്ന് തിരിഞ്ഞുനോക്കിയിട്ട്....!!!
എന്ത് ചെയാന്‍....!!!

Sunday, August 3, 2008

To rescue Grub after installation of Windows XP or on lost of MBR

Boot into the live Ubuntu cd. This can be the live installer cd or the older live session Ubuntu cds.

When you get to the desktop open a terminal and enter. (I am going to give you the commands and then I will explain them later)

Code:
sudo grub
This will get you a "grub>" prompt (i.e. the grub shell). At grub>. enter these commands

Code:
find /boot/grub/stage1
This will return a location. If you have more than one, select the installation that you want to provide the grub files.
Next, THIS IS IMPORTANT, whatever was returned for the find command use it in the next line (you are still at grub>. when you enter the next 3 commands)

Code:
root (hd?,?)
Again use the value from the find command i.e. if find returned (hd0,1) then you would enter root (hd0,1)

Next enter the command to install grub to the mbr

Code:
setup (hd0)
Finally exit the grub shell
Code:
quit
That is it. Grub will be installed to the mbr.
When you reboot, you will have the grub menu at startup.

Now the explanation.
Sudo grub gets you the grub shell.
Find /boot/grub/stage1 has grub locate the file stage1. What this does is tell us where grub's files are. Only a small part of grub is located on the mbr, the rest of grub is in your boot folder. Grub needs those files to run the setup. So you find the files and then you tell grub where to locate the files it will need for setup.
So root (hd?,?) tells grub it's files are on that partition.
Finally setup (hd0) tells grub to setup on hd0. When you give grub the parameter hd0 with no following value for a partition, grub will use the mbr. hd0 is the grub label for the first drive's mbr.
Quit will exit you from the grub shell.

Saturday, June 21, 2008

Ubuntu Gutsy Gibbon Vs Mac OS X Tiger

I wish it was real...



രസകരമായൊരു കാര്യം....!!!

Wednesday, June 18, 2008

ലിനക്സ്... വീണ്ടും..

ലിനക്സ് ഒരു ഹരമായി മാറുന്നു..
ഉബുണ്‍ടുവില്‍ നിന്നൊരു ചുവ്ടു മാറ്റം .. മിന്റിലേക്ക് ....
കൊള്ളാം എന്നതു തന്നെ സത്യം...

malayalam transliteration is working in great direction.. ml-mozhi too..

Tuesday, June 10, 2008

DVD Data Recovery on Linux

After reaching B'glore... it is hectic...

But found a way to have successful data recovery on linux..

Tools : ddrescue, dares-qt

fireup ddrescue

ddrescue -b 2048 -v -r 0 -n /dev/dvd /path/to/image.img logfile

This will save the image of dvd as image.img
---------------------------------------------------------------------
Note:
Disabled splitting error areas and retries for maximum speed.

---------------------------------------------------------------------
Then start dares-qt

dares-qt -i /path/to/image.img -s /path/to/save/

It will scan the image.img file for files and will display the files to be saved...

Save one by one... !!!!
That is all....