Sunday, February 14, 2010

Research and its impact on our lives

Well, I am sure that many of us are now aware of the "sixth sense" and how it can revolutionize the way we interact with the surrounding. For the ignorant souls, here are the a couple of videos,





The best thing about it is that it will be open source. I would really bow to the guy if he really kicks the fortune waiting for him if he patents "sixth sense" and make it available to masses to make some real change in the lives of people.

Another good news I got to know today is that some student from kolhapur has developed a system so that the electricity can be generated from the water supplied from overhead tanks of buildings. Everyone knows the principle of electricity generation from water, but getting such a nice idea of building small turbines so that it can be used in any building is awesome. I would really hope to see such ideas being implemented in day to day life. Do not know whether builders will make it a practice to incorporate such technologies in their project or not. Having solar cell panels on the roofs is also another source of green energy. Rain water harvesting and many other cool ideas are already there, all we need is to embed and embrace these ideas in our day to day lives. Will we embrace them in time, or whether we will dig the well only when our a** is on fire? Only time will tell, but I sure hope that we wake up sooner than later...

Friday, February 05, 2010

Nice sher by shakhadam abuvala

Copied from the status line of my friend sanjay vaghela.

કેવો તું કીમતી હતો સસ્તો બની ગયો
બનવું હતું નહીં ને શિરસ્તો બની ગયો
ગાંધી તને ખબર છે કે તારું થયું છે શું
ખુરસી સુધી જવાનો તું રસ્તો બની ગયો.
- શેખાદમ આબુવાલા *"ખુરસી"*

Saturday, January 23, 2010

Yeh Mera India - Sher

Well,
I was looking for it and found it here (http://mayankshukla1.blogspot.com/2009/11/ymi-ye-mera-india-sher-o-shayari.html). Copying here for my own record :-). Thanks to mayank for posting it.

किरण चाहू तो दुनिया के सरे अँधेरे घेर लेते है |
कोई मेरे तरह जी ले तो जीना भूल जायेगा ||


साथ भी छोडा तो कब,जब सब बुरे दिन कट गए |
ज़िन्दगी तुने कहा आकर दिया धोखा मुझे ||

हमें इस चिस्त से उम्मीद क्या थी और क्या निकला |
कहा जाना हुआ था तय कहा से रास्ता निकला ||
खुदा जिनको समझते थे वो शीशा थे न पत्थर थे |
जिसे पत्थर समझते थे वही अपना खुदा निकला ||

जिसने इस दौर के इन्सान किये है पैदा वो मेरा भी खुदा होगा मुझे मंज़ूर नहीं |

अगर टूटे कीसी का दिल ,तो शब् भर आख रोती है |
ये दुनिया है गुलो की जी इसमें काटे पिरोती है ||
हम मिलते है अपने गाओ में दुश्मन से भी इठला कर |
तुम्हारा शहर देखा तो बड़ी तकलीफ होती है ||

Saturday, September 26, 2009

One of the greatest chess puzzle

Lately, I have grown a bit of interest in chess, thanks to Ramprasad. He pointed to this page. Truely, an amazing puzzle indeed. Holy Grail!!!!

Just copying the positions in FEN here for those out there who are curious to solve it first :-).

Bq1B1K2/3PpN2/P3Pp2/P1p2P2/2Pk1b1R/1p6/pN1P1P2/QR6 w - - 0 1

White to move and mate in 4.

Monday, April 27, 2009

ઉઘાડી આંખને તારું જ તું કામણ તપાસી લે

Found this nice creation on tahuko.com

ઉઘાડી આંખને તારું જ તું કામણ તપાસી લે,
ઋતુઓ છોડ, તારી જાતમાં ફાગણ તપાસી લે.

ભલે ત્યાં બુધ્ધ થાવાનો મરણથી જ્ઞાન પામીને;
અહીં ઘટના વિચારી લે અને કારણ તપાસી લે.

ભરી લે જિંદગીથી મન, પછી મૃત્યુ વિષે જોશું;
પહેલાં ઝેર તું પી લે પછી મારણ તપાસી લે.

તરસને બંધ બેસે એમ જળ તું શોધતો હો તો;
તને ટીંપુ નહીં મળશે, બધા શ્રાવણ તપાસી લે.

ભલે તું શોધવા એને ભમી લે જગત આખામાં;
બધેથી તું જ મળવાનો ભલે કણકણ તપાસી લે.

- અશરફ ડબાવાલા

Sunday, November 23, 2008

મરીઝ ની ગઝલ

બસ એટલી સમજ મને પરવરદિગાર દે,
સુખ જ્યારે જ્યાં મળે, બધાના વિચાર દે.

માની લીધું કે પ્રેમની કોઈ દવા નથી,
જીવનના દર્દની તો કોઈ સારવાર દે.

ચાહ્યું બીજું બધું તે ખુદાએ મને દીધું,
એ શું કે તારા માટે ફક્ત ઈન્તજાર દે.

આવીને આંગળીમાં ટકોરા રહી ગયા,
સંકોચ આટલો ન કોઈ બંધ દ્વાર દે.

પીઠામાં મારું માન સતત હાજરીથી છે
મસ્જિદમાં રોજ જાઉં તો કોણ આવકાર દે !

નવરાશ છે હવે જરા સરખામણી કરું,
કેવો હતો અસલ હું, મને એ ચિતાર દે.

તે બાદ માંગ મારી બધીયે સ્વતંત્રતા,
પહેલાં જરાક તારી ઉપર ઈખ્તિયાર દે.

આ નાનાં-નાનાં દર્દ તો થાતાં નથી સહન,
દે એક મહાન દર્દ અને પારાવાર દે.

સૌ પથ્થરોના બોજ તો ઊંચકી લીધા અમે,
અમને નમાવવા હો તો ફૂલોનો ભાર દે.

દુનિયામા કંઇકનો હું કરજદાર છું ‘મરીઝ’,
ચૂકવું બધાનું દેણ જો અલ્લાહ ઉધાર દે.

- મરીઝ

Friday, November 21, 2008

Nice gazal by chandresh makwana : ચંદ્રેશ મકવાણા

Copied from http://gujaratikavita.blogspot.com

ચંદ્રેશ મકવાણાની એક ગઝલ-



મારી સમજણના છેડા પર જેની પક્કડ ભારી છે,
મોડે મોડે જાણ થઈ એ માણસ ધંધાદારી છે.

જ્યાંથી છટકી માણું છું હું સાવ અજાણી દુનિયાને,
મારી અંદર છાની-છૂપી એક મજાની બારી છે.

કાલ સુધી મારી અંદર પણ એક મદારી ફરતો'તો,
કાલ સુધી મેં ઈચ્છાઓને નચવી નચવી મારી છે.

કટ કટ કટ કાપી નાખે દિવસો, દસકા, સૈકાને,
તોય ખબર ના પડે જરા આ સમય ગજબની આરી છે.

'નારાજ' કહી દો એ જણને જે તણખાથી પણ ધ્રૂજે છે,
કે મેં આંખના આંસુથી બળતી રાતોને ઠારી છે.___________________________________________

Wednesday, November 12, 2008

Awesome sher by "Ghayal" : અમૃત ‘ઘાયલ’

અમૃતથી હોઠ સહુના, એંઠા કરી શકું છું.

મૃત્યુના હાથ પળમાં હેઠા કરી શકું છું.

આ મારી શાયરી ય સંજીવની છે, ‘ઘાયલ’.

શાયર છું, પાળિયાને બેઠા કરી શકું છું

Tuesday, November 11, 2008

A nice gazal by "mariz" : ઉતાવળ સવાલમાં - મરીઝ

Well,
This nice creation by "mariz" is taken from arpit's blog.
-------------------
એ રીતે એ છવાઈ ગયાં છે ખયાલમાં;
આવેશને ગણી મેં લીધો છે વહાલમાં.

તારા વચનનો કેટલો આભાર માનીએ,
વરસો કઠણ હતાં તે ગયાં આજકાલમાં.

સારું છે એની સાથે કશી ગુફતગૂ નથી,
નહિતર હું કંઈક ભૂલ કરત બોલચાલમાં.

કરતો હતો જે પહેલાં તે પ્રસ્તાવના ગઈ,
લઈ લઉં છું એનું નામ હવે બોલચાલમાં.

લય પણ જરૂર હોય છે મારી ગતિની સાથ,
હું છું ધ્વનિ સમાન જમાનાની ચાલમાં.

મુજ પર સિતમ કરી ગયા મારી ગઝલના શેર,
વાંચીને એ રહે છે બીજાના ખયાલમાં.

એ ‘ના’ કહીને સહેજમાં છૂટી ગયા ‘મરીઝ’,
કરવી ન જોઈતી’તી ઉતાવળ સવાલમાં.

- મરીઝ

Tuesday, November 04, 2008

How to : QEMU networking

Hi All,
It has been ages since I have written anything over here. One of the main reason is that I have started posting mathematical post at my wordpress blog.

Anyways, Sameer and I were trying to get our hands dirty on Qemu networking. Although there is a fairly good description is given over here, I am trying to fill in here a few missing bits.

Okay, so here is the scenario we want to create.

On one machine ( say host-A ) we want to create many guest machines ( guestA1, guestA2 ) etc. Similarly, there is another machine ( host-B ) having many guest machines ( guestB1, guestB2 ). We want to make guestA* communicate with guestB*.

I am assuming that readers are aware of how to install a guest OS on a guest machine created by qemu.

First we need to configure a ipv4-over-ipv4 tunnel for the host machines.

--host-A configuration is as follows

ip : 172.27.16.1
netmask : 255.255.255.0
default gateway : 172.27.16.254

host-B configuration is
ip : 172.27.16.2

netmask and gateway is the same as above.

--In host-A ( as root ) do the following

root@hostA# ip tunnel add tunl1 mode ipip remote 172.27.16.2 dev eth0

-- this command essentially create one endpoint of the tunnel in host-A. It says that the other end of the tunnel lies at ip 172.27.16.2. Also, the tunnel device will use eth0 as its physical device.

root@hostA# ip link set tunl1 up

-- this command will bring up the tunnel interface

root@hostA#ifconfig tunl1 10.0.1.1 pointopoint 172.27.16.2

-- guestA network will be 10.0.1.0/24 network and tunnel device should be a part of it. This command gives the tunnel device an ip address and it says that other endpoint of the tunnel will be at 172.27.16.2

root@hostA# route

--this will show you the current configuration of routing table. There might be an entry in the routing table

172.27.16.2 * 255.255.255.255 U 0 0 tunl1

--you need to delete this entry using following command :

root@hostA# route del -net 172.27.16.2 netmask 255.255.255.255 dev tunl1

--Also you need to tell routing table that guestB network ( 10.0.2.0/24) should be routed through the tunnel

root@hostA# route add -net 10.0.2.0 netmask 255.255.255.0 dev tunl1

--You need to repeat the same procedure for hostB with suitable ips ( use 10.0.1.* instead of 10.0.2.* and vice versa , replace 172.27.16.1 with 172.27.16.2 and vice versa )

--By now, your tunnel should be working. To check, try

root@hostA# ping 10.0.2.1

root@hostB# ping 10.0.1.1

--If it does not ping, it might be the case that your firewall is coming into the way. If you are expert enough, modify your firewall rules with iptables. If not, lets first save your firewall rules

root@hostA# iptables-save | cat > iptablebackup.bak

--flush the firewall rules now

root@hostA# iptables -F
root@hostA# iptables -t nat -F

--Now, that firewall is completely disabled, the tunnel should work. (Of course, you need to disable your firewall at hostB as well! ) If it still does not work, then there might be some other problem or you might not have done things right.

-- you can restore your firewall ( later ) with

root@hostA# cat iptablebackup.bak | iptables-restore

--Okay, so the tunnel is working now!! Great news!! But what next??
Next we create a tapping device - a virtual network interface - which will be visible to the guest OSes.

root@hostA# tunctl -u username

-- provide a username here. This user will be able to use this tapping device while initializing qemu process. This command would have created a tapping device (tap0) in your system

--assign an ip address of guestA network to tapping device

root@hostA# ip addr add 10.0.1.2 dev tap0

-- bring the tapping device up

root@hostA# ip link set tap0 up

-- Also create a file /etc/qemu-ifup which can look like following :
#!/bin/bash
#echo "bringing up interface $1"

-- Now start the first guestOS

username@hostA$ qemu -net nic,macaddr=macaddr1 -net tap,ifname=tap0 -net socket,mcast=230.0.0.1:9999 ....

--second guestOS can be started with following
username@hostA$ qemu -net nic,macaddr=macaddr2 -net socket, mcast=230.0.0.1:9999 ...

-- multicast socket is needed for mchines in guestA network to talk to each other

--In the guestA1 do the following :

root@guestA1# ifconfig eth0 10.0.1.3 netmask 255.255.255.0
root@guestA1# route add default gw 10.0.1.2 dev eth0

-- Note that we have given the ip address of tapping device as the gateway fo guest OSes
-- second, third etc guest machines can be configured with different ip addresses for their eth0

-- Repeat this procedure on host-B as well with appropriate ip addresses.

-- Now, you should be able to ping machines from guestA network to guestB network and vice versa. However, this does not yet allow you to connect to host network. To do that, you need to enable ip forwardng

root@hostA# echo "1" > /proc/sys/net/ipv4/ip_forward

-- perform source NAT

root@hostA# iptables -t nat -I POSTROUTING 1 -o eth0 -j SNAT --to-source 172.27.16.1

--Now, from guestA network ( 10.0.1.0/24 ) you should be able to connect to ( 10.0.2.0/24 ) as well as host network ( 172.27.16.0/24 )

-- To delete the tunnel

root@hostA# ip link set tunl1 down
root@hostA# ip tunnel del tunl1

--To delte the tapping device

root@hostA# tunctl -d tap0

--Above mentioned setup is tested with host machines running fedora core 9 and guest machines running Arch Linux, Debian etc.

If you have any queries post it as comments, I will be willing to answer if I can.