<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3052199398307521229</id><updated>2024-09-15T20:48:26.465-04:00</updated><title type='text'>Maniy&#39;s Finds</title><subtitle type='html'>Interesting new things I came across...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://maniyfinds.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://maniyfinds.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10043934322845711493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3052199398307521229.post-5687530486759591296</id><published>2012-06-10T09:58:00.001-04:00</published><updated>2012-06-10T09:58:53.725-04:00</updated><title type='text'>Discovering Ruby-on-Rails</title><content type='html'>&lt;p&gt;I remember the days I wanted to build something and created couple of websites from scratch using PHP and MySQL. I also remember that my free-time endeavour turning into a full-time struggle and the day everything went south due to an &lt;a href=&quot;http://en.wikipedia.org/wiki/SQL_injection&quot;&gt;SQL-injection&lt;/a&gt; attack (never really thought of website security until that point.) Even at that time I knew about Ruby on Rails, but just because I didn&#39;t want to learn yet another language, I didn&#39;t pursue it. Recently I had to learn Ruby-on-Rails for a webdesign project and came to realize how stupid I was in the past!&lt;/p&gt;

&lt;p&gt;I believe &lt;a href=&quot;http://www.ruby-lang.org/en/&quot;&gt;Ruby&lt;/a&gt; became famous thanks to Ruby-on-Rails and I can really understand why. &lt;a href=&quot;http://rubyonrails.org/&quot;&gt;Ruby-on-Rails&lt;/a&gt; (RoR) is simply wonderful! Including the time for learning the fundamentals of Ruby and RoR, you can create a complete website within a week or two. It requires your database tables to be setup in a particular way, but once these tables are in place, you don&#39;t even have to worry about SQL queries anymore. Also avoided are the possibiliy of me creating stupid security holes asking for an SQL-injection attack. I also like the concepts of &lt;i&gt;layout&lt;/i&gt; and &lt;i&gt;partials&lt;/i&gt; that let me to structure the visual design of a website. RoR is much different than &lt;a href=&quot;http://en.wikipedia.org/wiki/Content_management_system&quot;&gt;content management systems&lt;/a&gt;; while RoR argumentally makes publishing content as easy as a CMS does, it also let you have a complete control over your design.&lt;/p&gt;

&lt;p&gt;So if you are planning to build a website, please consider RoR. The best documentation for RoR is found &lt;a href=&quot;http://guides.rubyonrails.org/index.html&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://maniyfinds.blogspot.com/feeds/5687530486759591296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3052199398307521229/5687530486759591296' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/5687530486759591296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/5687530486759591296'/><link rel='alternate' type='text/html' href='http://maniyfinds.blogspot.com/2012/06/discovering-ruby-on-rails.html' title='Discovering Ruby-on-Rails'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10043934322845711493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3052199398307521229.post-4075669185487011005</id><published>2012-06-09T23:11:00.000-04:00</published><updated>2012-06-09T23:11:43.479-04:00</updated><title type='text'>Discovering Ruby</title><content type='html'>&lt;p&gt;As far as spripting languages are concerned, I have been a &lt;a href=&quot;http://www.python.org/&quot;&gt;Python&lt;/a&gt; guy for a long time. Then my work required me to learn &lt;a href=&quot;http://www.ruby-lang.org/en/&quot;&gt;Ruby&lt;/a&gt; and it&#39;s been a strange experience. It is said that one of the primary concept in Ruby design is the &lt;i&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Principle_of_least_astonishment&quot;&gt;principle of least astonishment&lt;/a&gt;&lt;/i&gt;. But, in my learning experience, there was no shortage for astonishments. Ruby provides a lot of shorthands to make the programming much more concise and natural language-like and, in my opinion, this also confuses the programmers coming to the Ruby from other languages. For a simple example, I can point out that, in Ruby, &lt;tt&gt;return&lt;/tt&gt; keyword is optional; whatever value returned by the last statement of a method will be the method&#39;s return value.&lt;/p&gt;

&lt;p&gt;It took me only a few hours to learn Python (still more weeks to master it.) I see Python as the best mixture of C and Java &amp;ndash; for example, if you want to open a file in Python, it follows C&#39;s style (a simple open() statement, compared to Java&#39;s nested stream opening), but for classes like strings, lists, and dictionaries, it favors Java style. If you know C/C++ and Java, learning Python is a breeze. But, learning Ruby reminded me of learning Perl; while it was simple enough, some Ruby-specific syntax kept me puzzled for stretches of time. For example the &lt;tt&gt;||=&lt;/tt&gt; operator, which is generally used to assign default values.&lt;/p&gt;

&lt;p&gt;One problem I had with Python was that it is space-sensitive (or indentation-sensitive.) While it makes Python source codes super-readable, it creates confusion and bugs when you copy-paste stuffs from one area to another. With Ruby, I happily forgo that problem. Ruby also has many other nice features, like &lt;a href=&quot;http://rubylearning.com/satishtalim/ruby_blocks.html&quot;&gt;blocks&lt;/a&gt;. In summary, once you have got used to its rough edges, Ruby will be real sparkly in your hand.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://maniyfinds.blogspot.com/feeds/4075669185487011005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3052199398307521229/4075669185487011005' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/4075669185487011005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/4075669185487011005'/><link rel='alternate' type='text/html' href='http://maniyfinds.blogspot.com/2012/06/discovering-ruby.html' title='Discovering Ruby'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10043934322845711493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3052199398307521229.post-2356680786783125222</id><published>2009-07-29T15:41:00.000-04:00</published><updated>2009-07-29T18:08:15.351-04:00</updated><title type='text'>Texlipse Plugin</title><content type='html'>If you are an Eclipse fan and in love with LaTeX, you should try the eclipse plugin &lt;a style=&quot;font-weight: bold;&quot; href=&quot;http://texlipse.sourceforge.net/&quot;&gt;Texlipse&lt;/a&gt;.  It seems to be still in its infancy, but works fine for general needs.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Has command completion with Ctrl+space.&lt;/li&gt;&lt;li&gt;Can invoke &lt;tt&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;latex&lt;/span&gt;&lt;/tt&gt; command internally to compile the project.&lt;/li&gt;&lt;li&gt;Can spawn &lt;tt&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;xdvi&lt;/span&gt;&lt;/tt&gt; for viewing compiled dvi files.&lt;/li&gt;&lt;li&gt;Can handle complicated projects with &lt;tt&gt;\input&lt;/tt&gt; and &lt;tt&gt;\include&lt;/tt&gt; commands.&lt;/li&gt;&lt;li&gt;Can keep all the temporary files in a separate directory.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Confusing, irritating, and missing features:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;It does not have a separate perspective. (Still, it doesn&#39;t matter, once installed, it enable additional menus when you open a &lt;tt&gt;.tex&lt;/tt&gt; file.)&lt;/li&gt;&lt;li&gt;You better compile with the &quot;build automatically&quot; ON. Otherwise, you will be force to do a lot of &quot;clean, build.&quot;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;There is no way to select a text and apply a latex command to it (for example, change the font style to italics or bold.)&lt;/li&gt;&lt;li&gt;Auto-format does not work.&lt;/li&gt;&lt;li&gt;Working with spell-check is not that intuitive.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://maniyfinds.blogspot.com/feeds/2356680786783125222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3052199398307521229/2356680786783125222' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/2356680786783125222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/2356680786783125222'/><link rel='alternate' type='text/html' href='http://maniyfinds.blogspot.com/2009/07/texlipse-plugin.html' title='Texlipse Plugin'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10043934322845711493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3052199398307521229.post-3838236891070702124</id><published>2009-07-29T15:35:00.000-04:00</published><updated>2009-07-29T15:41:18.990-04:00</updated><title type='text'>Globally Installing LaTeX Style Files</title><content type='html'>If you want install a LaTeX style file in Ubuntu/Kubuntu globally so that all the users in the system can access it, put it inside a directory (say &lt;tt&gt;misc&lt;/tt&gt;) in &lt;tt&gt;/usr/share/texmf-texlive/tex/latex&lt;/tt&gt;  and run the &lt;tt&gt;&lt;b&gt;mktexlsr&lt;/b&gt;&lt;/tt&gt; command from a command line. You have to have root privileges for both the above steps.</content><link rel='replies' type='application/atom+xml' href='http://maniyfinds.blogspot.com/feeds/3838236891070702124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3052199398307521229/3838236891070702124' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/3838236891070702124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/3838236891070702124'/><link rel='alternate' type='text/html' href='http://maniyfinds.blogspot.com/2009/07/globally-installing-latex-style-files.html' title='Globally Installing LaTeX Style Files'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10043934322845711493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3052199398307521229.post-7356741211115636774</id><published>2009-04-26T22:35:00.000-04:00</published><updated>2009-04-28T09:56:04.320-04:00</updated><title type='text'>Upgrading to Kubuntu 9.04</title><content type='html'>I have two desktops, one at home and another at office, installed exclusively with Kubuntu. I had them Kubuntu 8.10 (Intrepid) installed and, when Kubuntu 9.04 was released last Thursday (23rd April, 2009), I decided to upgrade my machines (simultaneously) with the new version. And, that&#39;s how I ended up wasting nearly two days...!&lt;br /&gt;&lt;h4 style=&quot;font-weight: bold; color: rgb(0, 0, 102);&quot;&gt;Upgrading Nightmares&lt;/h4&gt;OK, let&#39;s clear about one thing: the fault is half mine. But I am still peeved about how the other half made me go into this half. ;-) When I upgrade my machines from 8.04 to 8.10, which was a major upgrade because KDE moved from 3.x to 4.x, I didn&#39;t have this much trouble. Now, when I upgrade from 8.10 to 9.04, where KDE just moved from 4.1 to 4.2, things got messed up. I would say the blame is on the switching of package management tool -- from adept-manager to &lt;span style=&quot;font-family:courier new;&quot;&gt;KPackageKit&lt;/span&gt;; I don&#39;t have an actual proof to support my this claim though.&lt;br /&gt;&lt;br /&gt;My machines&#39; software manager informed me on Thursday that there is a version upgrade available, so I asked it to do the upgrade. Both my machines&#39; upgrade manager broke down in the middle of the upgrade saying the repository failed to respond. Everything went wrong from that point.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;My Lab Machine&lt;/b&gt;&lt;br /&gt;After the upgrade broke down, I restarted the version upgrade. Instead of downloading the remaining packages needed to upgrade the system properly, it immediately went into installing the already downloaded packages. It went fine and asked me to restart the machine after &#39;completely upgrading&#39; the system. When I did, my machine booted with Kubuntu 8.04 (which was left aside when I installed 8.10)! Again, the update manager informed me of new updates available, so I updated again. The packages that are updated/installed belonged to 9.04! I still hoped that after this everything will be fine. But after considerable amount of time spent on downloading the packages, the system informed me of a dependency problem and the installation crashed again. Confused about what to do now, I chose to do what came first into my mind -- I rebooted the system. Now things got worse and I was left with only a CLI. I tried all my best to recover the system, but I couldn&#39;t resolve the dependency issue. After wasting about 8 hours, I used a live CD to reinstall the OS from scratch. I got no problem there.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;My Home Machine&lt;/b&gt;&lt;br /&gt;Again, after the upgrade broke down, I restarted it and here things were better. The tool started from downloading missing packages and installed all of them; no dependency issues; no booting into old version. But when I rebooted the system, the system refused to load NVIDIA drivers to utilize my video card. Acccording to the OS&#39;s guidance, I switched to use a non-NVIDIA (&lt;span style=&quot;font-family:courier new;&quot;&gt;vesa&lt;/span&gt;) driver and my xserver booted with 800x600 resolution. I can do nothing to increase the resolution: I couldn&#39;t increase the resolution with the vesa driver and I couldn&#39;t use any of the supplied NVIDIA drivers (when I activate them, I couldn&#39;t start xserver.) As the next step, I downloaded the latest NVIDIA driver from NVIDIA website. When I tried to install it, it asked me to recompile the kernel. But I couldn&#39;t get the source code for the loaded kernel! Frustrated, I decided to go with the approach that worked in the lab -- reinstall the OS from scratch. But, at home, even that failed, when the installation terminated with the &quot;&lt;span style=&quot;font-family:courier new;&quot;&gt;grub-install failed on hd0&lt;/span&gt;&quot; message! After multiple install attempts have failed, I have almost decided that my hard disk has gone bad. As usual, I &quot;consulted&quot; Google to resolve this problem. By deciphering number of posts in different forums, I decided to try installing &lt;span style=&quot;font-family:courier new;&quot;&gt;grub&lt;/span&gt; manually and that finally worked (ha!) After I have created the proper device-map file, I reinstall the system and it smoothly went pass the point where it got struck earlier. A reboot brought my system live without any problem in video. I enabled the NVIDIA driver later (the recommended one) to enjoy all the sweetness of the KDE 4.2 (even though the default driver brings up the video card with proper resolution and color, some desktop effects can be enabled only when a NVIDIA driver is activated.)&lt;br /&gt;&lt;br /&gt;I think that I got the &quot;grub-install failed&quot; message, because &lt;span style=&quot;font-family:courier new;&quot;&gt;grub-install&lt;/span&gt; conflicted with the &lt;span style=&quot;font-family:courier new;&quot;&gt;grub&lt;/span&gt; files with my 8.10 (or is it 8.04?) installation (I didn&#39;t format the drive.) Manually launching &lt;span style=&quot;font-family:courier new;&quot;&gt;grub-install&lt;/span&gt; corrected the files, after which the installation went smooth. May be I should have done this at the time when the version upgrade complained about loaded kernel not supporting the provided NVIDIA driver. I should have used the &lt;span style=&quot;font-family:courier new;&quot;&gt;upgrade-grub&lt;/span&gt; command to rewrite my grub &lt;span style=&quot;font-family:courier new;&quot;&gt;menu.lst&lt;/span&gt; file and I might have saved about 6 hours I spent on reinstalling the system from scratch! But who expected an upgrade not to have updated the grub files!&lt;br /&gt;&lt;br /&gt;I also suspect that the things got screwed up, because my machines actually had both 8.10 and 8.04 installed earlier. When I upgraded from 8.10 to 9.04, the upgrade removed the 8.10 installation, but, I think, kept the 8.04 (with KDE 3.x) which made things messed up.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;So, after all these struggle, everything is fine. Of course I had to reinstall additional software I needed, such as Firefox, LaTex, Java, Eclipse, Acrobat Reader, etc. As far as I am concerned, the verdict is still out on the new package manager. But the trusty &lt;span style=&quot;font-family:courier new;&quot;&gt;apt-get&lt;/span&gt; is always there.&lt;br /&gt;&lt;h4 style=&quot;font-weight: bold; color: rgb(0, 0, 102);&quot;&gt;Reinstalling Kubuntu Over an Existing Installation&lt;/h4&gt;One thing the *Ubuntu distributions lack is a recovery mode in the installation/live CD. Was there one like that, I am pretty certain that I could&#39;ve saved a lot of time. Now, the only way to &quot;recover&quot; a system seems to install a new system over an existing one, with the risk of loosing all the data except in &lt;span style=&quot;font-family:courier new;&quot;&gt;/home/&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Reinstalling is pretty easy:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Boot with a live CD and start the installation process.&lt;/li&gt;&lt;li&gt;When the partitioning process begins, choose the manual mode&lt;/li&gt;&lt;li&gt;Don&#39;t change the partition setup of the disk. Just enter the partitions&#39; mount point as it were earlier. If you don&#39;t know, use a shell from the live CD, mount different partitions to see what is inside, and choose the mount point accordingly.&lt;/li&gt;&lt;li style=&quot;color: rgb(204, 0, 0);&quot;&gt;Make sure &quot;format&quot; checkboxes are unchecked at least for the &lt;span style=&quot;font-family:courier new;&quot;&gt;/home&lt;/span&gt; partition (or the partition that contain the &lt;span style=&quot;font-family:courier new;&quot;&gt;/home&lt;/span&gt; directory&lt;/li&gt;&lt;li&gt;Proceed with the installation and finish it&lt;/li&gt;&lt;/ol&gt;In this way, you can be sure that the data in your home partition is saved. If you use the same username for the new installation, you can safely login to your old account without any problem with the new OS version. Anyway, just backup your data with live CD just to be extra-confident.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(0, 0, 102);&quot;&gt;Love the New KDE 4.2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;After all these struggle, things are pretty good. I really like the new KDE. Of course, it borrows a lot from both Vista and Mac, but why not? The taking the best of both of these, KDE looks better. I feel that KDE 4.2 is much more stable than KDE 4.1&lt;/span&gt;. The plasma looks better and works better (still not 100% though.) Another think I really appreciate is the performance of GTK applications in KDE. Earlier whenever I do &#39;heavy&#39; browsing (lot of javascripts, images, etc.), &lt;span style=&quot;font-family:courier new;&quot;&gt;firefox&lt;/span&gt; used to crash; I had to restart &lt;span style=&quot;font-family:courier new;&quot;&gt;firefox&lt;/span&gt; about 10 times a day. Now no crashes; When I used &lt;span style=&quot;font-family:courier new;&quot;&gt;Eclipse&lt;/span&gt;, the plasma panel sometimes used to vanish or behave oddly. Now it is not the case. The only issue I still see is that the image libraries are still have to improve a lot. It takes a noticeable amount of time to load big image files (big in terms of either by resolution or file size). It degrades the experience with graphics/photo softwares. I hope the future updates will further improve the quality of KDE. In any case, now I am not thinking about KDE 3.x as a lost lover any more. :-)</content><link rel='replies' type='application/atom+xml' href='http://maniyfinds.blogspot.com/feeds/7356741211115636774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3052199398307521229/7356741211115636774' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/7356741211115636774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/7356741211115636774'/><link rel='alternate' type='text/html' href='http://maniyfinds.blogspot.com/2009/04/upgrading-to-kubuntu-904.html' title='Upgrading to Kubuntu 9.04'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10043934322845711493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3052199398307521229.post-1428396851913993170</id><published>2008-09-15T11:43:00.000-04:00</published><updated>2008-09-15T11:53:29.133-04:00</updated><title type='text'>The &#39;tee&#39; Command</title><content type='html'>Sometimes you don&#39;t see an old, good thing, until you really need them.&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;tee&lt;/tt&gt; is Linux shell command using which you can redirect a program&#39;s output to the screen as the same time dumping it on a file.&lt;br /&gt;&lt;br /&gt;Usage:&lt;pre&gt;$ &amp;lt program&amp;gt | tee &amp;lt output_file&amp;gt&lt;/pre&gt;&lt;br /&gt;If it is your own program, make sure that it flushes the output time to time if you want to readily see the output on the screen.</content><link rel='replies' type='application/atom+xml' href='http://maniyfinds.blogspot.com/feeds/1428396851913993170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3052199398307521229/1428396851913993170' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/1428396851913993170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/1428396851913993170'/><link rel='alternate' type='text/html' href='http://maniyfinds.blogspot.com/2008/09/tee-command.html' title='The &#39;tee&#39; Command'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10043934322845711493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3052199398307521229.post-6208099203641520238</id><published>2008-08-20T10:36:00.000-04:00</published><updated>2008-08-20T10:52:42.778-04:00</updated><title type='text'>Boolean AND and OR</title><content type='html'>Yesterday, at the lab, we went into an argument on the boolean operator precedence. We always talk about precedence in arithmetic operators, but the precedence in boolean operator is hardly a topic of discussion. One of my colleague claimed that logical AND has higher priority than the logical OR; I sided with another saying that they have equal priority. So we ended up writing sample programs (in python) to verify our claims:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;if a or b and c:&lt;br /&gt;   print &quot;true1&quot;&lt;br /&gt;if a and b or c:&lt;br /&gt;   print &quot;true2&quot;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;It&#39;s embarrassing that we had this doubt at this stage of the academic life (6th year Ph.D.). But the funny thing is that we couldn&#39;t test our claims because of how the compiler works. The programing languages don&#39;t go into processing the second operant of a OR statement, if the first is &quot;true&quot;; same with a AND statement, if the first operant is &quot;false&quot;. I don&#39;t want to write the whole story of why this feature makes the tests invalid, but think about it and you will see it.&lt;br /&gt;&lt;br /&gt;Ultimately, we ended up looking at the language documentation (which we should&#39;ve done in the first place!) and found out my other colleague is right - the AND operator do have higher priority than the OR operator.&lt;br /&gt;&lt;br /&gt;Nothing new in this story, but I was just surprised to see how couldn&#39;t test the priority programmatically.</content><link rel='replies' type='application/atom+xml' href='http://maniyfinds.blogspot.com/feeds/6208099203641520238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3052199398307521229/6208099203641520238' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/6208099203641520238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/6208099203641520238'/><link rel='alternate' type='text/html' href='http://maniyfinds.blogspot.com/2008/08/boolean-and-and-or.html' title='Boolean AND and OR'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10043934322845711493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3052199398307521229.post-8465626694423793301</id><published>2008-07-06T16:41:00.000-04:00</published><updated>2008-07-06T16:42:58.890-04:00</updated><title type='text'>Google Search Tricks</title><content type='html'>Here is a nice article from Lifehacker.com on top 10 Google search tricks.&lt;br /&gt;&lt;a href=&quot;http://lifehacker.com/339474/top-10-obscure-google-search-tricks&quot;&gt;http://lifehacker.com/339474/top-10-obscure-google-search-tricks&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://maniyfinds.blogspot.com/feeds/8465626694423793301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3052199398307521229/8465626694423793301' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/8465626694423793301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/8465626694423793301'/><link rel='alternate' type='text/html' href='http://maniyfinds.blogspot.com/2008/07/google-search-tricks.html' title='Google Search Tricks'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10043934322845711493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3052199398307521229.post-5691746135076083878</id><published>2008-06-18T22:07:00.000-04:00</published><updated>2008-06-18T22:37:16.222-04:00</updated><title type='text'>Firefox 3 Add-Ons and Other Stuffs</title><content type='html'>As a person who uses Firefox on three different computers regularly, synchronizing bookmarks is very essential to me. Earlier I was using &lt;span style=&quot;font-weight:bold;&quot;&gt;Google FF Sync&lt;/span&gt;, but it is discontinued with FF3. Fortunately I found &lt;a href=&quot;http://www.foxmarks.com/&quot;&gt;Foxmarks&lt;/a&gt;. It works great for my need.&lt;br /&gt;&lt;br /&gt;Another problem I had was that I can not access some of the private web pages of my research group at UofT from home - the access is denied for external (to UofT) IP addresses. The proper solution is to setup a VPN connection. But, once the VPN is activated, everything goes through the VPN resulting in unnecessary traffic going through UofT. &lt;a href=&quot;http://foxyproxy.mozdev.org/&quot;&gt;FoxyProxy&lt;/a&gt; is a great FF extension to solve this problem. It can filter my http queries so that only a selected queries go through UofT. The only problem is to create an ssh connection to my lab computer and keep it alive all the time. Still, you can safely put the ssh connection in the background using &lt;span style=&quot;font-style:italic;&quot;&gt;-fN&lt;/span&gt; options. The additional benefit of using FoxyProxy is that now I can access premium websites like IEEEExplore and Oxford Online Dictionary from home (UofT has a enterprise subscription to these websites.)&lt;br /&gt;&lt;br /&gt;Another excellent extension I am using is &lt;a href=&quot;http://www.xuldev.org/firegestures/&quot;&gt;FireGestures&lt;/a&gt;: it let you perform many menu actions by drawing figures using mouse (like the graffiti handwriting recognition.) If you are a &quot;mouse-man&quot;, it is an essential FF extension; but even for a &quot;shortcut-key-man&quot; like me, it helps a lot.&lt;br /&gt;&lt;br /&gt;Do you know now you can now make the FF to call gmail compose box whenever you click a &quot;mailto:&quot; link? It is a new feature introduced with FF3. This &lt;a href=&quot;http://digiwanderlust.blogspot.com/2008/05/firefox-3-gmail-web-mail-handler-bug.html&quot;&gt;link&lt;/a&gt; has detailed instructions.</content><link rel='replies' type='application/atom+xml' href='http://maniyfinds.blogspot.com/feeds/5691746135076083878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3052199398307521229/5691746135076083878' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/5691746135076083878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/5691746135076083878'/><link rel='alternate' type='text/html' href='http://maniyfinds.blogspot.com/2008/06/firefox-3-add-ons-and-other-stuffs.html' title='Firefox 3 Add-Ons and Other Stuffs'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10043934322845711493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3052199398307521229.post-5688654655667506397</id><published>2008-06-18T21:38:00.000-04:00</published><updated>2008-06-18T22:06:56.622-04:00</updated><title type='text'>Firefox 3 Look &amp; Feel</title><content type='html'>Yeah, yeah, I too downloaded it on the &quot;Download Day&quot; -- in three computers actually: office Linux, home Linux, and Laptop Windows. :-)&lt;br /&gt;&lt;br /&gt;One of the nice features of the new Firefox 3 is that its look &amp; feel is integrated with the &lt;a href=&quot;http://www.mozilla.com/en-US/firefox/features/#native&quot;&gt;native look&lt;/a&gt; of the operating systems. It is generally not obvious in Windows, because all the Windows applications have to follow the rule. But it is very obvious in Linux (no idea about Mac platform.)&lt;br /&gt;&lt;br /&gt;However, there is a catch using Firefox 3 with KDE desktop environment, because Firefox 3 is incorporated with the GTK widget set, whereas KDE uses the QT widget set. Still I was able to get the KDE look &amp; feel in Firefox 3 in my Kubuntu system using Kubuntu&#39;s system settings. Go to the &lt;span style=&quot;font-style:italic;&quot;&gt;System Settings -&gt; Appearance -&gt; GTK Styles and Fonts&lt;/span&gt; and make sure all the GTK components are set to use the KDE settings.&lt;br /&gt;&lt;br /&gt;Before I realized that FF3 is using native look &amp; feel, I had this irritating widget set in FF3. Only after I searched through Google for a while, I realized that I can not change anything in FF3, but have to change my KDE look &amp; feel. I was using Domino widget style, which was fine outside FF3 but terrible for gmail. Once I switched to QtCurve widget style (just my preference, nothing particular), everything was good.&lt;br /&gt;&lt;br /&gt;FF3&#39;s native theme on Linux is boring, and many other themes from Mozilla web site behave oddly. After a few iterations, I am now settled with &quot;&lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/7379&quot;&gt;Phoenity Reborn&lt;/a&gt;&quot; theme; it looks pretty good!</content><link rel='replies' type='application/atom+xml' href='http://maniyfinds.blogspot.com/feeds/5688654655667506397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3052199398307521229/5688654655667506397' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/5688654655667506397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/5688654655667506397'/><link rel='alternate' type='text/html' href='http://maniyfinds.blogspot.com/2008/06/firefox-3-look-feel.html' title='Firefox 3 Look &amp; Feel'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10043934322845711493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3052199398307521229.post-131252574316265654</id><published>2008-06-11T13:47:00.000-04:00</published><updated>2008-06-11T13:51:19.324-04:00</updated><title type='text'>Enabling Java API Documentation Inside Eclipse</title><content type='html'>If you enable Java API documentation inside Eclipse, you can access relevant part of it, using mouseover or F2 key on any Java native class and method names. For this, you have to first download and install java documentation (if not already installed) and specify its location in the Eclipse properties:&lt;br /&gt;&lt;a href=&quot;http://ubuntuforums.org/showthread.php?t=476280&quot;&gt;http://ubuntuforums.org/showthread.php?t=476280&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://maniyfinds.blogspot.com/feeds/131252574316265654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3052199398307521229/131252574316265654' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/131252574316265654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/131252574316265654'/><link rel='alternate' type='text/html' href='http://maniyfinds.blogspot.com/2008/06/enabling-java-api-documentation-inside.html' title='Enabling Java API Documentation Inside Eclipse'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10043934322845711493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3052199398307521229.post-5152316886921902505</id><published>2008-06-09T07:24:00.000-04:00</published><updated>2008-06-09T07:31:56.270-04:00</updated><title type='text'>Clock Speed-Up After Kernel Update</title><content type='html'>My Kubuntu desktop suddenly got a clock speed-up after I upgraded my Kernel to 2.6.24-19 -- the mouse pointer blinked twice as fast and video and audio started playing with 2x speed by default! I found out that it is probably because I am running a 32bit system on AMD64 dual core. I then found a nice hack on the grub entries to correct the speed-up:&lt;br /&gt;&lt;a href=&quot;http://ubuntuforums.org/showthread.php?t=75281&quot; target=&quot;new&quot;&gt;http://ubuntuforums.org/showthread.php?t=75281&lt;/a&gt;&lt;br /&gt;I used the &quot;noapic acpi=off&quot; option and now things are fine.</content><link rel='replies' type='application/atom+xml' href='http://maniyfinds.blogspot.com/feeds/5152316886921902505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3052199398307521229/5152316886921902505' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/5152316886921902505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/5152316886921902505'/><link rel='alternate' type='text/html' href='http://maniyfinds.blogspot.com/2008/06/clock-speed-up-after-kernel-update.html' title='Clock Speed-Up After Kernel Update'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10043934322845711493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3052199398307521229.post-8786841864553379063</id><published>2008-03-14T14:58:00.000-04:00</published><updated>2008-03-14T14:59:57.946-04:00</updated><title type='text'>Installing sun java 6 and setting up eclipse in Ubuntu</title><content type='html'>I found out this nice guide:&lt;br /&gt;&lt;a href=&quot;http://ubuntuforums.org/showthread.php?t=201378&quot;&gt;http://ubuntuforums.org/showthread.php?t=201378&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://maniyfinds.blogspot.com/feeds/8786841864553379063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3052199398307521229/8786841864553379063' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/8786841864553379063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/8786841864553379063'/><link rel='alternate' type='text/html' href='http://maniyfinds.blogspot.com/2008/03/installing-sun-java-6-and-setting-up.html' title='Installing sun java 6 and setting up eclipse in Ubuntu'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10043934322845711493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3052199398307521229.post-5240126784324939201</id><published>2008-03-14T12:20:00.000-04:00</published><updated>2008-03-14T12:25:49.903-04:00</updated><title type='text'>Ant/Eclipse Problem in Kubuntu/Ubuntu</title><content type='html'>After I have started using Sun Java 6 (java-1.5.0-sun), I encountered a problem with using ant in Eclipse (I didn&#39;t try from the command line) - eclipse started complaining about the package org.apache.tools. After some digging in the web, I found out that it is a bug in Ubuntu:&lt;br /&gt;&lt;a href=&quot;https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/134537&quot;&gt;https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/134537&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I used the solution provided by the user Mikael Nilsson and I got it working.</content><link rel='replies' type='application/atom+xml' href='http://maniyfinds.blogspot.com/feeds/5240126784324939201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3052199398307521229/5240126784324939201' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/5240126784324939201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/5240126784324939201'/><link rel='alternate' type='text/html' href='http://maniyfinds.blogspot.com/2008/03/anteclipse-problem-in-kubuntuubuntu.html' title='Ant/Eclipse Problem in Kubuntu/Ubuntu'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10043934322845711493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3052199398307521229.post-810705673145193567</id><published>2008-02-24T11:03:00.000-05:00</published><updated>2008-02-24T11:26:11.314-05:00</updated><title type='text'>SSH through SSH tunnel</title><content type='html'>I had a problem of having the ports on my lab machine blocked to external connections by a firewall. In other words, I couldn&#39;t connect to my lab machine&#39;s ssh server from home. But I had ssh access to the firewall. So I created a ssh tunnel to my lab machine as follows:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;$ ssh -fN -L 9500:my.lab.machine:22 myfirewalllogin@the.firewall.machine&lt;/tt&gt;&lt;br /&gt;This will create a ssh tunnel in the background through the firewall machine and maps my lab machine&#39;s ssh port (22) to my localhost&#39;s port 9500 (can be any higher ports).&lt;br /&gt;&lt;br /&gt;Now I can create the ssh connection to my lab machine as if it is in my local host:&lt;br /&gt;&lt;tt&gt;$ ssh -p 9500 mylablogin@localhost&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;If you want to do scp files you can do similar but with -P (capital P) instead -p.&lt;br /&gt;&lt;tt&gt;$ scp -P 9500 mylablogin@localhost:labfiles localdir&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;Anybody can figure it out my carefully reading the ssh man page ;-) and this approach works for accessing any remote, behind-the-firewall applications (mail server, rsync, etc.)</content><link rel='replies' type='application/atom+xml' href='http://maniyfinds.blogspot.com/feeds/810705673145193567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3052199398307521229/810705673145193567' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/810705673145193567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3052199398307521229/posts/default/810705673145193567'/><link rel='alternate' type='text/html' href='http://maniyfinds.blogspot.com/2008/02/ssh-through-ssh-tunnel.html' title='SSH through SSH tunnel'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10043934322845711493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry></feed>