convert tabs to spaces, the easy way

2013-07-08 1 min read Bash Fedora

Lots of times you want to convert tabs to spaces and sometimes from a shell script, if that is the case, then simple solution is “tidy“. First you need to install tidy as follows:

sudo yum install tidy

and then you can use the command tab2space.

tab2spcae

This will print the output to STDOUT by default which you can redirect if you want.

Continue reading

C program to get the ascii string from a string

2012-07-25 1 min read C Programs
Example diagram of the printf function in the ...
Example diagram of the printf function in the C programming language (Photo credit: Wikipedia)

Lot of times, you would like to get the complete string in hex or ascii format and if you are one of them then this is something that will be helpful for you 🙂

Example output:

lp-amita[d=~/bin]> ./ascii aamit
String – aamit, Length – 5

Continue reading

DIY- Photos at home (Beautiful and Magical)

2010-11-17 1 min read Photo

Requirements:

  1. DSLR Nikon D5000

  2. Some Sparkles of different colors

  3. 2x100W Bulbs

and some imagination

Results:

Fantastic Photos with beautiful effects.

[Sparkles][1]
Sparkles
[Sparkles][2]
Sparkles
[Sparkles][3]
Sparkles
[Sparkles][4]
Sparkles
[Sparkles][5]
Sparkles
[Sparkles][6]
Sparkles
[Sparkles][7]
Sparkles
[Sparkles - Heart][8]
Sparkles - Heart
Enhanced by Zemanta

Flower photos for you :)

2010-11-05 1 min read Photo

Here are few more photos that I took at my home with my favourite Nikon DSLR D5000. Hope you like them.

[Flower][1]
Flower
[Flower][2]
Flower
[Flower][3]
Flower
[Flower][4]
Flower
Enhanced by Zemanta

Free Calendar for October 2010

2010-09-30 1 min read Photo Uncategorized

Hope you like my work with gimp and Nikon D5000 .

<img class="size-medium wp-image-2501" title="Calendar October 2010" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/09/calOct10-300x199.jpg" alt="Calendar October 2010" width="300" height="199" />

<a href="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/09/calOct10.jpg">Download Link<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=2104687a-c8b4-4199-944e-69204d710f76" alt="Enhanced by Zemanta" /><span class="zem-script more-related pretty-attribution">

Photos you can take at home and still stunning.

2010-09-19 3 min read Photo

Here are results of some more experiments that I did.

Setup:

  1. 100 Watt <a class="zem_slink" title="Incandescent light bulb" rel="wikipedia" href="http://en.wikipedia.org/wiki/Incandescent_light_bulb">Light Bulb

  2. One Bowl/Plate/Cup (whatever you wish)

  3. <a class="zem_slink" title="Camera" rel="wikipedia" href="http://en.wikipedia.org/wiki/Camera">Camera (<a class="zem_slink" title="Nikon D5000" rel="wikipedia" href="http://en.wikipedia.org/wiki/Nikon_D5000">Nikon D5000)

  4. Some balls (These balls come in very small size and you need to keep them in water. Once kept in water for 10-15 days they become 20-30 times of their original size. Sorry, I don&#8217;t know the name as they were gifted to me. In <a class="zem_slink" title="India" rel="geolocation" href="http://maps.google.com/maps?ll=28.6133333333,77.2083333333&spn=10.0,10.0&q=28.6133333333,77.2083333333%20%28India%29&t=h">India it is quite easy to find, not sure about other countries).

    Continue reading

New entry – My DSLR from Nikon… just loving it.

2010-08-29 6 min read Photo Uncategorized

For last couple of months, I was thinking of taking a <a class="zem_slink" title="Digital single-lens reflex camera" rel="wikipedia" href="http://en.wikipedia.org/wiki/Digital_single-lens_reflex_camera">DSLR. I had a entry level DSLR from <a class="zem_slink" title="Fujifilm" rel="homepage" href="http://www.fujifilm.com/">FujiFilm <a class="zem_slink" title="FinePix S9100" rel="wikipedia" href="http://en.wikipedia.org/wiki/FinePix_S9100">S9600(which now I am planning to sell off). This is a very nice <a class="zem_slink" title="Camera" rel="wikipedia" href="http://en.wikipedia.org/wiki/Camera">camera indeed, but I had to have a better camera. So, I searched and researched and finally it came down to list of few things I wanted: a camera with couple of features, a <a class="zem_slink" title="Zoom lens" rel="wikipedia" href="http://en.wikipedia.org/wiki/Zoom_lens">zoom lens to begin with. So, after the discussion with one of my friends (Murali), thanks to him I have got my SLR (<a class="zem_slink" title="Nikon D5000" rel="wikipedia" href="http://en.wikipedia.org/wiki/Nikon_D5000">Nikon D5000). Its a dream come true. Here are some snaps of the box.

Continue reading
Older posts