Sunday, April 6, 2008

Pattern matching with sed

My intention was to catch the blue part ::

[[tag_open]] href="blah%20blah.mp3">blah blah.mp3 [[tag_close]]

The following sed one liner does it perfectly ;) ...

wget -q -O - http://192.168.0.5:8000/ | grep mp3 | sed 's/.*href="\(.*\)".*/\1/'

The \( , \) and \1 are the key. The \1 prints that what is found between the \( and \).

another possible way is : grep -o PATTERN
another ... : awk -FS 'href=' :-p

Friday, April 4, 2008

I Carry Your Heart With Me

i carry your heart with me, i carry it in my heart
i am never without it
anywhere i go, you go,my dear;
and whatever is done by only me, is your doing,my darling;

i fear no fate, for you are my fate,my sweet
i want no world, for beautiful you are my world, my true
and it's you are whatever a moon has always meant
and whatever a sun will always sing is you

here is the deepest secret nobody knows
here is the root of the root and the bud of the bud
and the sky of the sky of a tree called life; which grows
higher than the soul can hope or mind can hide
and this is the wonder that's keeping the stars apart

i carry your heart (i carry it in my heart)

- ee cummings

Thursday, April 3, 2008

Foxtel iQ info

Downloading latest firmwire

do the following using the front panel buttons
  • press select and back, the box should take a hard restart now
  • quickly press in sequence power, up, down, power
  • the screen should turn blue. It will take a while to download the whole thing

Activating the USB port

  • goto tv guide, press SETUP
  • go down upto SYSTEM SETTINGS
  • press 0611 to get to the installer menu via "SYSTEM DETAILS"
  • goto "MODEM SETTINGS", toggle internal-modem to USB
it is said, a TOPFIELD driver can be used to access the internal content


Copying recorded content


Encryption

  • Foxtel's contents are encrypted by NDS. Till today, it's considered unbroken.

Tuesday, April 1, 2008

Change partition volume labels on linux

** VFAT

  • set new label :: mlabel -i /dev/sdb1 -n ::BABIL
  • show label :: mlabel -i /dev/sdb1 -s ::
** NTFS

  • ntfslabel /dev/sdb1 BABIL
** EXT2/3


  • e2label /dev/sda1 BABIL
** JFS

  • set new label :: jfs_tune -L BABIL /dev/sdb1
  • show label :: jfs_tune -l /dev/sdb1
** ReiserFS

  • reiserfstune -l 'BABIL' /dev/sdb1
** XFS

  • set new label :: xfs_admin -L BABIL /dev/sdb1
  • show label :: xfs_admin -l /dev/sdb1

Force dhcp to renew ip address with dhclient

To get ip address of your choice from the dhcp server of the local network or to force dhcp server to assign you with a new address :

Trick (1)
  • dhclient -r eth0 ; dhclient eth0
Trick (2)
  • vim /var/lib/dhcp3/dhclient.leases
  • change this line :: fixed-address 104.242.90.155; with another ip address on the same network.
  • dhclient eth0

... now you should get the new ip address you just specified in dhclient.leases file ;-)

nmap -sP -n -T5 104.242.90.1-254 ... to check for the used-up addresses.