<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Learning on Amit Agarwal Linux Blog</title>
    <link>/categories/learning/</link>
    <description>Recent content in Learning on Amit Agarwal Linux Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Sun, 25 Aug 2024 00:00:00 +0530</lastBuildDate>
    
	<atom:link href="/categories/learning/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Hackernews In Your Inbox</title>
      <link>/2024/08/25/2024-08-25-HackernewsInYourInbox/</link>
      <pubDate>Sun, 25 Aug 2024 00:00:00 +0530</pubDate>
      
      <guid>/2024/08/25/2024-08-25-HackernewsInYourInbox/</guid>
      <description>&lt;p&gt;If you do not want to subscribe to any newsletter but still want to get some news delivered to you inbox then this post is for you.&lt;/p&gt;
&lt;p&gt;First you need to get a script that can pull the hacker-news articles for you and you can find my script &lt;a href=&#34;https://github.com/raj77in/pentools/blob/main/misc/hacker-news.py&#34;&gt;here&lt;/a&gt;. You can modify this script, specially the line: &lt;code&gt;for id in trending_list[:50]:&lt;/code&gt; to change the number of posts that you would like to see in the mail.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Firefox addons for hacking</title>
      <link>/2022/04/23/Firefox-addons-for-hacking/</link>
      <pubDate>Sat, 23 Apr 2022 00:00:00 +0530</pubDate>
      
      <guid>/2022/04/23/Firefox-addons-for-hacking/</guid>
      <description>&lt;p&gt;#Firefox addons&lt;/p&gt;
&lt;p&gt;Here are some good and useful addons for hacking. I have mentioned some old addons which are quire good but not to be found on firefox addon site :(&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-standard/&#34;&gt;Foxy Proxy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/cookie-editor/&#34;&gt;Cookie Editor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/wappalyzer/&#34;&gt;WappAlyzer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/cliget/?utm_source=addons.mozilla.org&amp;amp;utm_medium=referral&amp;amp;utm_content=search&#34;&gt;Cliget&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher/&#34;&gt;User Agent Switcher&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/noscript&#34;&gt;NoScript&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/private-relay&#34;&gt;Firefox Relay&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/utm-tracking-token-stripper&#34;&gt;Tracking Token Stripper&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/hack-resources&#34;&gt;Hack Resources&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/permission-to-hack&#34;&gt;Permission to Hack&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/hackbar-free&#34;&gt;Hackbar v2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/antibrowserspy-trackingblocker&#34;&gt;AntiBrowserSpy TrackingBlocker&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/&#34;&gt;GreaseMonkey&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/firebug/&#34;&gt;FireBug&lt;/a&gt; &lt;strong&gt;Does not exist anymore&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/live-http-headers/&#34;&gt;Live HTTP headers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/tamper-data-for-ff-quantum/&#34;&gt;Tamper Data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-us/firefox/addon/websecurify/&#34;&gt;WebSecurity&lt;/a&gt; &lt;strong&gt;Does not exist&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/penetration-testing-kit/&#34;&gt;Penetration Tester Kit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/builtwith/&#34;&gt;Built With&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/hacktools/&#34;&gt;Hack Tools&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/link-gopher/&#34;&gt;Link Goher&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/copy-frame-or-page-url&#34;&gt;Copy Framer or Page URL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/&#34;&gt;Multi Account Containers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/retire-js/&#34;&gt;retire.js&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    
    <item>
      <title>Creating and using ackrc</title>
      <link>/2022/04/02/Creating-and-using-ackrc/</link>
      <pubDate>Sat, 02 Apr 2022 00:00:00 +0530</pubDate>
      
      <guid>/2022/04/02/Creating-and-using-ackrc/</guid>
      <description>&lt;p&gt;&lt;strong&gt;ack&lt;/strong&gt; is a fantastic replacement for grep and probably much more than grep. Here is what the dnf info has to say about ack&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Name         : ack
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Architecture : noarch
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Summary      : Grep-like text finder
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;URL          : http://beyondgrep.com/
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;License      : Artistic 2.0
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Description  : Ack is designed as a replacement for grep.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;And their websites says -&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Designed for programmers with large heterogeneous trees of source code, ack is written in portable Perl 5 and takes advantage of the power of Perl&amp;rsquo;s regular expressions.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>mussh-run-commands-on-multiple-hosts</title>
      <link>/2022/03/06/mussh-run-commands-on-multiple-hosts/</link>
      <pubDate>Sun, 06 Mar 2022 00:00:00 +0530</pubDate>
      
      <guid>/2022/03/06/mussh-run-commands-on-multiple-hosts/</guid>
      <description>&lt;p&gt;&lt;strong&gt;mussh&lt;/strong&gt; allows you to run command/commands on multiple hosts
at the same time. If you have farm of server setup with passwordless
ssh or with same password (which is generally the case), then using
mussh you can either check all the servers for some output or fix
something or maybe update all the packages. How cool is that :)&lt;/p&gt;
&lt;p&gt;Here is description of this package from &lt;em&gt;dnf&lt;/em&gt; repo&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Name         : mussh
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Version      : 1.0
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Release      : 18.fc35
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Architecture : noarch
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Size         : 20 k
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Source       : mussh-1.0-18.fc35.src.rpm
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Repository   : fedora
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Summary      : Multihost SSH wrapper
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;URL          : http://www.sourceforge.net/projects/mussh
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;License      : GPL+
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Description  : Mussh is a shell script that allows you to execute a command or
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;             : script over ssh on multiple hosts with one command. When possible
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;             : mussh will use ssh-agent and RSA/DSA keys to minimize the need to
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;             : enter your password more than once.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>virt-install with cloud-init</title>
      <link>/2022/02/05/virt-install-with-cloud-init/</link>
      <pubDate>Wed, 09 Feb 2022 00:00:00 +0530</pubDate>
      
      <guid>/2022/02/05/virt-install-with-cloud-init/</guid>
      <description>&lt;p&gt;If you have not heard about cloud-init then you should definately search for it and learn about cloud-config as well. You can find the documentation for &lt;a href=&#34;https://cloudinit.readthedocs.io/en/latest/&#34;&gt;cloud-config here&lt;/a&gt;. It is used for configuring VMs when running in cloud environments. Specially useful to inject the ssh keys or set the root password but you can do anything in the cloud-config as there is a section where you can run bash commands. While this is useful for cloud instances, you can make use of this feature when running your vm with qemu or libvirtd. All you need to do is either attach a iso disc with user-data and meta-data files in it or even simpler, you can use virt-install command. The command that I use is as follows&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Stay safe from phising</title>
      <link>/2022/02/05/stay-safe-from-phising/</link>
      <pubDate>Sat, 05 Feb 2022 00:00:00 +0530</pubDate>
      
      <guid>/2022/02/05/stay-safe-from-phising/</guid>
      <description>&lt;p&gt;Generally when you get a phising mail, the biggest challenge is
finding if the site is genuine or not. And URL shortening services
do not make it any easy. Earlier I had posted about using &lt;em&gt;curl&lt;/em&gt;
to expand the url &lt;a href=&#34;/2022/01/09/curl-to-expand-short-url/&#34;&gt;in this post&lt;/a&gt;.
However you might not be on a Linux terminal all the time (for example -
you are checking something on your mobile), in that case what do you do?&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Curl to exapnd short url</title>
      <link>/2022/01/09/curl-to-expand-short-url/</link>
      <pubDate>Sun, 09 Jan 2022 00:00:00 +0530</pubDate>
      
      <guid>/2022/01/09/curl-to-expand-short-url/</guid>
      <description>&lt;p&gt;Many times I receive short urls in mail and other places like
chats and messages. I first like to see the destination before
I click on the url. I was looking for some way to do this in bash.
I realized that this could be very simply done by looking at the Location
header in the response from curl.&lt;/p&gt;
&lt;p&gt;Example&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl -I https://bit.ly/32WwCp4&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;grep location
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;and the output should be something like&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Sleep infinitely in bash</title>
      <link>/2020/12/19/bash-sleep-infinitely/</link>
      <pubDate>Sun, 19 Dec 2021 02:38:57 +0530</pubDate>
      
      <guid>/2020/12/19/bash-sleep-infinitely/</guid>
      <description>&lt;p&gt;I am sure that you would have got a lot of instances
where you have wanted to sleep for infinity and ended
up doing this&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;while&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[[&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	sleep &lt;span class=&#34;m&#34;&gt;3600&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;or some other such similar loop to sleep for some time
and wrap it in infinite loop.&lt;/p&gt;
&lt;p&gt;I learned something new recently and found it very useful.
You can do the above with&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sleep infinity
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;and you can use that even for a while loop&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Ignore case when completing file names in bash</title>
      <link>/2020/08/30/Ignore-case-when-completing-file-names-in-bash/</link>
      <pubDate>Sat, 11 Dec 2021 02:38:57 +0530</pubDate>
      
      <guid>/2020/08/30/Ignore-case-when-completing-file-names-in-bash/</guid>
      <description>&lt;p&gt;Sometimes you don&amp;rsquo;t want to have the bash completion work with
case completion. There could be several reasons like one I dont
like is the default &lt;strong&gt;xdg&lt;/strong&gt; folders starting with &lt;em&gt;capital&lt;/em&gt; letters.&lt;/p&gt;
&lt;p&gt;So, if you know that bash uses readline for a lot of configuration
then there is a very easy solution, you can just run this command
and start a new bash shell :)&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;set completion-ignore-case on&amp;#39;&lt;/span&gt; &amp;gt;&amp;gt; ~/.inputrc
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Enjoy 👍&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Warn when battery is low</title>
      <link>/2020/08/30/acpi-warn/</link>
      <pubDate>Sun, 30 Aug 2020 00:05:57 +0530</pubDate>
      
      <guid>/2020/08/30/acpi-warn/</guid>
      <description>&lt;p&gt;I am very lazy to look at battery status and want to be warned when the battery
is low. This means that even if I am away from the laptop, I can be warned that
laptop is about to poweroff due to battery low. So, what kind of alerts I can have, many -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;zenity message box&lt;/li&gt;
&lt;li&gt;email&lt;/li&gt;
&lt;li&gt;sms with twillio&lt;/li&gt;
&lt;li&gt;Telegram message
and possibility is endless.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;18
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;19
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;20
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;21
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;22
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-gdscript3&#34; data-lang=&#34;gdscript3&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;LOW&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;35&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;## This si the lowest percentage at which I want the alerts.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;## Parse the acpi statue and decide if alert needs to be sent&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;per&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=$&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;usr&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;bin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acpi&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;b&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;awk&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;{print $4}&amp;#39;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sed&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;s/%.*//&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# source ~/bin/cron-scripts/sendsms.sh&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[[&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;usr&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;bin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acpi&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;grep&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;c&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Full\|Charging&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;]]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;#This is when the AC is connected.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;exit&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[[&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;z&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;per&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;per&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;LOW&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;]]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;# sendsms &amp;#34;Battery is at $per%&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;export&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;sub&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;Battery is at $per%&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Battery is running out : $per&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;usr&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sbin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sendmail&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;t&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;display_msg&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sh&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;ACPI Warn&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Battery is at $per%&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;ACPI Warn&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Battery is at $per%&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;home&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;amitag&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;bin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;twilio&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;919535210501&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;zenity&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;--&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;warning&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;--&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;text&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;Battery is at $per%&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Put this script somewhere and schedule in cron for every minute and enjoy.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Some good find alias.</title>
      <link>/2020/08/16/find-alias/</link>
      <pubDate>Sun, 23 Aug 2020 11:05:57 +0530</pubDate>
      
      <guid>/2020/08/16/find-alias/</guid>
      <description>&lt;p&gt;Here are some interesting alias&amp;rsquo;s that you may want to add to your
bashrc file or where-ever else you add your aliase&amp;rsquo;s. Very useful if you
use find commonly.&lt;/p&gt;
&lt;p&gt;There are four aliases defined here and have a comment explaining what
it does. but these are so simple and useful that you probably dont even
need the comments.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# ff:  to find a file under the current directory&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ff &lt;span class=&#34;o&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt; find . -name &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$@&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# ffs: to find a file whose name starts with a given string&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ffs &lt;span class=&#34;o&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt; find . -name &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$@&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;*&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# ffe: to find a file whose name ends with a given string&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ffe &lt;span class=&#34;o&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt; find . -name &lt;span class=&#34;s1&#34;&gt;&amp;#39;*&amp;#39;&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$@&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# very very useful function: for finding files with ignore case, just type &amp;#34;f &amp;lt;part of filename&amp;gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# This in combination with alias for &amp;#39;g&amp;#39; is deadly.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;#&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;f &lt;span class=&#34;o&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt; find . -iname &lt;span class=&#34;s1&#34;&gt;&amp;#39;*&amp;#39;&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$@&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;*&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Hope this is useful for you.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Books menu with bash</title>
      <link>/2020/08/16/books-menu-with-bash/</link>
      <pubDate>Sun, 16 Aug 2020 11:05:57 +0530</pubDate>
      
      <guid>/2020/08/16/books-menu-with-bash/</guid>
      <description>&lt;p&gt;If you have a folder full of ebooks in various formats and not necessarily
one sigle format and you want to have a quick menu to browse though your collection
without requiring to open a File Manager then you are going to love this script.&lt;/p&gt;
&lt;p&gt;The scripts works by allowing you to browse to the requied folder of your choice
and once you select the file, then using &lt;code&gt;xdg-open&lt;/code&gt; to open the file with your default
viewer.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Podman repositories on ubuntu like distros</title>
      <link>/2020/08/01/podman-on-ubuntu-like-distro/</link>
      <pubDate>Sat, 01 Aug 2020 08:38:57 +0530</pubDate>
      
      <guid>/2020/08/01/podman-on-ubuntu-like-distro/</guid>
      <description>&lt;p&gt;Recently I installed podman on ubuntu based dervative. I like podman a
lot but to my distress I found that after installation, I was not able
to search or run any containers. Found out that the repositories
were not configured. So, if you run into such issues, then here is what
you need to do. You need to create a file &lt;em&gt;/etc/containers/registries.conf&lt;/em&gt;.
And the contents of the file for just one docker hub registries would be -&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Pygmentize Styles</title>
      <link>/2020/07/26/pygmentize-styles/</link>
      <pubDate>Sun, 26 Jul 2020 18:38:57 +0530</pubDate>
      
      <guid>/2020/07/26/pygmentize-styles/</guid>
      <description>&lt;p&gt;I have recently started using pygmentize for looking at my code in terminal.
A very good and native way to do this is to use pygmentize. If you do not know
about pygmentize then&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Highlight the input file and write the result to &lt;outfile&gt;.
If no input file is given, use stdin, if -o is not given, use stdout.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So, you can simply pass the script or source code through pygmentize and
get a lovely color output with code highlighting in the terminal and this
can be very useful.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>scripting – performance improvement with file open</title>
      <link>/2020/04/20/scripting-performance-improvement-file-open/</link>
      <pubDate>Mon, 20 Apr 2020 01:01:37 +0000</pubDate>
      
      <guid>/2020/04/20/scripting-performance-improvement-file-open/</guid>
      <description>&lt;p&gt;Sometimes just one line of code can make all the difference. I will show you with example.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Here is script with 2 functions. Both are writing some lines of text to a file. First function, “a” I have used the redirection to write to file. Function “b”, I have opened a file descriptor with “&amp;gt;” before going into the loop and use that reference for writing to the file. (This concept remains same for any scripting or programming language).&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>List all the tags for a image on docker hub</title>
      <link>/2020/03/16/list-tags-image-docker-hub/</link>
      <pubDate>Mon, 16 Mar 2020 00:58:19 +0000</pubDate>
      
      <guid>/2020/03/16/list-tags-image-docker-hub/</guid>
      <description>&lt;p&gt;Something that you may want to know sometimes and docker cli does not show by default is all the tags for the image on docker hub. Here is example to list all tags fro the centos image&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;curl https://registry.hub.docker.com/v2/repositories/library/centos/tags |jq &#39;.&#34;results&#34;[][&#34;name&#34;]&#39;&lt;/pre&gt;
&lt;p&gt;The example is for a v2 registry. The output for v1 is different than v2 registry. For a v1 registry, you can use command like below&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;curl https://registry.hub.docker.com/v1/repositories/centos/tags |jq &#39;.[][&#34;name&#34;]&#39;&lt;/pre&gt;</description>
    </item>
    
    <item>
      <title>kitty terminal themes</title>
      <link>/2020/03/09/kitty-terminal-themes/</link>
      <pubDate>Mon, 09 Mar 2020 00:47:24 +0000</pubDate>
      
      <guid>/2020/03/09/kitty-terminal-themes/</guid>
      <description>&lt;p&gt;Kitty is a very nice and fast terminal that uses GPU, you can find more information &lt;a href=&#34;https://github.com/kovidgoyal/kitty&#34;&gt;here&lt;/a&gt;. For this terminal there are lot of themes available that you can checkout on the kitty themes github page &lt;a href=&#34;https://github.com/dexpota/kitty-themes&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;You can checkout the themes with&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;git clone https://github.com/dexpota/kitty-themes ~/.config/kitty/kitty-themes
&lt;/pre&gt;
&lt;p&gt;Once you have done that, you can use the theme with adding a line in kitty.conf as :&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;include &lt;theme file name with path&gt;&lt;/p&gt;
&lt;/blockquote&gt;</description>
    </item>
    
    <item>
      <title>unicode characters in urxvt terminal</title>
      <link>/2020/03/02/unicode-characters-urxvt-terminal/</link>
      <pubDate>Mon, 02 Mar 2020 01:00:31 +0000</pubDate>
      
      <guid>/2020/03/02/unicode-characters-urxvt-terminal/</guid>
      <description>&lt;p&gt;If you quickly want to type the unicode character in urxvt terminal, then try doing this:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Press Shift+Ctrl and then type the number for the unicode. 🙂&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Get the git url of current repo in clipboard</title>
      <link>/2019/12/30/git-url-current-repo-clipboard/</link>
      <pubDate>Mon, 30 Dec 2019 01:04:29 +0000</pubDate>
      
      <guid>/2019/12/30/git-url-current-repo-clipboard/</guid>
      <description>&lt;p&gt;Lot of times, I just want to copy the git url to clipboard. This is so common in my flow of work that I created an alias for it. Here it is:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;alias git-url=&#34;cat .git/config|awk &#39;/url/ {print $3}&#39;|xclip -i -selection clipboard&#34;&lt;/pre&gt;</description>
    </item>
    
    <item>
      <title>Script to try various themes from kitty terminal</title>
      <link>/2019/12/16/script-themes-kitty-terminal/</link>
      <pubDate>Mon, 16 Dec 2019 00:55:06 +0000</pubDate>
      
      <guid>/2019/12/16/script-themes-kitty-terminal/</guid>
      <description>&lt;p&gt;Here is the script. Very simple yet very useful script.&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;#!/bin/bash - 
#===============================================================================
#
#          FILE: kitty-theme.sh
# 
#         USAGE: ./kitty-theme.sh 
# 
#   DESCRIPTION: 
# 
#       OPTIONS: ---
#  REQUIREMENTS: ---
#          BUGS: ---
#         NOTES: ---
#        AUTHOR: Amit Agarwal (aka),
#  ORGANIZATION: Individual
#       CREATED: 12/06/2019 10:15
# Last modified: Fri Dec 06, 2019  10:41AM
#      REVISION:  ---
#===============================================================================

set -o nounset                              # Treat unset variables as an error

FOLDER=&#34;/git/terminal.sexy/dist/schemes&#34;  ### This is git folder where you have terminal.sexy cloned

if [[ ! -d $FOLDER ]]
then
    cd $FOLDER/../../../
    git clone https://github.com/stayradiated/terminal.sexy

fi

cd $FOLDER
tmp=$(mktemp /tmp/color-XXXXXXXX)
echo $tmp
files=$(find . -type f -name \*json)
for line in $(echo ${files[*]})
do
    echo &#34;Processing $line&#34;
    &amp;gt;$tmp
    echo &#34;# From $line.. processed by Amit Agarwal script&#34; &amp;gt;&amp;gt; $tmp
    sed -n -e &#39;/color/,/\],/ p&#39; $line | sed -e 1d -e &#39;$d&#39;| \
        sed &#39;s/[&#34;,]//g&#39;|awk &#39;{count++; print &#34;color&#34;count&#34;\t &#34;$1}&#39; &amp;gt;&amp;gt; $tmp
    grep ground $line |sed &#39;s/^ *//&#39; |sed &#39;s/[&#34;:,]//g&#39; &amp;gt;&amp;gt; $tmp

    kitty @ set-colors -a $tmp

    ls --color=auto ~
    read -p &#34;If you like the theme, just press l ::&#34; test
    if [[ $test == &#34;l&#34; ]]
    then
        rm -f ~/.config/kitty/theme.conf
        cp $tmp ~/.config/kitty/theme.conf
    fi
done
rm -f $tmp
&lt;/pre&gt;</description>
    </item>
    
    <item>
      <title>i3 – show mapped hotkeys</title>
      <link>/2019/12/02/i3-show-mapped-hotkeys/</link>
      <pubDate>Mon, 02 Dec 2019 01:05:19 +0000</pubDate>
      
      <guid>/2019/12/02/i3-show-mapped-hotkeys/</guid>
      <description>&lt;p&gt;Here is a simple script that can show you the hotkeys bound in ~/.config/i3/config :&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;#!/bin/bash - 
#===============================================================================
#
#          FILE: i3-showkeys.sh
# 
#         USAGE: ./i3-showkeys.sh 
# 
#   DESCRIPTION: 
# 
#       OPTIONS: ---
#  REQUIREMENTS: ---
#          BUGS: ---
#         NOTES: ---
#        AUTHOR: Amit Agarwal (aka)
#  ORGANIZATION: Individual
#       CREATED: 11/26/2019 14:22
# Last modified: Tue Nov 26, 2019  02:43PM
#      REVISION:  ---
#===============================================================================

set -o nounset                              # Treat unset variables as an error


&gt; /tmp/keys
cd ~/.config/i3
grep &#39;^bindsym $mod&#39; config|grep -v &#39;^#&#39;|grep -v &#39;move container to&#39;|grep -v &#39;workspace $ws&#39;|sed &#39;s/bindsym //&#39;|grep -v &#39;=&#39;|while read key line
do
    printf &#34;%20s\t?\t%s\n&#34; &#34;$key&#34; &#34;$line&#34;  &amp;gt;&amp;gt; /tmp/keys
done

xterm -e &#34;cat /tmp/keys; read -p &#39;press any key to continue&#39;&#34;
rm -f /tmp/keys
&lt;/pre&gt;
&lt;p&gt;And once this is done, you can bind the script in i3 config like this:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>check hard disk rpm or rotation speed</title>
      <link>/2019/09/23/check-hard-disk-rpm-or-rotation-speed/</link>
      <pubDate>Mon, 23 Sep 2019 01:00:50 +0000</pubDate>
      
      <guid>/2019/09/23/check-hard-disk-rpm-or-rotation-speed/</guid>
      <description>&lt;p&gt;Lot of times you want to check the disk rpm, especially on the servers to check if it is 7.2K or 10K or 15K rpm disk. How do you do this from linux terminal. Here it is :&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;sginfo -g /dev/&amp;lt;device&amp;gt;&lt;/pre&gt;
&lt;p&gt;Note that sginfo comes from sg3-utils.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ssh trick – ssh to remote host with bastion host</title>
      <link>/2019/09/16/ssh-trick-ssh-to-remote-host-with-bastion-host/</link>
      <pubDate>Mon, 16 Sep 2019 00:55:20 +0000</pubDate>
      
      <guid>/2019/09/16/ssh-trick-ssh-to-remote-host-with-bastion-host/</guid>
      <description>&lt;p&gt;Lot of times, you have to ssh to a server with bastion host. If you dont know what is bastion host then see this:&lt;/p&gt;
&lt;img class=&#34;alignnone size-medium wp-image-14322&#34; src=&#34;https://i2.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/2019/09/bastion.png?resize=300%2C184&#34; alt=&#34;bastion host&#34; width=&#34;300&#34; height=&#34;184&#34; srcset=&#34;https://i2.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/2019/09/bastion.png?resize=300%2C184 300w, https://i2.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/2019/09/bastion.png?w=620 620w&#34; sizes=&#34;(max-width: 300px) 100vw, 300px&#34; data-recalc-dims=&#34;1&#34; /&gt; 
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Now, in such cases, either you add an entry in “~/.ssh/config” to route the ssh through the bastion host or do ssh to bastion host and then ssh from there to the actual host. But wait, there is always a better way:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Check your session type – wayland or X11</title>
      <link>/2019/07/15/check-your-session-type-wayland-or-x11/</link>
      <pubDate>Mon, 15 Jul 2019 00:51:43 +0000</pubDate>
      
      <guid>/2019/07/15/check-your-session-type-wayland-or-x11/</guid>
      <description>&lt;p&gt;With both wayland and X11 in mainstream, its pretty easy to forget if you are running in Wayland or in X11. To check this here are the commands:&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;loginctl list-sessions
# The above command will show you all the sessions. Note the session number for your session

loginctl show-session &amp;lt;session number&amp;gt; -p Type&lt;/pre&gt;</description>
    </item>
    
    <item>
      <title>Running dnsmasq with NetworkManager in Fedora</title>
      <link>/2019/06/10/running-dnsmasq-with-networkmanager-in-fedora/</link>
      <pubDate>Mon, 10 Jun 2019 01:00:04 +0000</pubDate>
      
      <guid>/2019/06/10/running-dnsmasq-with-networkmanager-in-fedora/</guid>
      <description>&lt;p&gt;Here is a good link to do this:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://fedoramagazine.org/using-the-networkmanagers-dnsmasq-plugin/&#34;&gt;https://fedoramagazine.org/using-the-networkmanagers-dnsmasq-plugin/&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Split pcap to multiple files based on number of packets</title>
      <link>/2019/06/03/split-pcap-to-multiple-files-based-on-number-of-packets/</link>
      <pubDate>Mon, 03 Jun 2019 01:00:38 +0000</pubDate>
      
      <guid>/2019/06/03/split-pcap-to-multiple-files-based-on-number-of-packets/</guid>
      <description>&lt;p&gt;Here is a script that can use tshark to split a large pcap to multiple small pcaps&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;inpcap=&#34;test.pcap&#34;

max=$(tshark  -r $inpcap -n -T fields -e frame.number|tail -1)

# This is the number of packets in each split pcap
c=1

# Save all new pcaps to out, if it does not exist, create it.
[[ ! -d out ]] &amp;&amp; mkdir out

for i in $(seq 1 $max $c)
do
        tshark  -r $inpcap  -n -c $c &#34;frame.number==$i&#34; -w out/$i.pcap
        #Do other stuff, if required
        read -p &#34;Send the next packet? &#34;
done
&lt;/pre&gt;
&lt;p&gt;A very simple 3-4 line script that has saved my day so may times.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>copy /proc folder</title>
      <link>/2019/03/18/copy-proc-folder/</link>
      <pubDate>Mon, 18 Mar 2019 01:03:37 +0000</pubDate>
      
      <guid>/2019/03/18/copy-proc-folder/</guid>
      <description>&lt;p&gt;Other day, I was trying to copy the proc folder with following command:&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;tar cvzf /tmp/proc.tgz /proc&lt;/pre&gt;
&lt;p&gt;and I found out that all the files in tar were empty. Strange it may seem but lot of people are facing this as /proc is not a regular filesystem, so I wrote a quick script to copy the proc folder. Here is the script:&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;cd /
mkdir /tmp/proc
[[ -z $1 ]] &amp;&amp; exit -1
find /proc/$1/ -not -name pagemap | while read F ; do
    D=/tmp/$F
    if [[ -d $F ]]
    then
        echo &#34;$(ls -ld $F) =&amp;gt; Directory&#34;
        mkdir -p $D
    fi
    if [[ -L $F ]]
    then
        echo &#34;$(ls -ld $F) =&amp;gt; copied&#34;
        cp -P $F /tmp/$F
        
    elif [[ -f $F ]]
    then
        echo &#34;$(ls -ld $F) =&amp;gt; Cat&#34;
        cat $F &amp;gt; /tmp/$F
    else
        echo &#34;Dont know $F&#34;
    fi
done
&lt;/pre&gt;</description>
    </item>
    
    <item>
      <title>cool sed/grep magic to convert output to csv format</title>
      <link>/2019/03/11/cool-sed-grep-magic-to-convert-output-to-csv-format/</link>
      <pubDate>Mon, 11 Mar 2019 01:12:34 +0000</pubDate>
      
      <guid>/2019/03/11/cool-sed-grep-magic-to-convert-output-to-csv-format/</guid>
      <description>&lt;p&gt;I generallly keep doing this a lot, so thought will share with you. Lets assume we are capturing free ouput every min/hour/or whatever. The output looks like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Time: Mon Jan 21 23:59:10 AEDT 2019&lt;br&gt;
——————-&lt;/p&gt;
&lt;p&gt;total        used        free      shared  buff/cache   available&lt;br&gt;
Mem:          32014        8656        1735        1697       21621       21308&lt;br&gt;
Swap: 51195 75 51120&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;then we can use some grep and sed to convert this to something like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Mon Jan 21 23:59:10 AEDT 2019,32014,8656,1735,1697,21621,21308&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>bash function for rpm whatprovides</title>
      <link>/2018/12/31/bash-function-for-rpm-whatprovides/</link>
      <pubDate>Mon, 31 Dec 2018 01:00:38 +0000</pubDate>
      
      <guid>/2018/12/31/bash-function-for-rpm-whatprovides/</guid>
      <description>&lt;p&gt;Sometimes some simple one-liner function can save you a lot of time, like-&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;wps ()
{
    rpm -q --whatprovides $(which $1 )
}   # ----------  end of function wps  ----------

&lt;/pre&gt;</description>
    </item>
    
    <item>
      <title>xev – Check the X keyboard events</title>
      <link>/2018/11/19/xev-check-the-x-keyboard-events/</link>
      <pubDate>Mon, 19 Nov 2018 01:00:26 +0000</pubDate>
      
      <guid>/2018/11/19/xev-check-the-x-keyboard-events/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://manpages.ubuntu.com/manpages/precise/en/man1/xev.1.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;xev man page&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;xev – print contents of X events&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So other day I was checking why my play key was not working and wanted to check if it maps to one of the X default mappings for the keyboard and was stuck on how to check this. And finally found that I can try this:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;xev -event keyboard&lt;/pre&gt;
&lt;p&gt;Pretty neat 🙂&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ranger – try terminal file manager</title>
      <link>/2018/06/11/ranger-terminal-file-manager/</link>
      <pubDate>Mon, 11 Jun 2018 01:00:06 +0000</pubDate>
      
      <guid>/2018/06/11/ranger-terminal-file-manager/</guid>
      <description>&lt;p&gt;ranger is a terminal file manager, just install and run and have some fun.&lt;/p&gt;
&lt;p&gt;Tip: You might want to try it on uxrvt terminal and in Photos folder once.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;blockquote&gt;
&lt;dl&gt;
&lt;dt&gt;Name : ranger&lt;/dt&gt;
&lt;dt&gt;Version : 1.7.2&lt;/dt&gt;
&lt;dt&gt;Release : 8.fc28&lt;/dt&gt;
&lt;dt&gt;Arch : noarch&lt;/dt&gt;
&lt;dt&gt;Size : 1.2 M&lt;/dt&gt;
&lt;dt&gt;Source : ranger-1.7.2-8.fc28.src.rpm&lt;/dt&gt;
&lt;dt&gt;Repo : @System&lt;/dt&gt;
&lt;dt&gt;From repo : fedora&lt;/dt&gt;
&lt;dt&gt;Summary : A flexible console file manager&lt;/dt&gt;
&lt;dt&gt;URL : &lt;a href=&#34;http://savannah.nongnu.org/projects/ranger/&#34;&gt;http://savannah.nongnu.org/projects/ranger/&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;License : GPLv3+&lt;/dt&gt;
&lt;dt&gt;Description : Ranger is a free console file manager that gives you greater flexibility and a&lt;/dt&gt;
&lt;dd&gt;good overview of your files without having to leave your *nix console. It&lt;/dd&gt;
&lt;dd&gt;visualizes the directory tree in two dimensions: the directory hierarchy on&lt;/dd&gt;
&lt;dd&gt;one, lists of files on the other, with a preview to the right so you know where&lt;/dd&gt;
&lt;dd&gt;you’ll be going.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/blockquote&gt;</description>
    </item>
    
    <item>
      <title>Display IP address in console login screen</title>
      <link>/2018/04/30/display-ip-address-console-login-screen/</link>
      <pubDate>Mon, 30 Apr 2018 01:02:44 +0000</pubDate>
      
      <guid>/2018/04/30/display-ip-address-console-login-screen/</guid>
      <description>&lt;p&gt;Here is one liner that will add the current IP address in the console login screen (if you are not running X as is case for servers):&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;(ip -o -4 a| awk &#39;$2 !=&#34;lo&#34; {print &#34;\nIP Address ::&#34;$4}&#39; |tr &#39;\n&#39; &#39;,&#39;;echo)&amp;gt;&amp;gt;/etc/issue&lt;/pre&gt;
&lt;p&gt;Just execute the above command as root. It will add the required code in “/etc/issue” to display the IP address. BTW, you can also use “\4” or “\6” instead of that command to get the IP but that will not work with some old versions of Linux.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Port php mysql scripts to php 7.0 from 5.x version</title>
      <link>/2018/04/23/port-php-mysql-scripts-php-7-0-5-x-version/</link>
      <pubDate>Mon, 23 Apr 2018 00:56:57 +0000</pubDate>
      
      <guid>/2018/04/23/port-php-mysql-scripts-php-7-0-5-x-version/</guid>
      <description>&lt;p&gt;Recently I got a script or series of scripts that were written for PHP 5.6x and hence used mysql_connect which as you know by now does not work with PHP 7.0. Since there were number of scripts, I thought it would be waste of time to change them manually and wrote a script to fix them. If you have similar situation then probably this few lines could help you.&lt;/p&gt;
&lt;p&gt;Since my scripts did not use all the functions so I did not put the sed commands for all of them but you get the idea 🙂&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Monitor progress of coreutils commad like mv, cp etc</title>
      <link>/2018/04/02/monitor-progress-coreutils-commad-mv-cp/</link>
      <pubDate>Mon, 02 Apr 2018 01:00:41 +0000</pubDate>
      
      <guid>/2018/04/02/monitor-progress-coreutils-commad-mv-cp/</guid>
      <description>&lt;p&gt;Monitor progress of coreutils commad like mv, cp etc&lt;/p&gt;
&lt;p&gt;You can use command called “progress”. Other option is “pv” but that is little complicated so here is simpler option.&lt;/p&gt;
&lt;blockquote class=&#34;wp-embedded-content&#34; data-secret=&#34;zNKgp8yOOp&#34;&gt;
  &lt;p&gt;
    &lt;a href=&#34;https://www.tecmint.com/progress-monitor-check-progress-of-linux-commands/&#34;&gt;Progress &amp;#8211; A Tiny Tool to Monitor Progress for (cp, mv, dd, tar, etc.) Commands in Linux&lt;/a&gt;
  &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To install, you can do the following:&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;dnf install progress&lt;/pre&gt;</description>
    </item>
    
    <item>
      <title>Send history of current host to some other host over ssh</title>
      <link>/2018/02/26/send-history-current-host-host-ssh/</link>
      <pubDate>Mon, 26 Feb 2018 00:44:11 +0000</pubDate>
      
      <guid>/2018/02/26/send-history-current-host-host-ssh/</guid>
      <description>&lt;p&gt;Sometimes I want to save the history of current host on another host. This is to ensure that I can use copy/paste on other host to run the commands. To this, I found a simple solution –&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;history| ssh &amp;lt;user&amp;gt;@&amp;lt;host&amp;gt; &#39;cat - &amp;gt; /tmp/history&#39;&lt;/pre&gt;
&lt;p&gt;And on the new host, you can find the history in file “/tmp/history”, cool :). Now I can quick edit this file to create this as shell script as well if required. How cool is that.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Fix display size on libvirt/Qemu guest</title>
      <link>/2017/05/22/fix-display-size-libvirtqemu-guest/</link>
      <pubDate>Mon, 22 May 2017 01:05:14 +0000</pubDate>
      
      <guid>/2017/05/22/fix-display-size-libvirtqemu-guest/</guid>
      <description>&lt;p&gt;Lot of times I find myself of VM that does not correctly resize the screen display and that is literally nuisance. So, here is quick and dirty fix for this.&lt;/p&gt;
&lt;p&gt;First you need to find out information about your display with following command:&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;xrandr -q&lt;/pre&gt;
&lt;p&gt;And you will see output like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192&lt;br&gt;
Virtual-0 connected primary 1920×1080+0+0 0mm x 0mm&lt;br&gt;
1024×768      59.92 +&lt;br&gt;
1920×1200     59.88&lt;br&gt;
1920×1080     59.96*&lt;br&gt;
1600×1200     59.87&lt;br&gt;
1680×1050     59.95&lt;br&gt;
1400×1050     59.98&lt;br&gt;
1280×1024     59.89&lt;br&gt;
1440×900      59.89&lt;br&gt;
1280×960      59.94&lt;br&gt;
1280×854      59.89&lt;br&gt;
1280×800      59.81&lt;br&gt;
1280×720      59.86&lt;br&gt;
1152×768      59.78&lt;br&gt;
800×600       59.86&lt;br&gt;
848×480       59.66&lt;br&gt;
720×480       59.71&lt;br&gt;
640×480       59.38&lt;br&gt;
Virtual-1 disconnected&lt;br&gt;
Virtual-2 disconnected&lt;br&gt;
Virtual-3 disconnected&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Getting Started with Elixir Programming Language</title>
      <link>/2017/05/15/started-elixir-programming-language/</link>
      <pubDate>Mon, 15 May 2017 01:10:11 +0000</pubDate>
      
      <guid>/2017/05/15/started-elixir-programming-language/</guid>
      <description>&lt;p&gt;If you have been reading blog posts, hacker news threads, your favorite developers tweets or listening to podcasts, at this point you’ve probably heard about the Elixir programming language. The language was created by José Valim, a well known developer in the open-source world. You may know him from the Ruby on Rails MVC framework or from devise and simple_form ruby gems him and his co-workers from the Plataformatec have been working on in the last few years.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Fix weird flux menu</title>
      <link>/2017/05/03/fix-weird-flux-menu/</link>
      <pubDate>Wed, 03 May 2017 02:03:27 +0000</pubDate>
      
      <guid>/2017/05/03/fix-weird-flux-menu/</guid>
      <description>&lt;p&gt;Some distro’s just add all the items under single menu and thus the menu itself becomes unusable because of the number of items in the submenu and this I did not like and hence ceated this simply python script to fix that. For using the script, back up you “menu” file, redirect the output of this script to ‘menu’ file again.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre class=&#34;brush:perl&#34;&gt;#!/bin/python

F = open(&#34;~/.fluxbox/menu&#34;, &#34;r&#34;)
count=0
mkc=1
started=0

for line in F:
    print line.rstrip()

    if &#39;[submenu]&#39; in line.lower() and started == 1:
        print &#39;[end]&#39;

    if &#39;[end]&#39;  in line.lower():
        count=0
        mkc=1
        if started &amp;gt; 0:
             started=0
             # print &#34;Count is {}&#34;.format(count)
             # print &#34;Started is {}&#34;.format(started)
             print &#39;[end]&#39;
    if &#39;[exec]&#39;  in line.lower():
        if count &amp;gt; 15 :
            if started &amp;gt; 0:
                started=0
                print &#39;[end]&#39;
                # print &#34;Count is {}&#34;.format(count)
                # print &#34;Started is {}&#34;.format(started)
            print &#39;[submenu] ({})&#39;.format(mkc)
            started=1
            mkc+=1
            count=0
        # print count
        count+=1
&lt;/pre&gt;
&lt;h3 class=&#34;zemanta-related-title&#34; style=&#34;margin: 0 0 10px 0; padding: 0; clear: both;&#34;&gt;
  Related articles across the web
&lt;/h3&gt;
&lt;ul class=&#34;zemanta-article-ul zemanta-article-ul-image&#34; style=&#34;margin: 0; padding: 0; overflow: hidden;&#34;&gt;
  &lt;li class=&#34;zemanta-article-ul-li-image zemanta-article-ul-li&#34; style=&#34;padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;&#34;&gt;
    &lt;a style=&#34;padding: 2px; display: block; text-decoration: none;&#34; href=&#34;http://www.imore.com/how-check-your-iphones-battery-percentage-your-mac&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;img style=&#34;border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;&#34; src=&#34;https://i0.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/2017/05/378307124_150_150.jpg?w=688&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;a style=&#34;display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;&#34; href=&#34;http://www.imore.com/how-check-your-iphones-battery-percentage-your-mac&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;How to check your iPhone&amp;#8217;s battery percentage on your Mac&lt;/a&gt;
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li-image zemanta-article-ul-li&#34; style=&#34;padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;&#34;&gt;
    &lt;a style=&#34;padding: 2px; display: block; text-decoration: none;&#34; href=&#34;https://www.techjunkie.com/convert-google-sheets-xml/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;img style=&#34;border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;&#34; src=&#34;https://i1.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/2017/05/378451504_150_150.jpg?w=688&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;a style=&#34;display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;&#34; href=&#34;https://www.techjunkie.com/convert-google-sheets-xml/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;How To Convert Google Sheets Spreadsheets to XML&lt;/a&gt;
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li-image zemanta-article-ul-li&#34; style=&#34;padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;&#34;&gt;
    &lt;a style=&#34;padding: 2px; display: block; text-decoration: none;&#34; href=&#34;http://wccftech.com/update-galaxy-s7-edge-to-android-7-1-2/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;img style=&#34;border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;&#34; src=&#34;https://i0.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/2017/05/378464108_150_150.jpg?w=688&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;a style=&#34;display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;&#34; href=&#34;http://wccftech.com/update-galaxy-s7-edge-to-android-7-1-2/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Upgrade Your Samsung Galaxy S7 edge to Android 7.1.2 Nougat Custom ROM&lt;/a&gt;
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li-image zemanta-article-ul-li&#34; style=&#34;padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;&#34;&gt;
    &lt;a style=&#34;padding: 2px; display: block; text-decoration: none;&#34; href=&#34;http://www.foxnews.com/food-drink/2017/04/19/pizza-industry-calls-on-trump-to-strike-down-new-calorie-mandate.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;img style=&#34;border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;&#34; src=&#34;https://i0.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/2017/05/378410629_150_150.jpg?w=688&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;a style=&#34;display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;&#34; href=&#34;http://www.foxnews.com/food-drink/2017/04/19/pizza-industry-calls-on-trump-to-strike-down-new-calorie-mandate.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Trouble brewing for Domino&amp;#8217;s?&lt;/a&gt;
  &lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    
    <item>
      <title>scapy packet dump to packet</title>
      <link>/2017/04/10/scapy-packet-dump-packet/</link>
      <pubDate>Mon, 10 Apr 2017 01:05:34 +0000</pubDate>
      
      <guid>/2017/04/10/scapy-packet-dump-packet/</guid>
      <description>&lt;p&gt;First you need to have scapy installed. And if you don’t know about scapy, then&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Scapy is a powerful interactive packet manipulation program. It is able to forge or decode packets of a wide number of protocols, send them on the wire, capture them, match requests and replies, and much more. It can easily handle most classical tasks like scanning, tracerouting, probing, unit tests, attacks or network discovery (it can replace hping, 85% of nmap, arpspoof, arp-sk, arping, tcpdump, tethereal, p0f, etc.). It also performs very well at a lot of other specific tasks that most other tools can’t handle, like sending invalid frames, injecting your own 802.11 frames, combining technics (VLAN hopping+ARP cache poisoning, VOIP decoding on WEP encrypted channel, …), etc&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Kernel dropped packet analysis</title>
      <link>/2017/02/27/kernel-dropped-packet-analysis/</link>
      <pubDate>Mon, 27 Feb 2017 00:30:26 +0000</pubDate>
      
      <guid>/2017/02/27/kernel-dropped-packet-analysis/</guid>
      <description>&lt;p&gt;Found a simple method to check for all the packets dropped by &lt;a class=&#34;zem_slink&#34; title=&#34;Kernel (operating system)&#34; href=&#34;http://en.wikipedia.org/wiki/Kernel_%28operating_system%29&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;kernel&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;First you need to install dropwatch with&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;dnf install dropwatch&lt;/pre&gt;
&lt;p&gt;and details of the package&lt;/p&gt;
&lt;blockquote&gt;
&lt;dl&gt;
&lt;dt&gt;Name        : dropwatch&lt;/dt&gt;
&lt;dt&gt;&lt;a class=&#34;zem_slink&#34; title=&#34;Arch Linux&#34; href=&#34;http://www.archlinux.org/&#34; target=&#34;_blank&#34; rel=&#34;homepage&#34;&gt;Arch&lt;/a&gt;        : x86_64&lt;/dt&gt;
&lt;dt&gt;Epoch       : 0&lt;/dt&gt;
&lt;dt&gt;Version     : 1.4&lt;/dt&gt;
&lt;dt&gt;Release     : 13.fc24&lt;/dt&gt;
&lt;dt&gt;Size        : 27 k&lt;/dt&gt;
&lt;dt&gt;Repo        : fedora&lt;/dt&gt;
&lt;dt&gt;Summary     : Kernel dropped packet monitor&lt;/dt&gt;
&lt;dt&gt;&lt;a class=&#34;zem_slink&#34; title=&#34;Uniform Resource Locator&#34; href=&#34;http://en.wikipedia.org/wiki/Uniform_Resource_Locator&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;URL&lt;/a&gt;         : &lt;a href=&#34;http://fedorahosted.org/dropwatch&#34;&gt;http://fedorahosted.org/dropwatch&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;License     : GPLv2+&lt;/dt&gt;
&lt;dt&gt;Description : dropwatch is an utility to interface to the kernel to monitor for dropped&lt;/dt&gt;
&lt;dd&gt;&lt;a class=&#34;zem_slink&#34; title=&#34;Network packet&#34; href=&#34;http://en.wikipedia.org/wiki/Network_packet&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;network packets&lt;/a&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/blockquote&gt;
&lt;p&gt; &lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Get kernel function name from kernel address.</title>
      <link>/2017/02/13/kernel-function-kernel-address/</link>
      <pubDate>Mon, 13 Feb 2017 01:14:01 +0000</pubDate>
      
      <guid>/2017/02/13/kernel-function-kernel-address/</guid>
      <description>&lt;p&gt;If you are using pmap or using &lt;a class=&#34;zem_slink&#34; title=&#34;Strace&#34; href=&#34;http://en.wikipedia.org/wiki/Strace&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;strace&lt;/a&gt; and want to covert kernel address to function name then you can use the following technique.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;First you need to install elfutils, if not installed.&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;dnf install elfutils&lt;/pre&gt;
&lt;p&gt;and after this you can use the following command&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;eu-addr2line -f -e /boot/vmlinuz-$(uname -r) &amp;lt;addr&amp;gt;
#Example
eu-addr2line -f -e /boot/vmlinuz-$(uname -r) 00007f36a8045000
&lt;/pre&gt;</description>
    </item>
    
    <item>
      <title>Compose a video from a text sequence</title>
      <link>/2017/01/23/compose-video-text-sequence/</link>
      <pubDate>Mon, 23 Jan 2017 01:16:36 +0000</pubDate>
      
      <guid>/2017/01/23/compose-video-text-sequence/</guid>
      <description>&lt;p&gt;I came across this useful and interesting project so sharing with all of you:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://gitlab.com/m.abkenar/explain.sh&#34;&gt;seq2vid&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>xsos – a tool for sysadmins and support</title>
      <link>/2016/08/24/xsos-tool-sysadmins-support/</link>
      <pubDate>Wed, 24 Aug 2016 00:31:24 +0000</pubDate>
      
      <guid>/2016/08/24/xsos-tool-sysadmins-support/</guid>
      <description>&lt;p&gt;Here is a very nice article that you may find useful&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://access.redhat.com/discussions/469323&#34;&gt;https://access.redhat.com/discussions/469323&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>git – plot the history</title>
      <link>/2016/05/23/git-plot-history/</link>
      <pubDate>Mon, 23 May 2016 00:38:12 +0000</pubDate>
      
      <guid>/2016/05/23/git-plot-history/</guid>
      <description>&lt;p&gt;git has a very simple solution to see all the commits in a graphical form. If you need to understand all the commits history all you need is&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;git graphviz|dot -Tpng  -o /tmp/a.png&lt;/pre&gt;
&lt;p&gt;This will generate a file called /tmp/a.png which will diplay the complete commit history.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>DNS – simple and effective guide with history</title>
      <link>/2016/02/15/dns-simple-effective-guide-history/</link>
      <pubDate>Mon, 15 Feb 2016 01:09:00 +0000</pubDate>
      
      <guid>/2016/02/15/dns-simple-effective-guide-history/</guid>
      <description>&lt;p&gt;Here is link to a very nice and definitive guide to DNS. Very detailed and useful. There is a pdf version as well to download 🙂&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://webhostinggeeks.com/guides/dns/&#34;&gt;https://webhostinggeeks.com/guides/dns/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks to Andrijana Nikolic for providing a valuable resource to share with you all.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>virsh – show ip address of all running VMs</title>
      <link>/2016/02/01/virsh-show-ip-address-running-vms/</link>
      <pubDate>Mon, 01 Feb 2016 00:52:31 +0000</pubDate>
      
      <guid>/2016/02/01/virsh-show-ip-address-running-vms/</guid>
      <description>&lt;p&gt;If you are using the libvirt and associated tools, then you must be aware about virt-manager. However this being a GUI tools, it is not possible to always use this. “virsh” is a good option for this.&lt;/p&gt;
&lt;p&gt;To start with, if you need to know all the VMs all the running VMs, then you can use (to only view the names):&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;virsh list --name&lt;/pre&gt;
&lt;p&gt;Extending this to make it more useful is the case if you need to know the IP address for the running VMs. Here is a simple code that you can put in alias or function that can be used to get the IP address of the running VM’s.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Disk usage by file type</title>
      <link>/2015/11/30/disk-usage-file-type/</link>
      <pubDate>Mon, 30 Nov 2015 00:51:20 +0000</pubDate>
      
      <guid>/2015/11/30/disk-usage-file-type/</guid>
      <description>&lt;p&gt;Trying to find the total usage for each of the file types by extension, then here is a quick bash function for you :&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;disk_usage_type () 
{ 
    find . -name &#39;*&#39;$1 -ls | awk &#39;
    BEGIN{
        a[0]=&#34;Bytes&#34;;
        a[1]=&#34;KB&#34;;
        a[2]=&#34;MB&#34;;
        a[3]=&#34;GB&#34;;
    }
    {sum+=$7; files++;}
    END{
    print &#34;Total sum is ::\t&#34; sum;
    print &#34;Total files  ::\t&#34; files;
        while (sum &amp;gt; 1024) {
            sum=sum/1024;
            count++;
            };
        print sum&#34; &#34;a[count];
    }&#39;
}
&lt;/pre&gt;
&lt;p&gt;Just define the function in one of your bash startup files. After that to use the function pass in the extension for which you would like to find the total size. Output should be something like below:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>terminal, terminal everywhere.</title>
      <link>/2015/11/23/terminal-terminal-everywhere/</link>
      <pubDate>Mon, 23 Nov 2015 00:47:12 +0000</pubDate>
      
      <guid>/2015/11/23/terminal-terminal-everywhere/</guid>
      <description>&lt;p&gt;Tilda is a borderless terminal that can be started multiple times each with its own configuration.&lt;/p&gt;
&lt;blockquote&gt;
&lt;dl&gt;
&lt;dt&gt;Name        : tilda&lt;/dt&gt;
&lt;dt&gt;Arch        : x86_64&lt;/dt&gt;
&lt;dt&gt;Epoch       : 0&lt;/dt&gt;
&lt;dt&gt;Version     : 1.2.4&lt;/dt&gt;
&lt;dt&gt;Release     : 1.fc23&lt;/dt&gt;
&lt;dt&gt;Size        : 344 k&lt;/dt&gt;
&lt;dt&gt;Repo        : @System&lt;/dt&gt;
&lt;dt&gt;From repo   : fedora&lt;/dt&gt;
&lt;dt&gt;Summary     : A Gtk based drop down terminal for Linux and Unix&lt;/dt&gt;
&lt;dt&gt;URL         : &lt;a href=&#34;http://github.com/lanoxx/tilda&#34;&gt;http://github.com/lanoxx/tilda&lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;License     : GPLv2+&lt;/dt&gt;
&lt;dt&gt;Description : Tilda is a Linux terminal taking after the likeness of many classic terminals&lt;/dt&gt;
&lt;dd&gt;from first person shooter games, Quake, Doom and Half-Life (to name a few),&lt;/dd&gt;
&lt;dd&gt;where the terminal has no border and is hidden from the desktop until a key is&lt;/dd&gt;
&lt;dd&gt;pressed.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt; &lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Executing commands on multiple hosts</title>
      <link>/2015/09/21/executing-commands-multiple-hosts/</link>
      <pubDate>Mon, 21 Sep 2015 00:33:38 +0000</pubDate>
      
      <guid>/2015/09/21/executing-commands-multiple-hosts/</guid>
      <description>&lt;p&gt;If you have to execute the same command in multiple hosts, then you can use mussh:&lt;/p&gt;
&lt;blockquote&gt;
&lt;dl&gt;
&lt;dt&gt;Description : Mussh is a &lt;a class=&#34;zem_slink&#34; title=&#34;Shell script&#34; href=&#34;http://en.wikipedia.org/wiki/Shell_script&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;shell script&lt;/a&gt; that allows you to execute a command or script&lt;/dt&gt;
&lt;dd&gt;over ssh on multiple hosts with one command. When possible mussh will use&lt;/dd&gt;
&lt;dd&gt;ssh-agent and RSA/DSA keys to minimize the need to enter your password&lt;/dd&gt;
&lt;dd&gt;more than once.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/blockquote&gt;
&lt;p&gt;First install mussh with the following command&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;dnf install mussh&lt;/pre&gt;
&lt;p&gt;Now to run this for multiple hosts, you can run like this&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>retext – Editor for restructured text</title>
      <link>/2015/05/15/retext-editor-restructured-text/</link>
      <pubDate>Fri, 15 May 2015 01:04:50 +0000</pubDate>
      
      <guid>/2015/05/15/retext-editor-restructured-text/</guid>
      <description>&lt;p&gt;restructured text is a simple text editor for markdown/restructured text which can show preview as well. So, here is some details on same :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Name        : retext&lt;br&gt;
Arch        : noarch&lt;br&gt;
Epoch       : 0&lt;br&gt;
Version     : 5.0.1&lt;br&gt;
Release     : 7.fc22&lt;br&gt;
Size        : 412 k&lt;br&gt;
Repo        : @System&lt;br&gt;
Summary     : Text editor for Markdown and reStructuredText&lt;br&gt;
URL         : &lt;a href=&#34;http://sourceforge.net/p/retext/home/ReText&#34;&gt;http://sourceforge.net/p/retext/home/ReText&lt;/a&gt;&lt;br&gt;
License     : GPLv3+&lt;br&gt;
Description : ReText is a simple but powerful text editor for Markdown and reStructuredText.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ionice – renice you IO activity for the process.</title>
      <link>/2015/04/13/ionice-renice-io-activity-process/</link>
      <pubDate>Mon, 13 Apr 2015 07:10:29 +0000</pubDate>
      
      <guid>/2015/04/13/ionice-renice-io-activity-process/</guid>
      <description>&lt;p&gt;ionice is utility provided by the package util-linux. Description of util-linux:&lt;/p&gt;
&lt;blockquote&gt;
&lt;dl&gt;
&lt;dt&gt;Description : The util-linux package contains a large variety of low-level system&lt;/dt&gt;
&lt;dd&gt;utilities that are necessary for a Linux system to function. Among&lt;/dd&gt;
&lt;dd&gt;others, Util-linux contains the fdisk configuration tool and the login&lt;/dd&gt;
&lt;dd&gt;program.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;With the help of this utility, you can set the scheduler priority for your IO scheduling upto RealTime, but be careful that can make other process sluggish. Example use:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Fedora/Ubuntu issue with assigned IP by dhcp server.</title>
      <link>/2015/03/13/fedoraubuntu-issue-assigned-ip-dhcp-server/</link>
      <pubDate>Fri, 13 Mar 2015 00:40:51 +0000</pubDate>
      
      <guid>/2015/03/13/fedoraubuntu-issue-assigned-ip-dhcp-server/</guid>
      <description>&lt;p&gt;In the recent versions of Fedora/Ubuntu, I found that if the DHCP server assigns a reserved address, the address is not applied to the system. Finally I found that adding the below in /etc/dhcp/dhclient.conf, would fix the issue.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;send dh-client-identifier = hardware;&lt;/p&gt;
&lt;/blockquote&gt;</description>
    </item>
    
    <item>
      <title>ssh authorized keys – limit ssh session to custom command</title>
      <link>/2015/03/04/ssh-authorized-keys-limit-ssh-session-custom-command/</link>
      <pubDate>Wed, 04 Mar 2015 00:34:21 +0000</pubDate>
      
      <guid>/2015/03/04/ssh-authorized-keys-limit-ssh-session-custom-command/</guid>
      <description>&lt;p&gt;If you want a ssh key to be able to run a custom command only and nothing beyond that, then you can use the “command” option in the authorized_keys file of ssh.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;For example, to limit user to run only top command with a key, you can add the key like this:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;echo &#39;command=&#34;/usr/bin/top&#34; ssh-rsa &#39; &amp;gt;&amp;gt;~/.ssh/authorized_keys&lt;/pre&gt;</description>
    </item>
    
    <item>
      <title>script to get hard disk health in fedora/ubuntu</title>
      <link>/2014/12/01/script-hard-disk-health-fedoraubuntu/</link>
      <pubDate>Mon, 01 Dec 2014 12:12:08 +0000</pubDate>
      
      <guid>/2014/12/01/script-hard-disk-health-fedoraubuntu/</guid>
      <description>&lt;p&gt;First, put this in a script.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;18
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;19
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;20
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;21
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;22
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;23
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;24
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;25
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;26
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;27
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;28
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;29
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;30
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;31
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;32
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;33
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;34
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;35
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;36
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;37
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;38
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;39
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;40
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;41
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;42
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;43
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;44
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;45
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;46
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;47
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;48
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;49
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;50
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;51
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;52
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;53
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;54
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;55
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;56
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;57
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;58
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;59
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;60
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;61
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;#Change as appropriate&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;HDD&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;sda
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;sub&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;SmartCtl data for HDD&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;To: &amp;amp;lt;Your Email&amp;amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;Sub: [Cron] $sub
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;MIME-Version: 1.0
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;Content-Type: text/html
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;Content-Disposition: inline
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;&amp;amp;lt;html&amp;amp;gt;&amp;amp;lt;pre&amp;amp;gt;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;&amp;amp;lt;style&amp;amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;hr {
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    display: block;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    height: 1px;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    border: 0;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    border-top: 1px solid #ccc;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    margin: 1em 0;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    padding: 0;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;&amp;amp;lt;/style&amp;amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;&amp;amp;lt;h2&amp;amp;gt;Errors on HDD:&amp;amp;lt;/h2&amp;amp;gt;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;&amp;amp;lt;hr&amp;amp;gt;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo smartctl -l error  /dev/&lt;span class=&#34;nv&#34;&gt;$HDD&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;&amp;amp;lt;h2&amp;amp;gt;Health of HDD:&amp;amp;lt;/h2&amp;amp;gt;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;&amp;amp;lt;hr&amp;amp;gt;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo smartctl -H  /dev/&lt;span class=&#34;nv&#34;&gt;$HDD&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;&amp;amp;lt;h2&amp;amp;gt;Detailed info&amp;amp;lt;/h2&amp;amp;gt;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;&amp;amp;lt;hr&amp;amp;gt;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo smartctl -a -d ata /dev/&lt;span class=&#34;nv&#34;&gt;$HDD&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;&amp;amp;lt;h2&amp;amp;gt;Journalctl output for smartd&amp;amp;lt;/h2&amp;amp;gt;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;&amp;amp;lt;hr&amp;amp;gt;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[[&lt;/span&gt; -f /etc/fedora-release &lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;journalctl -x --show-cursor -u smartd --since&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;yesterday
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;#This is for Ubuntu.. still using dmesg&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;dmesg -T -l err,crit,alert,emerg
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;&amp;amp;lt;h2&amp;amp;gt;All Details&amp;amp;lt;/h2&amp;amp;gt;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;&amp;amp;lt;hr&amp;amp;gt;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo smartctl --xall /dev/&lt;span class=&#34;nv&#34;&gt;$HDD&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Thanks for using Amit Agarwal&amp;#39;s script&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;&amp;amp;lt;/pre&amp;amp;gt;&amp;amp;lt;/html&amp;amp;gt;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;and then put this in cron:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ncurses based eFTE editor – programmers lightweight editor</title>
      <link>/2014/11/17/ncurses-based-efte-editor-programmers-lightweight-editor/</link>
      <pubDate>Mon, 17 Nov 2014 01:15:49 +0000</pubDate>
      
      <guid>/2014/11/17/ncurses-based-efte-editor-programmers-lightweight-editor/</guid>
      <description>&lt;p&gt;nefte is a lightweight programmers editor. Here is descriptioin:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre&gt;Description : eFTE is an advanced programmers editor with goals of being lightweight, yet
            : totally configurable. Support for user defined programming languages, menu
            : systems and key bindings are provided with many common defaults already
            : defined. eFTE is still a new project, however, we extend from the FTE editor
            : which was first released in 1995, so eFTE is tried and true with many features
            : for the programmer/text editor.
            : 
            : This package contains nefte, the ncurses version of the editor.
&lt;/pre&gt;
&lt;p&gt;And to install:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Multiple entry in .ssh/config file</title>
      <link>/2014/10/24/multiple-entry-sshconfig-file/</link>
      <pubDate>Fri, 24 Oct 2014 00:24:29 +0000</pubDate>
      
      <guid>/2014/10/24/multiple-entry-sshconfig-file/</guid>
      <description>&lt;p&gt;Here is a &lt;a title=&#34;Easy ssh configuration with .ssh/config file&#34; href=&#34;http://blog.amit-agarwal.co.in/2011/04/11/easy-ssh-configuration-with-sshconfig-file/&#34; target=&#34;_blank&#34;&gt;link to one post on ssh config&lt;/a&gt; file.&lt;/p&gt;
&lt;p&gt;However, if you want entries for lot of servers with their IPs or names, then it could be cumbersome to add all the entries in the .ssh/config file. So, here is a shortcut notation:&lt;/p&gt;
&lt;pre class=&#34;brush:plain&#34;&gt;Host 1 2 3 4 5 6
Hostname 192.168.1.%h
    User 
    
    Ciphers arcfour

where &#39;%h&#39; denotes the IP that you use in the ssh command.

The following escape character substitutions will be performed:
             ‘%d’ (local user&#39;s home directory), ‘%h’ (remote host name), ‘%l’ (local host name),
              ‘%n’ (host name as provided on the command line), ‘%p’ (remote port),
              ‘%r’ (remote user name) or ‘%u’ (local user name).

&lt;/pre&gt;</description>
    </item>
    
    <item>
      <title>Debuggging bash cron scripts.</title>
      <link>/2014/09/01/debuggging-bash-cron-scripts/</link>
      <pubDate>Mon, 01 Sep 2014 00:44:36 +0000</pubDate>
      
      <guid>/2014/09/01/debuggging-bash-cron-scripts/</guid>
      <description>&lt;p&gt;I have to several times debug scripts that I get complain about working when logging in normally but they do not work when run in cron mode. So, quite a lot of times, redirecting the stderr of the script is all that is required to see what is happening, but sometimes that just does not help if the script is calling another script which is mis-behaving and under lot of other conditions. So, how to at-least take a look at why these are failing, login with ssh.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ldap search function</title>
      <link>/2014/08/25/ldap-search-function/</link>
      <pubDate>Mon, 25 Aug 2014 00:42:04 +0000</pubDate>
      
      <guid>/2014/08/25/ldap-search-function/</guid>
      <description>&lt;p&gt;First you will need the ldap search utility. The client for ldap search comes in openldap-clients, so you need to install that first:&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;sudo yum install openldap-clients&lt;/pre&gt;
&lt;p&gt;Now, that you have installed it, try to find something in some open ldap server, example:&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;ldapsearch -LLL -h  db.debian.org   -x  -b &#34;dc=debian,dc=org&#34; &#34;cn=Joao*&#34;&lt;/pre&gt;
&lt;p&gt;This should list couple of entries for you. Now, that you have ldapsearch working, lets define a function in .bashrc file:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>rfc2html – php script to view rfc with index and links.</title>
      <link>/2014/07/21/rfc2html-php-script-view-rfc-index-links/</link>
      <pubDate>Mon, 21 Jul 2014 01:26:32 +0000</pubDate>
      
      <guid>/2014/07/21/rfc2html-php-script-view-rfc-index-links/</guid>
      <description>&lt;p&gt;If you have to keep viewing RFC’s and you miss index and links in RFC while viewing rfc, then you should check-out rfc2html. It is scrtip that takes plain text rfc and converts it to html.&lt;/p&gt;
&lt;p&gt;You can get the original code from &lt;a href=&#34;https://sourceforge.net/projects/rfc2html-php/&#34;&gt;sourceforge&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;However, I found some small issues with the script and have sent a mail to the authour about the same. In the meantime, you can use the diff below to fix the issue’s or download this diff file &lt;a href=&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2014/07/rfc2html.diff_.gz&#34;&gt;rfc2html.diff&lt;/a&gt; and apply the diff:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Some nice linux tutorials</title>
      <link>/2014/05/05/4421/</link>
      <pubDate>Mon, 05 May 2014 00:45:28 +0000</pubDate>
      
      <guid>/2014/05/05/4421/</guid>
      <description>&lt;p&gt;Some very nice articles and tutorials on Linux, &lt;a href=&#34;http://www.os4online.com/p/downloads-site-links.html&#34; target=&#34;_blank&#34;&gt;find here&lt;/a&gt;. Pretty nice collection.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>get the contents of whole site like some wiki or wikia</title>
      <link>/2014/02/24/contents-site-wiki-wikia/</link>
      <pubDate>Mon, 24 Feb 2014 01:08:14 +0000</pubDate>
      
      <guid>/2014/02/24/contents-site-wiki-wikia/</guid>
      <description>&lt;p&gt;For &lt;a class=&#34;zem_slink&#34; title=&#34;Wiki&#34; href=&#34;http://en.wikipedia.org/wiki/Wiki&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;wikis&lt;/a&gt; and wikia, generally if you are trying to get some url mirror, then websucker.py is an excellent option. This script is in the python sources so, to get this tool,&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;yumdownloader --source python&lt;/pre&gt;
&lt;p&gt;Install the rpm downloaded in &lt;a class=&#34;zem_slink&#34; title=&#34;Working directory&#34; href=&#34;http://en.wikipedia.org/wiki/Working_directory&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;current directory&lt;/a&gt; and then go to ~/rpmbuild/SOUURCES.  You should find a &lt;a class=&#34;zem_slink&#34; title=&#34;Python (programming language)&#34; href=&#34;http://www.python.org/&#34; target=&#34;_blank&#34; rel=&#34;homepage&#34;&gt;Python&lt;/a&gt;-*.tar.xz file here, just extract with&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;tar xvf Python*.tar.xz&lt;/pre&gt;
&lt;p&gt;and there you go, you should find the tool in &lt;strong&gt;Tools/webchecker/websucker.py.&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>inotify -watch for file to change</title>
      <link>/2014/01/28/inotify-watch-file-change/</link>
      <pubDate>Tue, 28 Jan 2014 00:41:45 +0000</pubDate>
      
      <guid>/2014/01/28/inotify-watch-file-change/</guid>
      <description>&lt;p&gt;Here is a simple command for you. It uses &lt;a class=&#34;zem_slink&#34; title=&#34;Inotify&#34; href=&#34;http://en.wikipedia.org/wiki/Inotify&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;inotify&lt;/a&gt; tools. So first you need to install :&lt;/p&gt;
&lt;pre class=&#34;brush: actionscript3; gutter: true; first-line: 1&#34;&gt;sudo yum install inotify-tools&lt;/pre&gt;
&lt;p&gt;and then you can try something like this:&lt;/p&gt;
&lt;pre class=&#34;brush: actionscript3; gutter: true; first-line: 1&#34;&gt;while true; 
do 
inotifywait -r -e modify --exclude=&#34;.swp&#34; . &amp;&amp; make; 
done&lt;/pre&gt;
&lt;p&gt;Here, once the file changes, we are running make, but you can do anything you want.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h6 class=&#34;zemanta-related-title&#34; style=&#34;font-size: 1em;&#34;&gt;
  Related articles
&lt;/h6&gt;
&lt;ul class=&#34;zemanta-article-ul zemanta-article-ul-image&#34; style=&#34;margin: 0; padding: 0; overflow: hidden;&#34;&gt;
  &lt;li class=&#34;zemanta-article-ul-li-image zemanta-article-ul-li&#34; style=&#34;padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;&#34;&gt;
    &lt;a style=&#34;box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;&#34; href=&#34;http://dietbuddha.blogspot.com/2013/12/development-server-automatic-reload-on.html&#34; target=&#34;_blank&#34;&gt;&lt;img style=&#34;padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;&#34; alt=&#34;&#34; src=&#34;https://i1.wp.com/i.zemanta.com/noimg_111_80_80.jpg?w=688&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;a style=&#34;display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;&#34; href=&#34;http://dietbuddha.blogspot.com/2013/12/development-server-automatic-reload-on.html&#34; target=&#34;_blank&#34;&gt;Development Server: Automatic Reload on Code Change&lt;/a&gt;
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li-image zemanta-article-ul-li&#34; style=&#34;padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;&#34;&gt;
    &lt;a style=&#34;box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;&#34; href=&#34;http://stackoverflow.com/questions/4936229/concurrent-or-lock-access-in-bash-script-function&#34; target=&#34;_blank&#34;&gt;&lt;img style=&#34;padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;&#34; alt=&#34;&#34; src=&#34;https://i2.wp.com/i.zemanta.com/noimg_11_80_80.jpg?w=688&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;a style=&#34;display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;&#34; href=&#34;http://stackoverflow.com/questions/4936229/concurrent-or-lock-access-in-bash-script-function&#34; target=&#34;_blank&#34;&gt;Concurrent or lock access in bash script function&lt;/a&gt;
  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;</description>
    </item>
    
    <item>
      <title>cgroups – use to control your cpu and memory</title>
      <link>/2014/01/06/cgroups-control-cpu-memory/</link>
      <pubDate>Mon, 06 Jan 2014 00:33:23 +0000</pubDate>
      
      <guid>/2014/01/06/cgroups-control-cpu-memory/</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;a class=&#34;zem_slink&#34; title=&#34;Cgroups&#34; href=&#34;http://en.wikipedia.org/wiki/Cgroups&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;cgroups&lt;/a&gt;&lt;/strong&gt; is a kernel feature and with &lt;a class=&#34;zem_slink&#34; title=&#34;User space&#34; href=&#34;http://en.wikipedia.org/wiki/User_space&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;userspace&lt;/a&gt; utilities, we can use the feature to control the cpu and memory for per process. So, lets first install the required tools.&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;sudo yum install libcgroup-tools&lt;/pre&gt;
&lt;p&gt;Now, we need to enable the service.&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;sudo systemctl enable cgconfig.service
sudo systemctl enable cgred.service&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;cgconfig.service&lt;/strong&gt; is to enable configuration for cgroups and&lt;br&gt;
&lt;strong&gt;cgred.service&lt;/strong&gt; is to enable configuration for cgroups for processes depending on the name.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Fix typescript files generated with script command</title>
      <link>/2013/12/18/fix-typescript-files-generated-script-command/</link>
      <pubDate>Wed, 18 Dec 2013 00:40:45 +0000</pubDate>
      
      <guid>/2013/12/18/fix-typescript-files-generated-script-command/</guid>
      <description>&lt;p&gt;Generally quite a lot of us would have used the script command. This generates the logs for the session. But the problem with the logs is that it contains a lot of un-readable characters. These characters are mostly from the &lt;a class=&#34;zem_slink&#34; title=&#34;Color code&#34; href=&#34;http://en.wikipedia.org/wiki/Color_code&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;color codes&lt;/a&gt;, and as such can be removed very easily with a single command:&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;cat &lt;a class=&#34;zem_slink&#34; title=&#34;TypeScript&#34; href=&#34;http://www.typescriptlang.org/&#34; target=&#34;_blank&#34; rel=&#34;homepage&#34;&gt;typescript&lt;/a&gt; | 
 perl -pe &#39;s/e([^[]]|[.*.*?[a-zA-Z]|].*?a)//g&#39; | col -b &amp;gt; typescript-processed&lt;/pre&gt;
&lt;p&gt;This assumes the input log file is named as typescript and the output is kept as typescript-processed. You can change the names as required.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>LibreOffice – Formulae Auditing</title>
      <link>/2013/05/30/libreoffice-formulae-auditing/</link>
      <pubDate>Thu, 30 May 2013 01:03:56 +0000</pubDate>
      
      <guid>/2013/05/30/libreoffice-formulae-auditing/</guid>
      <description>&lt;p&gt;If you have a excel sheet with lot of formula’s and you are trying to &lt;a class=&#34;zem_slink&#34; title=&#34;Audit&#34; href=&#34;http://en.wikipedia.org/wiki/Audit&#34; target=&#34;_blank&#34; rel=&#34;noopener wikipedia&#34;&gt;audit&lt;/a&gt; them, then a simple solution is to press “ctrl+`” (i.e. &lt;a class=&#34;zem_slink&#34; title=&#34;Control key&#34; href=&#34;http://en.wikipedia.org/wiki/Control_key&#34; target=&#34;_blank&#34; rel=&#34;noopener wikipedia&#34;&gt;control key&lt;/a&gt; with back tick). This will put the excel sheet in Formula auditing mode and hence all the cells will show the formula rather than the values which will make it easier to audit them. Hope that helps.&lt;/p&gt;
&lt;h6 class=&#34;zemanta-related-title&#34; style=&#34;font-size: 1em;&#34;&gt;
  Related articles
&lt;/h6&gt;
&lt;ul class=&#34;zemanta-article-ul zemanta-article-ul-image&#34; style=&#34;margin: 0; padding: 0; overflow: hidden;&#34;&gt;
  &lt;li class=&#34;zemanta-article-ul-li-image zemanta-article-ul-li&#34; style=&#34;padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;&#34;&gt;
    &lt;a style=&#34;box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;&#34; href=&#34;http://larryrobinson2013.wordpress.com/2013/04/25/52/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;&lt;img style=&#34;padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;&#34; src=&#34;https://i0.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/2013/05/163435771_80_80.jpg?w=688&#34; alt=&#34;&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;a style=&#34;display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;&#34; href=&#34;http://larryrobinson2013.wordpress.com/2013/04/25/52/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Tips about Excel&lt;/a&gt;
  &lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;zemanta-pixie&#34; style=&#34;margin-top: 10px; height: 15px;&#34;&gt;
  &lt;a class=&#34;zemanta-pixie-a&#34; title=&#34;Enhanced by Zemanta&#34; href=&#34;http://www.zemanta.com/?px&#34;&gt;&lt;img class=&#34;zemanta-pixie-img&#34; style=&#34;border: none; float: right;&#34; src=&#34;https://i1.wp.com/img.zemanta.com/zemified_e.png?w=688&#34; alt=&#34;Enhanced by Zemanta&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;
&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>cksum – compare for multiple files.</title>
      <link>/2013/04/30/cksum-compare-multiple-files/</link>
      <pubDate>Tue, 30 Apr 2013 01:15:30 +0000</pubDate>
      
      <guid>/2013/04/30/cksum-compare-multiple-files/</guid>
      <description>&lt;p&gt;If you have to compare cksum for couple of &lt;a class=&#34;zem_slink&#34; title=&#34;Computer file&#34; href=&#34;http://en.wikipedia.org/wiki/Computer_file&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;files&lt;/a&gt;, the you know how cumbersome it is. So, I wrote a simple script, wherein you can create a file called cksums in the &lt;a class=&#34;zem_slink&#34; title=&#34;Working directory&#34; href=&#34;http://en.wikipedia.org/wiki/Working_directory&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;current directory&lt;/a&gt; and &lt;a class=&#34;zem_slink&#34; title=&#34;Cut, copy, and paste&#34; href=&#34;http://en.wikipedia.org/wiki/Cut%2C_copy%2C_and_paste&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;copy paste&lt;/a&gt; the result of  “**cksums ***”  into this file, and then run this script. Cool 🙂&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;#!/bin/bash -
#===============================================================================
#
#          FILE: checkcksums.sh
#
#         USAGE: ./checkcksums.sh
#
#   DESCRIPTION: Compare cksums of multiple files.
#
#       OPTIONS: ---
#  REQUIREMENTS: ---
#          BUGS: ---
#         NOTES: ---
#        AUTHOR: Amit Agarwal (),
#  ORGANIZATION:
#       CREATED: 02/22/2013 09:12:17 PM IST
#      REVISION:  ---
#===============================================================================

file=cksums
while read line
do
    a=( $(echo $line) )
    if [[ -f ${a[2]} ]]
    then
        b=( $(cksum ${a[2]}) )
        if [[ $a == $b ]]
        then
            echo &#34;Cksum for ${a[2]} = ${a[0]} matches&#34;
        else
            echo &#34;Failed ::Cksum for ${a[2]} = ${a[0]} matches&#34;
        fi
    else
        echo &#34;Failed :: file ${a[2]} does not exist&#34;
    fi
done &amp;lt; $file&lt;/pre&gt;
&lt;h6 class=&#34;zemanta-related-title&#34; style=&#34;font-size: 1em;&#34;&gt;
  Related articles
&lt;/h6&gt;
&lt;ul class=&#34;zemanta-article-ul zemanta-article-ul-image&#34; style=&#34;margin: 0; padding: 0; overflow: hidden;&#34;&gt;
  &lt;li class=&#34;zemanta-article-ul-li-image zemanta-article-ul-li&#34; style=&#34;padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;&#34;&gt;
    &lt;a style=&#34;box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;&#34; href=&#34;https://pypi.python.org/pypi/pycksum/0.4.0&#34; target=&#34;_blank&#34;&gt;&lt;img style=&#34;padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;&#34; alt=&#34;&#34; src=&#34;https://i2.wp.com/i.zemanta.com/148494503_80_80.jpg?w=688&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;a style=&#34;display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;&#34; href=&#34;https://pypi.python.org/pypi/pycksum/0.4.0&#34; target=&#34;_blank&#34;&gt;pycksum 0.4.0&lt;/a&gt;
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li-image zemanta-article-ul-li&#34; style=&#34;padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;&#34;&gt;
    &lt;a style=&#34;box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;&#34; href=&#34;http://blog.yjl.im/2013/03/checking-if-files-are-different-using.html&#34; target=&#34;_blank&#34;&gt;&lt;img style=&#34;padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;&#34; alt=&#34;&#34; src=&#34;https://i2.wp.com/i.zemanta.com/noimg_32_80_80.jpg?w=688&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;a style=&#34;display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;&#34; href=&#34;http://blog.yjl.im/2013/03/checking-if-files-are-different-using.html&#34; target=&#34;_blank&#34;&gt;Checking if files are different using cmp&lt;/a&gt;
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li-image zemanta-article-ul-li&#34; style=&#34;padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;&#34;&gt;
    &lt;a style=&#34;box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;&#34; href=&#34;http://www.daniweb.com/software-development/cpp/threads/451256/alternative-to-md5-hash&#34; target=&#34;_blank&#34;&gt;&lt;img style=&#34;padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;&#34; alt=&#34;&#34; src=&#34;https://i2.wp.com/i.zemanta.com/156191525_80_80.jpg?w=688&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;a style=&#34;display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;&#34; href=&#34;http://www.daniweb.com/software-development/cpp/threads/451256/alternative-to-md5-hash&#34; target=&#34;_blank&#34;&gt;Alternative to MD5 hash?&lt;/a&gt;
  &lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;zemanta-pixie&#34; style=&#34;margin-top: 10px; height: 15px;&#34;&gt;
  &lt;a class=&#34;zemanta-pixie-a&#34; title=&#34;Enhanced by Zemanta&#34; href=&#34;http://www.zemanta.com/?px&#34;&gt;&lt;img class=&#34;zemanta-pixie-img&#34; style=&#34;border: none; float: right;&#34; alt=&#34;Enhanced by Zemanta&#34; src=&#34;https://i1.wp.com/img.zemanta.com/zemified_e.png?w=688&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;
&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>dnsmasq not starting from NetworkManager with SELinux enabled.</title>
      <link>/2013/03/16/dnsmasq-starting-networkmanager-selinux-enabled/</link>
      <pubDate>Sat, 16 Mar 2013 11:34:11 +0000</pubDate>
      
      <guid>/2013/03/16/dnsmasq-starting-networkmanager-selinux-enabled/</guid>
      <description>&lt;figure style=&#34;width: 240px&#34; class=&#34;wp-caption alignright&#34;&gt;&lt;a href=&#34;http://www.flickr.com/photos/96408062@N00/3894034368&#34; target=&#34;_blank&#34;&gt;&lt;img class=&#34;zemanta-img-inserted zemanta-img-configured&#34; title=&#34;OpenWrt - Dnsmasq&#34; alt=&#34;OpenWrt - Dnsmasq&#34; src=&#34;https://i0.wp.com/farm3.static.flickr.com/2571/3894034368_2f9d8ec51b_m.jpg?resize=240%2C195&#34; width=&#34;240&#34; height=&#34;195&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;figcaption class=&#34;wp-caption-text&#34;&gt;OpenWrt &amp;#8211; Dnsmasq (Photo credit: magicfab)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Some time back I posted on &lt;a href=&#34;http://blog.amit-agarwal.co.in/2013/01/28/dnsmasq-network-manager/&#34; title=&#34;dnsmasq – use with Network Manager.&#34;&gt;dnsmasq starting from Network Manager&lt;/a&gt; and how to &lt;a href=&#34;http://blog.amit-agarwal.co.in/2010/04/30/local-dns-server-for-faster-dns-response-time/&#34; title=&#34;Local DNS Server for faster DNS response time&#34;&gt;setup dnsmasq&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Now, couple of days back , I setup dnsmasq in &lt;a class=&#34;zem_slink&#34; title=&#34;NetworkManager&#34; href=&#34;http://projects.gnome.org/NetworkManager/&#34; target=&#34;_blank&#34; rel=&#34;homepage&#34;&gt;NetworkManager&lt;/a&gt; but was astonished to see that there was no dnsmasq running. I checked with dig and saw that there was no response from localhost for &lt;a class=&#34;zem_slink&#34; title=&#34;Domain Name System&#34; href=&#34;http://en.wikipedia.org/wiki/Domain_Name_System&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;dns&lt;/a&gt; queries. Checked “ps -eaf|&lt;a class=&#34;zem_slink&#34; title=&#34;Grep&#34; href=&#34;http://en.wikipedia.org/wiki/Grep&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;grep&lt;/a&gt; dns” and found that there was no dnsmasq running. I knew that once you mention “&lt;strong&gt;dns=dnsmasq&lt;/strong&gt;” in the NetworkManager then it should start up but that was not happening. And then I checked audit log, found that some permissions were denied by &lt;a class=&#34;zem_slink&#34; title=&#34;Security-Enhanced Linux&#34; href=&#34;http://en.wikipedia.org/wiki/Security-Enhanced_Linux&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;SELinux&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ssh reverse tunning..</title>
      <link>/2013/02/14/ssh-reverse-tunning/</link>
      <pubDate>Thu, 14 Feb 2013 00:41:21 +0000</pubDate>
      
      <guid>/2013/02/14/ssh-reverse-tunning/</guid>
      <description>&lt;p&gt;If you want to access some local resources like the release website from the &lt;a class=&#34;zem_slink&#34; title=&#34;Server (computing)&#34; href=&#34;http://en.wikipedia.org/wiki/Server_%28computing%29&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;remote server&lt;/a&gt; when you are connecting to the remoter server using &lt;a class=&#34;zem_slink&#34; title=&#34;Secure Shell&#34; href=&#34;http://en.wikipedia.org/wiki/Secure_Shell&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;ssh&lt;/a&gt; over &lt;a class=&#34;zem_slink&#34; title=&#34;Virtual private network&#34; href=&#34;http://en.wikipedia.org/wiki/Virtual_private_network&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;VPN&lt;/a&gt;, then possibly reverse ssh tunnelling is the best option. So, basically when you are connecting to the remote server, you tell the server your intent to do so and which local resource you want to connect to and on which port.So, here I want to connnet to google.com and tunnel the data to 192.168.131.921:9090 tthough the tunnel, then the command to use will be  ::&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dnsmasq – use with Network Manager.</title>
      <link>/2013/01/28/dnsmasq-network-manager/</link>
      <pubDate>Mon, 28 Jan 2013 00:42:24 +0000</pubDate>
      
      <guid>/2013/01/28/dnsmasq-network-manager/</guid>
      <description>&lt;figure style=&#34;width: 221px&#34; class=&#34;wp-caption alignright&#34;&gt;&lt;a href=&#34;http://roadtrafficsigns.com/RT/One-Way-Signs-An-American-History.aspx&#34; target=&#34;_blank&#34;&gt;&lt;img class=&#34;zemanta-img-inserted zemanta-img-configured&#34; title=&#34;Niles Machine Company&#34; alt=&#34;Niles Machine Company&#34; src=&#34;https://i1.wp.com/roadtrafficsigns.com/img/art/Niles-Machine-Company.jpg?resize=221%2C279&#34; width=&#34;221&#34; height=&#34;279&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;figcaption class=&#34;wp-caption-text&#34;&gt;Niles Machine Company (Photo credits: roadtrafficsigns.com)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Well if you have not heard about dnsmasq:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a class=&#34;zem_slink&#34; title=&#34;Dnsmasq&#34; href=&#34;http://www.thekelleys.org.uk/dnsmasq/&#34; target=&#34;_blank&#34; rel=&#34;homepage&#34;&gt;Dnsmasq&lt;/a&gt; is lightweight, easy to configure &lt;a class=&#34;zem_slink&#34; title=&#34;Domain Name System&#34; href=&#34;http://en.wikipedia.org/wiki/Domain_Name_System&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;DNS&lt;/a&gt; forwarder and &lt;a class=&#34;zem_slink&#34; title=&#34;Dynamic Host Configuration Protocol&#34; href=&#34;http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;DHCP server&lt;/a&gt;.&lt;br&gt;
It is designed to provide DNS and, optionally, DHCP, to a small network.&lt;br&gt;
It can serve the names of local machines which are not in the global&lt;br&gt;
DNS. The DHCP server integrates with the &lt;a class=&#34;zem_slink&#34; title=&#34;Name server&#34; href=&#34;http://en.wikipedia.org/wiki/Name_server&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;DNS server&lt;/a&gt; and allows machines&lt;br&gt;
with DHCP-allocated addresses to appear in the DNS with names configured&lt;br&gt;
either in each host or in a central &lt;a class=&#34;zem_slink&#34; title=&#34;Configuration file&#34; href=&#34;http://en.wikipedia.org/wiki/Configuration_file&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;configuration file&lt;/a&gt;. Dnsmasq supports&lt;br&gt;
static and dynamic DHCP leases and &lt;a class=&#34;zem_slink&#34; title=&#34;Bootstrap Protocol&#34; href=&#34;http://en.wikipedia.org/wiki/Bootstrap_Protocol&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;BOOTP&lt;/a&gt; for &lt;a class=&#34;zem_slink&#34; title=&#34;Network booting&#34; href=&#34;http://en.wikipedia.org/wiki/Network_booting&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;network booting&lt;/a&gt; of diskless&lt;br&gt;
machines.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Music players on Linux – the poor mans random song player.</title>
      <link>/2012/07/20/music-players-linux-poor-mans-random-song-player/</link>
      <pubDate>Fri, 20 Jul 2012 06:06:43 +0000</pubDate>
      
      <guid>/2012/07/20/music-players-linux-poor-mans-random-song-player/</guid>
      <description>&lt;p&gt;If you have more applications running on your system then your system can handle them then you know what I mean when I say that the Music Players take a lot of &lt;a class=&#34;zem_slink&#34; title=&#34;Central processing unit&#34; href=&#34;http://en.wikipedia.org/wiki/Central_processing_unit&#34; rel=&#34;wikipedia&#34; target=&#34;_blank&#34;&gt;CPU&lt;/a&gt;. Otherwise harmless, but when you are doing too many things, then lot of times you would feel that probably stopping the Music player might help. But then &lt;a class=&#34;zem_slink&#34; title=&#34;Linux&#34; href=&#34;http://en.wikipedia.org/wiki/Linux&#34; rel=&#34;wikipedia&#34; target=&#34;_blank&#34;&gt;Linux&lt;/a&gt; is all about alternatives. So, there is a &lt;a class=&#34;zem_slink&#34; title=&#34;Command-line interface&#34; href=&#34;http://en.wikipedia.org/wiki/Command-line_interface&#34; rel=&#34;wikipedia&#34; target=&#34;_blank&#34;&gt;command line&lt;/a&gt; player called &lt;a class=&#34;zem_slink&#34; title=&#34;Mpg123&#34; href=&#34;http://mpg123.org/&#34; rel=&#34;homepage&#34; target=&#34;_blank&#34;&gt;mpg123&lt;/a&gt;, which does not use so much CPU. But what about &lt;a class=&#34;zem_slink&#34; title=&#34;Playlist&#34; href=&#34;http://en.wikipedia.org/wiki/Playlist&#34; rel=&#34;wikipedia&#34; target=&#34;_blank&#34;&gt;playlist&lt;/a&gt; 🙂&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Array of all possible colors in bash script</title>
      <link>/2012/05/07/array-colors-bash-script/</link>
      <pubDate>Mon, 07 May 2012 02:17:18 +0000</pubDate>
      
      <guid>/2012/05/07/array-colors-bash-script/</guid>
      <description>&lt;p&gt;Sometime back, we had looked at using colors in &lt;a class=&#34;zem_slink&#34; title=&#34;Bash (Unix shell)&#34; href=&#34;http://www.gnu.org/software/bash/&#34; rel=&#34;homepage&#34; target=&#34;_blank&#34;&gt;bash script&lt;/a&gt; and here is a way to create a array of all the colors.&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;#!/bin/bash - 
#===============================================================================
#
#          FILE:  colorarray.sh
# 
#         USAGE:  ./colorarray.sh 
# 
#   DESCRIPTION:  
# 
#       OPTIONS:  ---
#  REQUIREMENTS:  ---
#          BUGS:  ---
#         NOTES:  ---
#        AUTHOR: Amit Agarwal (aka), amit.agarwal@roamware.com
#       COMPANY: Roamware India Pvt Ltd
#       CREATED: 16/04/12 17:24:09 IST
# Last modified: Mon Apr 16, 2012  05:39PM
#      REVISION:  ---
#===============================================================================
count=0
for i in 40m 41m 42m 43m 44m 45m 46m 47m
do
    for l in 0 1
    do
        echo -n &#34;l=$l &#34;
        for k in 0 1
        do
            # echo -n &#34;k=$k &#34;
            for j in {30..37}
            do
                carr[$count]=&#34;\033[$k;$j;$l;$i&#34;
                echo -ne &#34;${carr[$count]}$count \033[00m&#34;
                ((count++))
            done
        done
        echo
    done
    echo
done&lt;/pre&gt;
&lt;p&gt;You can add this script to any script of your choice and you have all the 256 colors available to you in the script without additional coding. Happy coding.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>colors in bash scripts</title>
      <link>/2012/04/30/colors-bash-scripts/</link>
      <pubDate>Mon, 30 Apr 2012 03:52:29 +0000</pubDate>
      
      <guid>/2012/04/30/colors-bash-scripts/</guid>
      <description>&lt;figure style=&#34;width: 240px&#34; class=&#34;wp-caption alignright&#34;&gt;&lt;a href=&#34;http://www.flickr.com/photos/90525468@N00/84319781&#34; target=&#34;_blank&#34;&gt;&lt;img class=&#34;zemanta-img-inserted zemanta-img-configured&#34; title=&#34;Colours&#34; src=&#34;https://i2.wp.com/farm1.static.flickr.com/41/84319781_769e3cbfc2_m.jpg?resize=240%2C182&#34; alt=&#34;Colours&#34; width=&#34;240&#34; height=&#34;182&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;figcaption class=&#34;wp-caption-text&#34;&gt;Colours (Photo credit: CherrySoda!)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;I have been trying to understand the &lt;a class=&#34;zem_slink&#34; title=&#34;Color code&#34; href=&#34;http://en.wikipedia.org/wiki/Color_code&#34; rel=&#34;wikipedia&#34; target=&#34;_blank&#34;&gt;color codes&lt;/a&gt; for &lt;a class=&#34;zem_slink&#34; title=&#34;Bash (Unix shell)&#34; href=&#34;http://www.gnu.org/software/bash/&#34; rel=&#34;homepage&#34; target=&#34;_blank&#34;&gt;bash&lt;/a&gt; for a pretty long time, but somehow never got time to understand this clearly. So this time around when I was writing a &lt;a class=&#34;zem_slink&#34; title=&#34;Screenplay&#34; href=&#34;http://en.wikipedia.org/wiki/Screenplay&#34; rel=&#34;wikipedia&#34; target=&#34;_blank&#34;&gt;script&lt;/a&gt; to analyze some logs. I thought I will give it a go and finally understood some part of this.&lt;/p&gt;
&lt;p&gt;So, first we will start with this script. This is taken from &lt;a href=&#34;http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Your own local search engine.</title>
      <link>/2012/04/09/local-search-engine/</link>
      <pubDate>Mon, 09 Apr 2012 02:31:17 +0000</pubDate>
      
      <guid>/2012/04/09/local-search-engine/</guid>
      <description>&lt;p&gt;There are times when you would want to have a &lt;a class=&#34;zem_slink&#34; title=&#34;Local search (Internet)&#34; href=&#34;http://en.wikipedia.org/wiki/Local_search_%28Internet%29&#34; rel=&#34;wikipedia&#34; target=&#34;_blank&#34;&gt;local search engine&lt;/a&gt; capable of indexing even pdf and doc files. So here is a solution.&lt;/p&gt;
&lt;p&gt;You can use “Omega” and here are the instructions.&lt;/p&gt;
&lt;p&gt;download omega from &lt;a href=&#34;http://xapian.org/download&#34;&gt;http:// xapian.org/download&lt;/a&gt;&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;yum install xapian libuuid-devel&lt;/pre&gt;
&lt;p&gt;And then make and install omega and for this you can follow the &lt;a href=&#34;http://trac.xapian.org/wiki/OmegaExample&#34;&gt;instructions&lt;/a&gt;.&lt;/p&gt;
&lt;figure style=&#34;width: 300px&#34; class=&#34;wp-caption alignright&#34;&gt;&lt;a href=&#34;http://commons.wikipedia.org/wiki/File:Fed_search.png&#34; target=&#34;_blank&#34;&gt;&lt;img class=&#34;zemanta-img-inserted zemanta-img-configured&#34; title=&#34;Federated Search Engine Diagram&#34; src=&#34;http://upload.wikimedia.org/wikipedia/commons/thumb/f/fe/Fed_search.png/300px-Fed_search.png&#34; alt=&#34;Federated Search Engine Diagram&#34; width=&#34;300&#34; height=&#34;204&#34; /&gt;&lt;/a&gt;&lt;figcaption class=&#34;wp-caption-text&#34;&gt;Federated Search Engine Diagram (Photo credit: Wikipedia)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Create index using command omindex&lt;br&gt;
and then you can use quest or search.py to search or you can setup the cgi way so that you can use local browser to search.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Setup your own RFC Editor for Linux.</title>
      <link>/2012/03/05/setup-rfc-editor-linux/</link>
      <pubDate>Mon, 05 Mar 2012 11:51:54 +0000</pubDate>
      
      <guid>/2012/03/05/setup-rfc-editor-linux/</guid>
      <description>&lt;figure style=&#34;width: 249px&#34; class=&#34;wp-caption alignright&#34;&gt;&lt;a href=&#34;http://commons.wikipedia.org/wiki/File:Tux-shaded.svg&#34; target=&#34;_blank&#34;&gt;&lt;img class=&#34;zemanta-img-inserted zemanta-img-configured&#34; title=&#34;Tux, the Linux penguin&#34; src=&#34;http://upload.wikimedia.org/wikipedia/commons/thumb/0/0a/Tux-shaded.svg/249px-Tux-shaded.svg.png&#34; alt=&#34;Tux, the Linux penguin&#34; width=&#34;249&#34; height=&#34;297&#34; /&gt;&lt;/a&gt;&lt;figcaption class=&#34;wp-caption-text&#34;&gt;Image via Wikipedia&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Well, if you are a professional who has to keep referring to &lt;a class=&#34;zem_slink&#34; title=&#34;Request for Comments&#34; href=&#34;http://en.wikipedia.org/wiki/Request_for_Comments&#34; rel=&#34;wikipedia&#34; target=&#34;_blank&#34;&gt;RFC&lt;/a&gt;, then you know how good it would be to have the RFC &lt;a class=&#34;zem_slink&#34; title=&#34;Uploading and downloading&#34; href=&#34;http://en.wikipedia.org/wiki/Uploading_and_downloading&#34; rel=&#34;wikipedia&#34; target=&#34;_blank&#34;&gt;downloaded&lt;/a&gt; and kept in your computer. But then unless you can search it and use and editor with it, its of not much use. So, here is something  that you can do :&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using file partially for filenames</title>
      <link>/2012/02/12/file-partially-filenames/</link>
      <pubDate>Sun, 12 Feb 2012 06:02:19 +0000</pubDate>
      
      <guid>/2012/02/12/file-partially-filenames/</guid>
      <description>&lt;p&gt;There are some commands that take &lt;a class=&#34;zem_slink&#34; title=&#34;Filename&#34; href=&#34;http://en.wikipedia.org/wiki/Filename&#34; rel=&#34;wikipedia&#34;&gt;file name&lt;/a&gt; and there are some case where you need to give file name. But there are some cases where you want to modify the file before passing it to the command. What do you do in these case’s?&lt;/p&gt;
&lt;p&gt;I had a file containing huge amount of data and for some testing I wanted to pass only the first few lines of the file and not the complete file.  And since the file only accepted filename and would not take any input from the &lt;a class=&#34;zem_slink&#34; title=&#34;Standard streams&#34; href=&#34;http://en.wikipedia.org/wiki/Standard_streams&#34; rel=&#34;wikipedia&#34;&gt;STDIN&lt;/a&gt; so only option was to create a file with the required data in a &lt;a class=&#34;zem_slink&#34; title=&#34;Temporary file&#34; href=&#34;http://en.wikipedia.org/wiki/Temporary_file&#34; rel=&#34;wikipedia&#34;&gt;temporary file&lt;/a&gt;. So, I sat back to figure out some way to do it and finally found I can use this:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Benchmarking the system/CPU performance</title>
      <link>/2012/01/15/benchmarking-system-cpu-performance/</link>
      <pubDate>Sun, 15 Jan 2012 07:56:44 +0000</pubDate>
      
      <guid>/2012/01/15/benchmarking-system-cpu-performance/</guid>
      <description>&lt;p&gt;Have you ever wanted to have a quick check on your CPU performance. I know that lot of people will say that this is not the right way to do this, but here is something that you can use to check the CPU speed.&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;#!/bin/bash -
#===============================================================================
#
#          FILE:  benchmark.sh
#
#         USAGE:  ./benchmark.sh
#
#   DESCRIPTION:  Benchmark the CPU
#
#       OPTIONS:  ---
#  REQUIREMENTS:  ---
#          BUGS:  ---
#         NOTES:  ---
#        AUTHOR: Amit Agarwal (aka), amit.agarwal@roamware.com
#       COMPANY: Roamware India Pvt Ltd
#       CREATED: 09/21/2011 11:46:03 AM IST
# Last modified: Wed Sep 21, 2011  12:22PM
#      REVISION:  ---
#===============================================================================

add ()
{
    COUNTER=0
    exec 2&amp;gt;&amp;1
    time=$(exec 2&amp;gt;&amp;1;(time while [[  $COUNTER -lt 100000 ]]; do ((COUNTER++)) \
        ; done))
    echo &#34;Time for 100000 additions is &#34;$time
}	# ----------  end of function add  ----------
mul ()
{
    COUNTER=0
    test=2
    exec 2&amp;gt;&amp;1
    time=$(exec 2&amp;gt;&amp;1;(time while [[  $COUNTER -lt 100000 ]]; do ((COUNTER++)) \
        ; ((test=test*2));done))
    echo &#34;Time for 100000 mul is &#34;$time
}	# ----------  end of function add  ----------
div ()
{
    COUNTER=0
    test=1000000000000
    exec 2&amp;gt;&amp;1
    time=$(exec 2&amp;gt;&amp;1;(time while [[  $COUNTER -lt 100000 ]]; do ((COUNTER++)) \
        ; (( test=test/2)); done)|tr -d &#39;\n&#39;)
    echo &#34;Time for 100000 divisions is &#34;${time}
}	# ----------  end of function add  ----------

time add
time mul
time div&lt;/pre&gt;
&lt;p&gt;And here is the output :&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>BASH Script Performace</title>
      <link>/2012/01/06/bash-script-performace/</link>
      <pubDate>Fri, 06 Jan 2012 06:38:04 +0000</pubDate>
      
      <guid>/2012/01/06/bash-script-performace/</guid>
      <description>&lt;p&gt;Today we will look at some bash code snippests and the performance issues. Lets first look at the problem and the implemented solution:&lt;/p&gt;
&lt;p&gt;Problem: We needed to log the output of the ps command for all the process’s. This was required to be done on per minute basis and the output was required in comma separated files. So, here is what was implemented:&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;pslog=`ps -e -opid,ppid,user,nlwp,pmem,vsz,rss,s,time,stime,pri,nice,pcp:u,args|grep -v PID|sort -r -k 13,13`
        OLD_IFS=$IFS
        IFS=$&#39;\n&#39;
        logarr=( $pslog )
        for LOGLINE in ${logarr[@]}
        do
                LOGLINE=`echo $LOGLINE|awk &#39;{OFS=&#34;,&#34;;print $1,$2,$3,$4,$5,$6,$7,:$8,$9,$10,$11,$12,$13,$14}&#39;`
                echo $LOGLINE &amp;gt;&amp;gt; output
        done
        IFS=$OLD_IFS&lt;/pre&gt;
&lt;p&gt;This was working well and there were no issues. But suddenly we started seeing issues with the reported &lt;a class=&#34;zem_slink&#34; title=&#34;Central processing unit&#34; href=&#34;http://en.wikipedia.org/wiki/Central_processing_unit&#34; rel=&#34;wikipedia&#34;&gt;CPU&lt;/a&gt; usages. We would see that whenever this script was running the &lt;a class=&#34;zem_slink&#34; title=&#34;CPU time&#34; href=&#34;http://en.wikipedia.org/wiki/CPU_time&#34; rel=&#34;wikipedia&#34;&gt;CPU usage&lt;/a&gt; was high, specially if there were too many process’s/thread’s on the system during that time.  This code was definitely part of a very large &lt;a class=&#34;zem_slink&#34; title=&#34;Codebase&#34; href=&#34;http://en.wikipedia.org/wiki/Codebase&#34; rel=&#34;wikipedia&#34;&gt;code base&lt;/a&gt;, and at this point of time we did not know what was causing the issues.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Rekursive Grep on Solaris or AIX Systems without GNU egrep -r funcionality</title>
      <link>/2011/12/16/rekursive-grep-solaris-aix-systems-gnu-egrep-r-funcionality/</link>
      <pubDate>Fri, 16 Dec 2011 03:00:27 +0000</pubDate>
      
      <guid>/2011/12/16/rekursive-grep-solaris-aix-systems-gnu-egrep-r-funcionality/</guid>
      <description>&lt;p&gt;If you work regularly on a &lt;a class=&#34;zem_slink&#34; title=&#34;Solaris (operating system)&#34; href=&#34;http://oracle.com/solaris&#34; rel=&#34;homepage&#34;&gt;Solaris&lt;/a&gt; or systems which do not have the “-r” (recursive &lt;a class=&#34;zem_slink&#34; title=&#34;Grep&#34; href=&#34;http://en.wikipedia.org/wiki/Grep&#34; rel=&#34;wikipedia&#34;&gt;grep&lt;/a&gt;) for grep, then you know what a lifesaver this command can be.&lt;/p&gt;
&lt;p&gt;Here is one from &lt;a class=&#34;zem_slink&#34; title=&#34;Command-line interface&#34; href=&#34;http://en.wikipedia.org/wiki/Command-line_interface&#34; rel=&#34;wikipedia&#34;&gt;command line&lt;/a&gt; fu:&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;find . -type f -exec awk &#39;/linux/ { printf &#34;%s %s: %s\n&#34;, FILENAME, NR, $0; }&#39; {} \;&lt;/pre&gt;
&lt;p&gt;The benefit of using awk here is that you can print the line number also 🙂&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Backup of files in the directory.</title>
      <link>/2011/12/01/backup-files-directory/</link>
      <pubDate>Thu, 01 Dec 2011 11:39:24 +0000</pubDate>
      
      <guid>/2011/12/01/backup-files-directory/</guid>
      <description>&lt;p&gt;I was working on some scripts and the changes that I was making in the scripts was very dynamic, which I did want to keep backing up in the version control system. But for the peace of my mind, I wanted to keep a copy of the scripts, whenever it was in working state.&lt;/p&gt;
&lt;p&gt;Since I had multiple files, so it would make more sense to have a script that could copy all the files in the &lt;a class=&#34;zem_slink&#34; title=&#34;Working directory&#34; href=&#34;http://en.wikipedia.org/wiki/Working_directory&#34; rel=&#34;wikipedia&#34;&gt;current directory&lt;/a&gt; to “old” directory without over-writing the existing files. So, I wrote a script that would postfix the files with a number. With this approach, finally what I had was the following:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Linux hardware details.</title>
      <link>/2011/11/28/linux-hardware-details/</link>
      <pubDate>Mon, 28 Nov 2011 11:20:25 +0000</pubDate>
      
      <guid>/2011/11/28/linux-hardware-details/</guid>
      <description>&lt;p&gt;Here is one of the scripts that I found on the net while searching for something … Note the &lt;a class=&#34;zem_slink&#34; title=&#34;Uniform Resource Locator&#34; href=&#34;http://en.wikipedia.org/wiki/Uniform_Resource_Locator&#34; rel=&#34;wikipedia&#34;&gt;URL&lt;/a&gt; for the script in the Description.&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;#!/bin/bash -
#===============================================================================
#
#          FILE:  linux_hw.sh
#
#         USAGE:  ./linux_hw.sh
#
#   DESCRIPTION:  http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/
#
#       OPTIONS:  ---
#  REQUIREMENTS:  ---
#          BUGS:  ---
#         NOTES:  ---
#        AUTHOR: &lt;a class=&#34;zem_slink&#34; title=&#34;Amit Agarwal&#34; href=&#34;http://www.labnol.org/about/&#34; rel=&#34;homepage&#34;&gt;Amit Agarwal&lt;/a&gt; (aka), amit.agarwal@roamware.com
#       COMPANY: Roamware India Pvt Ltd
#       CREATED: 09/13/2011 03:57:34 PM IST
# Last modified: Sun Oct 30, 2011  04:59PM
#      REVISION:  ---
#===============================================================================

function linux_hw_CPU {
	&lt;a class=&#34;zem_slink&#34; title=&#34;Typesetting&#34; href=&#34;http://en.wikipedia.org/wiki/Typesetting&#34; rel=&#34;wikipedia&#34;&gt;typeset&lt;/a&gt; num=0
	typeset name=&#34;&#34;
	typeset cores=&#34;&#34;
	name=&#34;$( cat &lt;a class=&#34;zem_slink&#34; title=&#34;Procfs&#34; href=&#34;http://en.wikipedia.org/wiki/Procfs&#34; rel=&#34;wikipedia&#34;&gt;/proc/cpuinfo&lt;/a&gt; | awk -F: &#39;
/vendor_id/ { vendor=$2 }
/model name/ { model=$2 }
/cpu &lt;a class=&#34;zem_slink&#34; title=&#34;Hertz&#34; href=&#34;http://en.wikipedia.org/wiki/Hertz&#34; rel=&#34;wikipedia&#34;&gt;MHz&lt;/a&gt;/ {
if( model ~ &#34;Hz&#34; ) {speed=&#34;&#34;} else { speed=$2? MHz&#34; };
print vendor, model, speed; }
		&#39; | tail -1
	)&#34;

        num=$(if [ -r /proc/vmware/cpuinfo ]; then awk &#39;/pcpu/ { print NF-1 }&#39; /proc/vmware/cpuinfo; else cat /proc/cpuinfo | &lt;a class=&#34;zem_slink&#34; title=&#34;Grep&#34; href=&#34;http://en.wikipedia.org/wiki/Grep&#34; rel=&#34;wikipedia&#34;&gt;grep&lt;/a&gt; processor| wc -l; fi)

	# ESX: mas info sobre logical/cores/packages
	if [ -r /proc/vmware/sched/ncpus ]
	then
		cores=$( echo $( cat /proc/vmware/sched/ncpus ) )
	fi

	echo $num $( echo &#34;$name ($cores)&#34; | enclose )
}

function enclose {
	tr -s &#34; &#34; | sed -e &#34;s/^/\&#34;/; s/$/\&#34;/; s/\&#34;\ /\&#34;/; s/\ \&#34;/\&#34;/&#34;
}

function linux_hw_CPU {

	typeset num=0
	typeset name=&#34;&#34;
	typeset cores=&#34;&#34;

	name=&#34;$(
		cat /proc/cpuinfo | awk -F: &#39;
/vendor_id/ { vendor=$2 }
/model name/ { model=$2 }
/cpu MHz/ {
if( model ~ &#34;Hz&#34; ) {speed=&#34;&#34;} else { speed=$2&#34; MHz&#34; };
print vendor, model, speed; }
		&#39; | tail -1
	)&#34;

	num=$(
		if [ -r /proc/vmware/cpuinfo ]
		then
			awk &#39;/pcpu/ { print NF-1 }&#39; /proc/vmware/cpuinfo
		else
			cat /proc/cpuinfo | grep processor| wc -l
		fi

	)

	if grep -q &#34;physical id&#34; /proc/cpuinfo || grep &#34;siblings&#34; /proc/cpuinfo
	then
		chip_count=$( grep &#34;physical id&#34; /proc/cpuinfo | sort -u | wc -l )
		chip_core=$( grep &#34;siblings&#34; /proc/cpuinfo | tail -1 | cut -d: -f2 )
		cores=&#34;($chip_count chips x $chip_core cores)&#34;
	fi

	# Blades HP con
	if [ -x /sbin/hpasmcli ]
	then
		chip_name=$( /sbin/hpasmcli -s &#34;SHOW &lt;a class=&#34;zem_slink&#34; title=&#34;Server (computing)&#34; href=&#34;http://en.wikipedia.org/wiki/Server_%28computing%29&#34; rel=&#34;wikipedia&#34;&gt;SERVER&lt;/a&gt;&#34; | grep &#34;Name&#34; | head -1 | cut -d: -f2 )
		chip_speed=$( /sbin/hpasmcli -s &#34;SHOW SERVER&#34; | grep &#34;Speed&#34; | head -1 | cut -d: -f2 )
		chip_core=$( /sbin/hpasmcli -s &#34;SHOW SERVER&#34; | grep &#34;Core&#34; | head -1 | cut -d: -f2 )
	fi

	# ESX: mas info sobre logical/cores/packages
	if [ -r /proc/vmware/sched/ncpus ]
	then
		cores=&#34;($( echo $( cat /proc/vmware/sched/ncpus ) ))&#34;
	fi

	# &lt;a class=&#34;zem_slink&#34; title=&#34;Linux&#34; href=&#34;http://www.kernel.org/&#34; rel=&#34;homepage&#34;&gt;Linux&lt;/a&gt; &lt;a class=&#34;zem_slink&#34; title=&#34;Itanium&#34; href=&#34;http://en.wikipedia.org/wiki/Itanium&#34; rel=&#34;wikipedia&#34;&gt;Itanium&lt;/a&gt; IA64
	if grep -q -i itanium /proc/cpuinfo
	then
		name=&#34;$(
		grep &#34;vendor&#34; /proc/cpuinfo | cut -d: -f2- | tail -1 ) $(
		grep &#34;arch &#34; /proc/cpuinfo | cut -d: -f2- | tail -1 ) $(
		grep &#34;family&#34; /proc/cpuinfo | cut -d: -f2- | tail -1 ) $(
		grep &#34;cpu MHz&#34; /proc/cpuinfo | cut -d: -f2- | cut -d. -f1 | tail -1 ) Mhz&#34;

		chip_count=$( grep &#34;physical id&#34; /proc/cpuinfo | sort -u | wc -l )
		chip_core=$( grep &#34;siblings&#34; /proc/cpuinfo | tail -1 | cut -d: -f2 )
		cores=&#34;($chip_count chips x $chip_core cores)&#34;
	fi

	echo $num $( echo &#34;$name $cores&#34; | enclose )
}

linux_hw_CPU&lt;/pre&gt;
&lt;h6 class=&#34;zemanta-related-title&#34; style=&#34;font-size: 1em;&#34;&gt;
  Related articles
&lt;/h6&gt;
&lt;ul class=&#34;zemanta-article-ul&#34;&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://weijianhui16.wordpress.com/2011/09/06/linux%e6%9f%a5%e7%9c%8b%e7%a1%ac%e4%bb%b6%e4%bf%a1%e6%81%af/&#34;&gt;linux??????&lt;/a&gt; (weijianhui16.wordpress.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://singztechmusings.wordpress.com/2011/06/15/how-to-check-the-uptime-of-a-process-or-an-application-running-in-linux-machine-using-shell-script/&#34;&gt;How to check the uptime of a process (or an application) running in Linux machine using shell script?&lt;/a&gt; (singztechmusings.wordpress.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://javarevisited.wordpress.com/2011/06/15/good-examples-of-grep-command-in-unix-and-linux/&#34;&gt;Some examples of grep command in unix&lt;/a&gt; (javarevisited.wordpress.com)
  &lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;zemanta-pixie&#34; style=&#34;margin-top: 10px; height: 15px;&#34;&gt;
  &lt;a class=&#34;zemanta-pixie-a&#34; title=&#34;Enhanced by Zemanta&#34; href=&#34;http://www.zemanta.com/&#34;&gt;&lt;img class=&#34;zemanta-pixie-img&#34; style=&#34;float: right;&#34; src=&#34;https://i1.wp.com/img.zemanta.com/zemified_e.png?w=688&#34; alt=&#34;Enhanced by Zemanta&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;
&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>Add ssh key to remote host</title>
      <link>/2011/11/15/add-ssh-key-remote-host/</link>
      <pubDate>Tue, 15 Nov 2011 08:00:01 +0000</pubDate>
      
      <guid>/2011/11/15/add-ssh-key-remote-host/</guid>
      <description>&lt;div class=&#34;zemanta-img&#34; style=&#34;margin: 1em; display: block;&#34;&gt;
  &lt;p&gt;
    &lt;figure style=&#34;width: 300px&#34; class=&#34;wp-caption alignright&#34;&gt;&lt;a href=&#34;https://i0.wp.com/commons.wikipedia.org/wiki/File:X11_ssh_tunnelling.png&#34;&gt;&lt;img class=&#34;zemanta-img-configured&#34; title=&#34;Example of tunnelling an X11 application over SSH&#34; src=&#34;https://i1.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/zemanta//300px-X11_ssh_tunnelling.png?resize=300%2C199&#34; alt=&#34;Example of tunnelling an X11 application over SSH&#34; width=&#34;300&#34; height=&#34;199&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;figcaption class=&#34;wp-caption-text&#34;&gt;Image via Wikipedia&lt;/figcaption&gt;&lt;/figure&gt;
  &lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;If you are working on recent versions of the *nix &lt;a class=&#34;zem_slink&#34; title=&#34;Operating system&#34; href=&#34;http://en.wikipedia.org/wiki/Operating_system&#34; rel=&#34;wikipedia&#34;&gt;OS&lt;/a&gt; like &lt;a class=&#34;zem_slink&#34; title=&#34;Fedora (operating system)&#34; href=&#34;http://www.fedoraproject.org/&#34; rel=&#34;homepage&#34;&gt;Fedora&lt;/a&gt; or &lt;a class=&#34;zem_slink&#34; title=&#34;Ubuntu (operating system)&#34; href=&#34;http://www.ubuntu.com/&#34; rel=&#34;homepage&#34;&gt;Ubuntu&lt;/a&gt; then you would know about the commad &lt;a class=&#34;zem_slink&#34; title=&#34;Secure Shell&#34; href=&#34;http://en.wikipedia.org/wiki/Secure_Shell&#34; rel=&#34;wikipedia&#34;&gt;ssh&lt;/a&gt;-copy-id. But if you land up using one of the older versions like &lt;a class=&#34;zem_slink&#34; title=&#34;Solaris (operating system)&#34; href=&#34;http://oracle.com/solaris&#34; rel=&#34;homepage&#34;&gt;Solaris&lt;/a&gt; or something where the command is not present, then probably you need a simpler solution to this. One of the simplest solution is with a lot of assumtions, simply copy the id_rsa file to &lt;a class=&#34;zem_slink&#34; title=&#34;Server (computing)&#34; href=&#34;http://en.wikipedia.org/wiki/Server_%28computing%29&#34; rel=&#34;wikipedia&#34;&gt;remote server&lt;/a&gt; and hope it works. And here is  a script to do just that:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Compare files excluding certain lines.</title>
      <link>/2011/10/18/compare-files-excluding-lines/</link>
      <pubDate>Tue, 18 Oct 2011 11:12:15 +0000</pubDate>
      
      <guid>/2011/10/18/compare-files-excluding-lines/</guid>
      <description>&lt;p&gt;Quick tip, you can use any expression for the &lt;a class=&#34;zem_slink&#34; title=&#34;Sed&#34; href=&#34;http://en.wikipedia.org/wiki/Sed&#34; rel=&#34;wikipedia&#34;&gt;sed&lt;/a&gt; commands in the (). With this trick you can redirect the &lt;a class=&#34;zem_slink&#34; title=&#34;Standard streams&#34; href=&#34;http://en.wikipedia.org/wiki/Standard_streams&#34; rel=&#34;wikipedia&#34;&gt;stdout&lt;/a&gt; of 2 commands to the diff command. This might become very useful, if you want to compare 2 &lt;a class=&#34;zem_slink&#34; title=&#34;Computer file&#34; href=&#34;http://en.wikipedia.org/wiki/Computer_file&#34; rel=&#34;wikipedia&#34;&gt;files&lt;/a&gt;, excluding the first  line.&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;diff &amp;lt;(sed &#39;1d&#39; file) &amp;lt;(sed &#39;1d&#39; file2)&lt;/pre&gt;
&lt;p&gt;More interesting example is where the string &lt;a class=&#34;zem_slink&#34; title=&#34;American Broadcasting Company&#34; href=&#34;http://abc.go.com&#34; rel=&#34;homepage&#34;&gt;ABC&lt;/a&gt; is converted to abc before comparing in the second file with the following command:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Cont: Get yourself some more conkyrc files.</title>
      <link>/2011/10/12/cont-conkyrc-files/</link>
      <pubDate>Wed, 12 Oct 2011 11:03:40 +0000</pubDate>
      
      <guid>/2011/10/12/cont-conkyrc-files/</guid>
      <description>&lt;p&gt;Last time we got ourselves some conkyrc &lt;a class=&#34;zem_slink&#34; title=&#34;Computer file&#34; href=&#34;http://en.wikipedia.org/wiki/Computer_file&#34; rel=&#34;wikipedia&#34;&gt;files&lt;/a&gt; from the ubuntu forums. But that scripts gets the files only from the First page of the thread. Lets extend this further and get the script to get all the conkyrc files.&lt;/p&gt;
&lt;p&gt;There are some 1048 pages in the thread, I am showing pages 1 to 3 but you can change 3 to whatever number you want 🙂&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;count=0
for i in {1..3}
do
    &amp;gt;.test
    &amp;gt;conkyrc
	echo &#34;Getting page $i&#34;
	curl http://ubuntuforums.org/showthread.php?t=281865\&amp;page=$i |&lt;a class=&#34;zem_slink&#34; title=&#34;Path (computing)&#34; href=&#34;http://en.wikipedia.org/wiki/Path_%28computing%29&#34; rel=&#34;wikipedia&#34;&gt;\\&lt;/a&gt;
         &lt;a class=&#34;zem_slink&#34; title=&#34;Sed&#34; href=&#34;http://en.wikipedia.org/wiki/Sed&#34; rel=&#34;wikipedia&#34;&gt;sed&lt;/a&gt; -n &#39;// d&#39;|\
         sed &#39;s##\n-----------------------------------\n\n\n#&#39; \
         &amp;gt;conkyrc
	dos2unix conkyrc
	cp conkyrc .test
	while [ $(wc -l .test|sed &#39;s/[^0-9]//g&#39;) != 0 ]
	do
		sed -n &#39;1,/------------------------/ p&#39; .test|sed &#39;$d&#39; &amp;gt;conkyrc.$count
		diff .test conkyrc.$count |sed &#39;s/^&amp;lt;.//&#39;|sed &#39;1, /---------------------/ d;2d&#39;&amp;gt;.test
		((count++))
	done
	echo &#34;Files so far are : $count&#34;
done&lt;/pre&gt;
&lt;h6 class=&#34;zemanta-related-title&#34; style=&#34;font-size: 1em;&#34;&gt;
  Related articles
&lt;/h6&gt;
&lt;ul class=&#34;zemanta-article-ul&#34;&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://blog.amit-agarwal.co.in/2011/10/05/conkyrc-files/&#34;&gt;Get yourself some conkyrc files.&lt;/a&gt; (amit-agarwal.co.in)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://putokaz.wordpress.com/2011/09/16/htc-like-clock-weather-conky-configuration/&#34;&gt;HTC-Like Clock / Weather Conky Configuration&lt;/a&gt; (putokaz.wordpress.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://lezeng.wordpress.com/2011/10/06/split-and-join-file-on-mac-osx-terminal/&#34;&gt;Split and join file on Mac OSX Terminal&lt;/a&gt; (lezeng.wordpress.com)
  &lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;zemanta-pixie&#34; style=&#34;margin-top: 10px; height: 15px;&#34;&gt;
  &lt;a class=&#34;zemanta-pixie-a&#34; title=&#34;Enhanced by Zemanta&#34; href=&#34;http://www.zemanta.com/&#34;&gt;&lt;img class=&#34;zemanta-pixie-img&#34; style=&#34;float: right;&#34; src=&#34;https://i1.wp.com/img.zemanta.com/zemified_e.png?w=688&#34; alt=&#34;Enhanced by Zemanta&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;
&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>Script to get yourself some conkyrc files</title>
      <link>/2011/10/08/script-conkyrc-files/</link>
      <pubDate>Sat, 08 Oct 2011 10:37:48 +0000</pubDate>
      
      <guid>/2011/10/08/script-conkyrc-files/</guid>
      <description>&lt;p&gt;Continuing from where we left, here is a script that can do all this for you 🙂&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;curl http://ubuntuforums.org/showthread.php?t=281865\&amp;page=$i | sed -n &#39;/\\/pr/ p&#39;| sed &#39;// d&#39;| sed &#39;s##\n-----------------------------------\n\n\n#&#39; &amp;gt;conkyrc
	dos2unix conkyrc
	cp conkyrc .test
	while [ $(wc -l .test|sed &#39;s/[^0-9]//g&#39;) != 0 ]
	do
		sed -n &#39;1,/------------------------/ p&#39; .test|sed &#39;$d&#39; &amp;gt;conkyrc.$count
		diff .test conkyrc.$count |sed &#39;s/^&amp;lt;.//&#39;|sed &#39;1, /---------------------/ d;2d&#39;&amp;gt;.test
		((count++))
	done&lt;/pre&gt;
&lt;p&gt;This will create couple of conkyrc.files in the &lt;a class=&#34;zem_slink&#34; title=&#34;Working directory&#34; href=&#34;http://en.wikipedia.org/wiki/Working_directory&#34; rel=&#34;wikipedia&#34;&gt;current directory&lt;/a&gt;. Each of these is one from the &lt;a class=&#34;zem_slink&#34; title=&#34;Web page&#34; href=&#34;http://en.wikipedia.org/wiki/Web_page&#34; rel=&#34;wikipedia&#34;&gt;web-page&lt;/a&gt; that I mentioned earlier. So, enjoy….&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Creating a chroot environment – the script.</title>
      <link>/2011/09/23/creating-chroot-environment-script/</link>
      <pubDate>Fri, 23 Sep 2011 09:47:48 +0000</pubDate>
      
      <guid>/2011/09/23/creating-chroot-environment-script/</guid>
      <description>&lt;p&gt;Here is the script, very simple and effective 🙂&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;#!/bin/bash -
#===============================================================================
#
#          FILE:  mkchroot.sh
#
#         USAGE:  ./mkchroot.sh
#
#   DESCRIPTION:  Make a  chroot environ and cd to it
#
#       OPTIONS:  ---
#  REQUIREMENTS:  ---
#          BUGS:  ---
#         NOTES:  ---
#        AUTHOR: Amit Agarwal (aka), 
#       CREATED: 09/03/2011 02:53:37 PM IST
# Last modified: Sat Sep 03, 2011  03:11PM
#      REVISION:  ---
#===============================================================================

 binaries=( bash2 ls cat vi vim sudo)
#===  FUNCTION  ================================================================
#          NAME:  copy_binary
#   DESCRIPTION:  copy binary to chroot
#    PARAMETERS:
#       RETURNS:
#===============================================================================

copy_binary ()
{
   cmd=`which $1`
   echo $cmd
   cp $cmd bin/
   ldd $cmd
   while read line
   do
      while read ld
      do
         if [[ -f $ld ]]
         then
            echo copy $ld
            cp $ld lib/
            if [[ -L $ld ]]
            then
               ld1=$( ls -l $ld |sed &#39;s/.*&amp;gt; //&#39;)
               echo &#34;  copy $ld1&#34;
               cp  /lib/$ld1 lib/
            fi
         fi
      done &amp;lt; &amp;lt;(echo $line|sed &#39;s/.*&amp;gt; //&#39;|sed &#39;s/ .*//&#39;)
   done &amp;lt; &amp;lt;(ldd $cmd)
}	# ----------  end of function copy_binary  ----------

#===  FUNCTION  ================================================================
#          NAME:  init
#   DESCRIPTION:  Do the required initialization
#    PARAMETERS:
#       RETURNS:
#===============================================================================
init()
{
   mkdir -p {root,home,dev,etc,lib,usr,bin}
   mkdir -p usr/bin
   mkdir -p libexec/openssh



   mknod -m 666 dev/null c 1 3

   cd etc
   cp /etc/ld.so.cache .
   cp -avr /etc/ld.so.cache.d/ .
   cp -avr /etc/ld.so.conf.d/ .
   cp /etc/ld.so.conf .
   cp /etc/nsswitch.conf .
   cp /etc/passwd .
   cp /etc/group .
   cp /etc/hosts .
   cp /etc/resolv.conf .
   cd -
}
cd $1
if [[ -f .status ]]
then
   cat .status
   echo &#34;Not running now&#34;
else
   init
   for i in ${binaries[*]}
   do
       copy_binary $i
       cp -avr /etc/${i}* etc/
   done
   ln bin/bash2 bin/bash
   echo &#34;complete&#34; &amp;gt; .status
fi
cp -avr ~/bin/automation root/automation
sudo chroot .

&lt;/pre&gt;
&lt;p&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Creating a chroot environment in Fedora with bash and other utils.</title>
      <link>/2011/09/19/creating-chroot-environment-fedora-bash-utils/</link>
      <pubDate>Mon, 19 Sep 2011 14:59:23 +0000</pubDate>
      
      <guid>/2011/09/19/creating-chroot-environment-fedora-bash-utils/</guid>
      <description>&lt;p&gt;[ad#ad-2]&lt;/p&gt;
&lt;p&gt;I am testing some of my scripts to work on a very old system and there the versions of the most popular applications are very old, real old :(. So, some of things that I am very used to since last couple of years, do not seem to work as expected and I need to keep verifying a lot of things on the server, very inconvinient to keep testing the script on the server (need to connect on &lt;a class=&#34;zem_slink&#34; title=&#34;Virtual private network&#34; href=&#34;http://en.wikipedia.org/wiki/Virtual_private_network&#34; rel=&#34;wikipedia&#34;&gt;VPN&lt;/a&gt;) just to test some very simple things.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>faster bash operations on files with File Descriptors.</title>
      <link>/2011/06/11/faster-bash-operations-files-file-descriptors/</link>
      <pubDate>Sat, 11 Jun 2011 02:11:53 +0000</pubDate>
      
      <guid>/2011/06/11/faster-bash-operations-files-file-descriptors/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;I was &lt;a class=&#34;zem_slink&#34; title=&#34;Writing&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Writing&#34;&gt;writing&lt;/a&gt; a &lt;a class=&#34;zem_slink&#34; title=&#34;Bash (Unix shell)&#34; rel=&#34;homepage&#34; href=&#34;http://tiswww.case.edu/php/chet/bash/bashtop.html&#34;&gt;bash script&lt;/a&gt; that would do some operations and read and write to file. Seems that that was pretty simple with&lt;/p&gt;
&lt;div class=&#34;codecolorer-container text solarized-light&#34; style=&#34;overflow:auto;white-space:nowrap;width:550px;&#34;&gt;
  &lt;table cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&gt;
    &lt;tr&gt;
      &lt;td class=&#34;line-numbers&#34;&gt;
        &lt;div&gt;
          1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4&lt;br /&gt;5&lt;br /&gt;
        &lt;/div&gt;
      &lt;/td&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;td&amp;gt;
    &amp;lt;div class=&amp;quot;text codecolorer&amp;quot;&amp;gt;
      while read line&amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt; do&amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt; done&amp;lt;file
    &amp;lt;/div&amp;gt;
  &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;and then use redirection operations like “&amp;gt;” and “&amp;raquo;” to write to file. Done with the script pretty fast. So far so good, when I went for real life tests, no one was interested in using it, why? Simple, it was simply taking too long. The file was reading about 10K lines and writing about 50 lines and was taking about more than 10 minutes.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Terminating a SSH session after starting background process.</title>
      <link>/2011/05/14/terminating-ssh-session-starting-background-process/</link>
      <pubDate>Sat, 14 May 2011 16:59:43 +0000</pubDate>
      
      <guid>/2011/05/14/terminating-ssh-session-starting-background-process/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;This is too good. If you are planning to start a background &lt;a class=&#34;zem_slink&#34; title=&#34;Process (computing)&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Process_%28computing%29&#34;&gt;process&lt;/a&gt; in the &lt;a class=&#34;zem_slink&#34; title=&#34;Bash (Unix shell)&#34; rel=&#34;homepage&#34; href=&#34;http://tiswww.case.edu/php/chet/bash/bashtop.html&#34;&gt;bash script&lt;/a&gt; in the background and continue in the script, you cannot do it until…….&lt;/p&gt;
&lt;p&gt;You would need to close the stdout/stdin and &lt;a class=&#34;zem_slink&#34; title=&#34;Standard streams&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Standard_streams&#34;&gt;stderr&lt;/a&gt; before you can terminate any ssh session automatically. Here’s some more light on this topic.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://lists.debian.org/debian-user/2005/09/msg00254.html&#34;&gt;http://lists.debian.org/debian-user/2005/09/msg00254.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;On Thu, Sep 01, 2005 at 05:33:28PM -0400, Roberto C. Sanchez wrote: &amp;gt; I occasionally log into a &lt;a class=&#34;zem_slink&#34; title=&#34;Machine&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Machine&#34;&gt;machine&lt;/a&gt; remotely and start a process in the &amp;gt; background: &amp;gt; &amp;gt; command &amp;amp; &amp;gt; &amp;gt; However, when I log out of the machine, the ssh process on my local &amp;gt; machine blocks. I guess that it is becuase the remote still has jobs &amp;gt; running. Is there a way to get it start the process in the background &amp;gt; and then detach from the shell? I have already tried this:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>browsing the windows machines and their shares – listing</title>
      <link>/2011/04/30/browsing-windows-machines-shares-listing/</link>
      <pubDate>Sat, 30 Apr 2011 15:01:55 +0000</pubDate>
      
      <guid>/2011/04/30/browsing-windows-machines-shares-listing/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;smbtree is a very nice command to check all the machines that are present in the &lt;a class=&#34;zem_slink&#34; title=&#34;Local area network&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Local_area_network&#34;&gt;LAN&lt;/a&gt; (your connected network). For this to work you may need to look at &lt;a href=&#34;http://blog.amit-agarwal.co.in/2011/04/28/client-lanman-auth-disabled-error-samba/&#34;&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/a&gt; article also.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div class=&#34;codecolorer-container text solarized-light&#34; style=&#34;overflow:auto;white-space:nowrap;width:550px;&#34;&gt;
  &lt;table cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&gt;
    &lt;tr&gt;
      &lt;td class=&#34;line-numbers&#34;&gt;
        &lt;div&gt;
          1&lt;br /&gt;
        &lt;/div&gt;
      &lt;/td&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;td&amp;gt;
    &amp;lt;div class=&amp;quot;text codecolorer&amp;quot;&amp;gt;
      smbtree -U &amp;lt;strong&amp;gt;username
    &amp;lt;/div&amp;gt;
  &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;/strong&gt;
&lt;h6 class=&#34;zemanta-related-title&#34; style=&#34;font-size: 1em;&#34;&gt;
  Related articles
&lt;/h6&gt;
&lt;ul class=&#34;zemanta-article-ul&#34;&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://ask.metafilter.com/183636/Prompted-for-a-username-and-password-when-browsing-to-an-IIS-virtual-directory&#34;&gt;Prompted for a username and password when browsing to an IIS virtual directory&lt;/a&gt; (ask.metafilter.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://www.lockergnome.com/net/2011/04/15/how-to-delete-history-in-internet-explorer/&#34;&gt;How to Delete History in Internet Explorer&lt;/a&gt; (lockergnome.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://www.edugeek.net/forums/network-classroom-management/74441-how-guide-deploy-vnc-via-group-policy.html&#34;&gt;How To Guide: Deploy VNC via Group Policy&lt;/a&gt; (edugeek.net)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://ask.metafilter.com/179348/Windows-just-doesnt-like-tunnels&#34;&gt;Windows just doesn&amp;#8217;t like tunnels&lt;/a&gt; (ask.metafilter.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://hitechbarkadaz.wordpress.com/2011/03/04/windows-tips-speed-up-your-network-share-browsing/&#34;&gt;Windows Tips &amp;#8211; Speed Up your Network Share Browsing&lt;/a&gt; (hitechbarkadaz.wordpress.com)
  &lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;zemanta-pixie&#34; style=&#34;margin-top: 10px; height: 15px;&#34;&gt;
  &lt;a class=&#34;zemanta-pixie-a&#34; title=&#34;Enhanced by Zemanta&#34; href=&#34;http://www.zemanta.com/&#34;&gt;&lt;img class=&#34;zemanta-pixie-img&#34; style=&#34;border: medium none; float: right;&#34; src=&#34;https://i1.wp.com/img.zemanta.com/zemified_e.png?w=688&#34; alt=&#34;Enhanced by Zemanta&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;span class=&#34;zem-script more-related pretty-attribution&#34;&gt;&lt;/span&gt;
&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>client lanman auth is disabled error for samba</title>
      <link>/2011/04/28/client-lanman-auth-disabled-error-samba/</link>
      <pubDate>Thu, 28 Apr 2011 14:58:30 +0000</pubDate>
      
      <guid>/2011/04/28/client-lanman-auth-disabled-error-samba/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;The error:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Server requested &lt;a class=&#34;zem_slink&#34; title=&#34;LM hash&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/LM_hash&#34;&gt;LANMAN&lt;/a&gt; password (share-level security) but ‘&lt;a class=&#34;zem_slink&#34; title=&#34;Client (computing)&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Client_%28computing%29&#34;&gt;client&lt;/a&gt; lanman auth’ is disabled&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;is easily fixable. You just need to tell samba that client lanman auth is enabled. And here is how to do this:&lt;/p&gt;
&lt;p&gt;If you are getting this error then add the following in the globals section of the &lt;a class=&#34;zem_slink&#34; title=&#34;Samba (software)&#34; rel=&#34;homepage&#34; href=&#34;http://www.samba-tng.org/&#34;&gt;samba configuration&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;client lanman auth = Yes&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Ensure that you change this in the file &lt;strong&gt;/etc/samba/smb.conf&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>10 Useful Sar (Sysstat) Examples for UNIX / Linux Performance Monitoring</title>
      <link>/2011/04/22/10-sar-sysstat-examples-unix-linux-performance-monitoring/</link>
      <pubDate>Fri, 22 Apr 2011 02:20:48 +0000</pubDate>
      
      <guid>/2011/04/22/10-sar-sysstat-examples-unix-linux-performance-monitoring/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;h1 id=&#34;span-stylefont-size-x-large10-a-classzem_slink-titleutility-relwikipedia-hrefhttpenwikipediaorgwikiutilityusefula-a-classzem_slink-titlesar-in-unix-relwikipedia-hrefhttpenwikipediaorgwikisar_in_unixsara-sysstat-examples-for-unix--a-classzem_slink-titlelinux-relhomepage-hrefhttpwwwkernelorglinuxa-performance-monitoringspan&#34;&gt;&lt;strong&gt;&lt;span style=&#34;font-size: x-large;&#34;&gt;10 &lt;a class=&#34;zem_slink&#34; title=&#34;Utility&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Utility&#34;&gt;Useful&lt;/a&gt; &lt;a class=&#34;zem_slink&#34; title=&#34;Sar in UNIX&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Sar_in_UNIX&#34;&gt;Sar&lt;/a&gt; (Sysstat) Examples for UNIX / &lt;a class=&#34;zem_slink&#34; title=&#34;Linux&#34; rel=&#34;homepage&#34; href=&#34;http://www.kernel.org/&#34;&gt;Linux&lt;/a&gt; Performance Monitoring&lt;/span&gt;&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;by Ramesh Natarajan on March 29, 2011&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://i2.wp.com/www.thegeekstuff.com/wp-content/uploads/2011/12/sar-tutorial-300x176.png?resize=300%2C176&#34; border=&#34;0&#34; alt=&#34;&#34; width=&#34;300&#34; height=&#34;176&#34; align=&#34;bottom&#34; data-recalc-dims=&#34;1&#34; /&gt; Using sar you can monitor performance of various Linux subsystems (&lt;a class=&#34;zem_slink&#34; title=&#34;Central processing unit&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Central_processing_unit&#34;&gt;CPU&lt;/a&gt;, Memory, I/O..) in real time.&lt;/p&gt;
&lt;p&gt;Using sar, you can also collect all performance data on an on-going basis, store them, and do historical analysis to identify bottlenecks.&lt;/p&gt;
&lt;p&gt;Sar is part of the sysstat package.&lt;/p&gt;
&lt;p&gt;This article explains how to install and configure sysstat package (which contains sar utility) and explains how to monitor the following Linux performance statistics using sar.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>The Ultimate Guide to Getting Support on Linux-use empathy to login to IRC….</title>
      <link>/2011/04/18/ultimate-guide-support-linux-empathy-login-irc/</link>
      <pubDate>Mon, 18 Apr 2011 12:14:49 +0000</pubDate>
      
      <guid>/2011/04/18/ultimate-guide-support-linux-empathy-login-irc/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;The Ultimate Guide to Getting &lt;a class=&#34;zem_slink&#34; title=&#34;Technical support&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Technical_support&#34;&gt;Support&lt;/a&gt; on &lt;a class=&#34;zem_slink&#34; title=&#34;Linux&#34; rel=&#34;homepage&#34; href=&#34;http://www.kernel.org/&#34;&gt;Linux&lt;/a&gt;&lt;br&gt;
Installing Linux has become effortless to the extent that anyone with a little knowledge of computers can get a Linux machine up and running instantly. However, many of them throw in the towel when faced with even the slightest of glitches. The main reason for this is the belief that Linux doesn’t offer any kind of support.&lt;/p&gt;
&lt;p&gt;Other problem users face is that the regular technician who repairs their computer refuses even to touch a machine that’s running Linux. So, if you are one of those users disgruntled after encountering a multitude of problems with a fresh Linux install — don’t panic and read on to know some ways in which you could get support for your Linux installation.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>vim autocomplete – automagically without tab.</title>
      <link>/2011/04/16/vim-autocomplete-automagically-without-tab/</link>
      <pubDate>Sat, 16 Apr 2011 01:10:59 +0000</pubDate>
      
      <guid>/2011/04/16/vim-autocomplete-automagically-without-tab/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Lets first do the setup in one line. Get my &lt;a title=&#34;vim script download&#39;er&#34; href=&#34;http://blog.amit-agarwal.co.in/2011/03/09/all-in-one-solution-for-all-the-scripts-of-vim-from-vim-org/&#34; target=&#34;_blank&#34;&gt;vim script downloader&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Use the script to add the script with script ID : :1879 (vim-autocomplpop) to your list of plugins for vim and you  are done.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;If you are using snipmate, then make sure that you read the description of the plugin to add the required lines to the vimrc file to get the full functionality. You would love to type henceforth in your favourite editor. We will talk about more on &lt;a class=&#34;zem_slink&#34; title=&#34;IntelliSense&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/IntelliSense&#34;&gt;Intellisense&lt;/a&gt; in few days time.. Chao till then.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Easy ssh configuration with .ssh/config file</title>
      <link>/2011/04/11/easy-ssh-configuration-with-sshconfig-file/</link>
      <pubDate>Mon, 11 Apr 2011 06:30:00 +0000</pubDate>
      
      <guid>/2011/04/11/easy-ssh-configuration-with-sshconfig-file/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;If you &lt;a class=&#34;zem_slink&#34; title=&#34;Secure Shell&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Secure_Shell&#34;&gt;ssh&lt;/a&gt; to many hosts then you are aware of the pain that it takes to ssh with different username and &lt;a class=&#34;zem_slink&#34; title=&#34;Hostname&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Hostname&#34;&gt;hostname&lt;/a&gt;. There is an alias that you can creat with native ssh though. Here I will show you the same with an example.&lt;/p&gt;
&lt;div class=&#34;codecolorer-container text solarized-light&#34; style=&#34;overflow:auto;white-space:nowrap;width:550px;&#34;&gt;
  &lt;table cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&gt;
    &lt;tr&gt;
      &lt;td class=&#34;line-numbers&#34;&gt;
        &lt;div&gt;
          1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4&lt;br /&gt;5&lt;br /&gt;
        &lt;/div&gt;
      &lt;/td&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;td&amp;gt;
    &amp;lt;div class=&amp;quot;text codecolorer&amp;quot;&amp;gt;
      cat &amp;lt;&amp;lt;EOF &amp;gt;&amp;gt;~/.ssh/config&amp;lt;br /&amp;gt; Host &amp;lt;alias&amp;gt;&amp;lt;br /&amp;gt; Username &amp;lt;user name&amp;gt;&amp;lt;br /&amp;gt; Port &amp;lt;port number&amp;gt;&amp;lt;br /&amp;gt; Hostname &amp;lt;hostname&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;You can optionally omit the parameters that you do not require explicitly. For example, if your port number is default then you can simply ignore the parameter.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Try all colors in xterm with script before setting the color</title>
      <link>/2011/03/18/try-all-colors-in-xterm-with-script-before-setting-the-color/</link>
      <pubDate>Fri, 18 Mar 2011 07:41:39 +0000</pubDate>
      
      <guid>/2011/03/18/try-all-colors-in-xterm-with-script-before-setting-the-color/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;If you are looking for testing the &lt;a class=&#34;zem_slink&#34; title=&#34;Color&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Color&#34;&gt;colors&lt;/a&gt; on how they would look like in the &lt;a class=&#34;zem_slink&#34; title=&#34;Xterm&#34; rel=&#34;homepage&#34; href=&#34;http://invisible-island.net/xterm/&#34;&gt;xterm&lt;/a&gt; before you set the color then here is a small script for you.&lt;/p&gt;
&lt;div class=&#34;codecolorer-container text solarized-light&#34; style=&#34;overflow:auto;white-space:nowrap;width:550px;&#34;&gt;
  &lt;table cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&gt;
    &lt;tr&gt;
      &lt;td class=&#34;line-numbers&#34;&gt;
        &lt;div&gt;
          1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4&lt;br /&gt;5&lt;br /&gt;6&lt;br /&gt;7&lt;br /&gt;8&lt;br /&gt;9&lt;br /&gt;10&lt;br /&gt;11&lt;br /&gt;12&lt;br /&gt;13&lt;br /&gt;14&lt;br /&gt;15&lt;br /&gt;16&lt;br /&gt;17&lt;br /&gt;18&lt;br /&gt;19&lt;br /&gt;20&lt;br /&gt;21&lt;br /&gt;22&lt;br /&gt;23&lt;br /&gt;24&lt;br /&gt;25&lt;br /&gt;26&lt;br /&gt;27&lt;br /&gt;28&lt;br /&gt;29&lt;br /&gt;30&lt;br /&gt;
        &lt;/div&gt;
      &lt;/td&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;td&amp;gt;
    &amp;lt;div class=&amp;quot;text codecolorer&amp;quot;&amp;gt;
      #!/bin/bash -&amp;lt;br /&amp;gt; #===============================================================================&amp;lt;br /&amp;gt; #&amp;lt;br /&amp;gt; #          FILE:  xterm_colors-test.sh&amp;lt;br /&amp;gt; #&amp;lt;br /&amp;gt; #         USAGE:  ./xterm_colors-test.sh&amp;lt;br /&amp;gt; #&amp;lt;br /&amp;gt; #   DESCRIPTION:  Test all the colors for xterm bg&amp;lt;br /&amp;gt; #&amp;lt;br /&amp;gt; #       OPTIONS:  ---&amp;lt;br /&amp;gt; #  REQUIREMENTS:  ---&amp;lt;br /&amp;gt; #          BUGS:  ---&amp;lt;br /&amp;gt; #         NOTES:  ---&amp;lt;br /&amp;gt; #        AUTHOR:   Amit Agarwal (amit.agarwal@amit-agarwal.co.in), aka&amp;lt;br /&amp;gt; #       COMPANY:  Individual&amp;lt;br /&amp;gt; #       VERSION:  1.0&amp;lt;br /&amp;gt; #       CREATED:  02/18/2011 01:02:51 PM IST&amp;lt;br /&amp;gt; #      REVISION:  1.0&amp;lt;br /&amp;gt; #===============================================================================&amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt; cat /usr/share/X11/rgb.txt |sed &#39;s/\([0-9]\{1,3\}[ \t]*\)\{3\}//&#39;|sed &#39;s/^ *//&#39; &amp;gt;~/rgb.txt&amp;lt;br /&amp;gt; while read line&amp;lt;br /&amp;gt; do&amp;lt;br /&amp;gt; bg=$(echo $line)&amp;lt;br /&amp;gt; echo $line&amp;lt;br /&amp;gt; echo &amp;quot;Trying $bg color&amp;quot;&amp;lt;br /&amp;gt; xterm -bg &amp;quot;$bg&amp;quot;&amp;amp;&amp;lt;br /&amp;gt; sleep 5&amp;lt;br /&amp;gt; kill -9 $!&amp;lt;br /&amp;gt; done &amp;lt; ~/rgb.txt
    &amp;lt;/div&amp;gt;
  &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;This can be used in various ways but I will leave the choice to you. One option that I should probably still tell is :&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>what is vim in 6Kb..</title>
      <link>/2011/03/16/what-is-vim-in-6kb/</link>
      <pubDate>Wed, 16 Mar 2011 16:36:33 +0000</pubDate>
      
      <guid>/2011/03/16/what-is-vim-in-6kb/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;If you thought that vim is very bloated and nothing abuot this editor can be small, then you are not alone. I was myself in the same bandwagon.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Well, I never thought that there could be anything about vim that can be explained in Kb’s, lest alone the complete vim features. But looks like &lt;a title=&#34;vim.org&#34; href=&#34;http://www.vim.org&#34; target=&#34;_blank&#34;&gt;vim.org&lt;/a&gt; had thought about this and thus came up with &lt;a title=&#34;this&#34; href=&#34;http://www.vim.org/6kbyte.php&#34; target=&#34;_blank&#34;&gt;this&lt;/a&gt;. And &lt;a title=&#34;here&#34; href=&#34;http://www.vim.org/6k/features.en.txt&#34; target=&#34;_blank&#34;&gt;here&lt;/a&gt; is the direct link to the vim in 6kb in English.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>All in one solution for all the scripts of vim from vim.org</title>
      <link>/2011/03/09/all-in-one-solution-for-all-the-scripts-of-vim-from-vim-org/</link>
      <pubDate>Wed, 09 Mar 2011 16:39:52 +0000</pubDate>
      
      <guid>/2011/03/09/all-in-one-solution-for-all-the-scripts-of-vim-from-vim-org/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;For quite sometime now, I was looking for some console based program which would help me get the scripts from vim.org. A simple solution would have been to do a wget for the scripts. But since there are so many scripts coming up daily and with a need to search based on script ID and name of the script, I thought better to write a script that can do all of those things. Now, what was required was that the script should be either able to download this or add to the &lt;a title=&#34;GLVS&#34; href=&#34;http://www.vim.org/scripts/script.php?script_id=2444&#34; target=&#34;_blank&#34;&gt;GLVS&lt;/a&gt; script. Also note that, I had done something similar in the past &lt;a title=&#34;vim – get the list of all the scripts available.&#34; href=&#34;http://blog.amit-agarwal.co.in/2010/05/28/vim-get-the-list-of-all-the-scripts-available/&#34; target=&#34;_blank&#34;&gt;here&lt;/a&gt;. There are some additions in the below script. You can download a copy of the script &lt;a href=&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2011/03/get_vim_scripts.txt&#34;&gt;get_vim_scripts&lt;/a&gt;. Or you can copy the script from below:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>using gnuplot for time plotting</title>
      <link>/2011/02/17/gnuplot-time-plotting/</link>
      <pubDate>Thu, 17 Feb 2011 15:11:40 +0000</pubDate>
      
      <guid>/2011/02/17/gnuplot-time-plotting/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Couple of days back, I was working with some data and wanted to plot it. I had couple of options &lt;a class=&#34;zem_slink&#34; title=&#34;Microsoft Excel&#34; rel=&#34;homepage&#34; href=&#34;http://office.microsoft.com/en-us/excel&#34;&gt;Excel&lt;/a&gt;, ploticus and then our own &lt;a class=&#34;zem_slink&#34; title=&#34;Gnuplot&#34; rel=&#34;homepage&#34; href=&#34;http://www.gnuplot.info/&#34;&gt;gnuplot&lt;/a&gt;. My choice here was gnuplot, as this is most commonly available and helps me write scripts that can automate my repetitive task. So far, so good. The data I was plotting was against time, that was the problem. Couple of quick searches did not result into any luck to get me on the path and hence with some &lt;a class=&#34;zem_slink&#34; title=&#34;Man page&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Man_page&#34;&gt;man pages&lt;/a&gt; and some documentation, finally I found this, might be this will be helpful for others.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>bash mathematical calculators.</title>
      <link>/2011/01/26/bash-mathematical-calculators/</link>
      <pubDate>Tue, 25 Jan 2011 21:46:34 +0000</pubDate>
      
      <guid>/2011/01/26/bash-mathematical-calculators/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;To start with , the most simple and easy to use should be “bc”. but just for some guys who want to be more experimental, here are few more bash calulator programs. These are completely command line and thus you can completely integrate them in your shell script or use them in shell script to do some really crazy maths calculations.&lt;/p&gt;
&lt;div class=&#34;codecolorer-container text solarized-light&#34; style=&#34;overflow:auto;white-space:nowrap;width:550px;&#34;&gt;
  &lt;table cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&gt;
    &lt;tr&gt;
      &lt;td class=&#34;line-numbers&#34;&gt;
        &lt;div&gt;
          1&lt;br /&gt;
        &lt;/div&gt;
      &lt;/td&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;td&amp;gt;
    &amp;lt;div class=&amp;quot;text codecolorer&amp;quot;&amp;gt;
      sudo yum install calc clac
    &amp;lt;/div&amp;gt;
  &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;Lets start with installing these. Before we start, don’t blame and flame me if your favourite is not there in the list. If it is not, better is you drop me  a comment or email, and I will see, if I can include it in the list above, but remember this is only for console based calculators.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Find all the missing paths in the PATH variable in bash script</title>
      <link>/2011/01/20/find-missing-paths-path-variable-bash-script/</link>
      <pubDate>Thu, 20 Jan 2011 02:36:00 +0000</pubDate>
      
      <guid>/2011/01/20/find-missing-paths-path-variable-bash-script/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Here is a simple script that will list out all the paths in the PATH variable that do not exist.&lt;/p&gt;
&lt;div class=&#34;codecolorer-container text solarized-light&#34; style=&#34;overflow:auto;white-space:nowrap;width:550px;&#34;&gt;
  &lt;table cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&gt;
    &lt;tr&gt;
      &lt;td class=&#34;line-numbers&#34;&gt;
        &lt;div&gt;
          1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4&lt;br /&gt;5&lt;br /&gt;6&lt;br /&gt;7&lt;br /&gt;8&lt;br /&gt;9&lt;br /&gt;10&lt;br /&gt;11&lt;br /&gt;12&lt;br /&gt;13&lt;br /&gt;14&lt;br /&gt;15&lt;br /&gt;16&lt;br /&gt;17&lt;br /&gt;18&lt;br /&gt;19&lt;br /&gt;20&lt;br /&gt;21&lt;br /&gt;22&lt;br /&gt;23&lt;br /&gt;
        &lt;/div&gt;
      &lt;/td&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;td&amp;gt;
    &amp;lt;div class=&amp;quot;text codecolorer&amp;quot;&amp;gt;
      #!/bin/bash -&amp;lt;br /&amp;gt; #===============================================================================&amp;lt;br /&amp;gt; #&amp;lt;br /&amp;gt; #          FILE:  wrong_path.sh&amp;lt;br /&amp;gt; #&amp;lt;br /&amp;gt; #         USAGE:  ./wrong_path.sh&amp;lt;br /&amp;gt; #&amp;lt;br /&amp;gt; #   DESCRIPTION:  Show Directories in the PATH Which does NOT Exist&amp;lt;br /&amp;gt; #&amp;lt;br /&amp;gt; #       OPTIONS:  ---&amp;lt;br /&amp;gt; #  REQUIREMENTS:  ---&amp;lt;br /&amp;gt; #          BUGS:  ---&amp;lt;br /&amp;gt; #         NOTES:  ---&amp;lt;br /&amp;gt; #        AUTHOR:  Amit Agarwal (AKA), amit.agarwal@amit-agarwal.co.in&amp;lt;br /&amp;gt; #       COMPANY:  Individual&amp;lt;br /&amp;gt; #       VERSION:  1.0&amp;lt;br /&amp;gt; #       CREATED:  09/20/2009 09:15:48 AM IST&amp;lt;br /&amp;gt; #      REVISION:  ---&amp;lt;br /&amp;gt; #===============================================================================&amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt; set -o nounset                              # Treat unset variables as an error&amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt; (IFS=:;for p in $PATH; do test -d $p || echo $p; done)
    &amp;lt;/div&amp;gt;
  &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/table&gt;
&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>New feature in Nautilus – resize icon on desktop.</title>
      <link>/2011/01/10/feature-nautilus-resize-icon-desktop/</link>
      <pubDate>Mon, 10 Jan 2011 15:36:25 +0000</pubDate>
      
      <guid>/2011/01/10/feature-nautilus-resize-icon-desktop/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;On &lt;a class=&#34;zem_slink&#34; title=&#34;Desktop environment&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Desktop_environment&#34;&gt;Desktop&lt;/a&gt; on &lt;a class=&#34;zem_slink&#34; title=&#34;GNOME&#34; rel=&#34;homepage&#34; href=&#34;http://www.gnome.org/&#34;&gt;Gnome&lt;/a&gt; using nautilus, now you can resize individual &lt;a class=&#34;zem_slink&#34; title=&#34;Icon&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Icon&#34;&gt;icons&lt;/a&gt;. Just &lt;a class=&#34;zem_slink&#34; title=&#34;Mouse (computing)&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Mouse_%28computing%29&#34;&gt;right click&lt;/a&gt; on the icon to resize and in the menu you will get a resize icon :&lt;/p&gt;
&lt;figure id=&#34;attachment_2743&#34; aria-describedby=&#34;caption-attachment-2743&#34; style=&#34;width: 150px&#34; class=&#34;wp-caption aligncenter&#34;&gt;[&lt;img class=&#34;size-thumbnail wp-image-2743&#34; title=&#34;Resize icon&#34; src=&#34;https://i2.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/2010/12/Resize.jpg?resize=150%2C150&#34; alt=&#34;Resize icon&#34; width=&#34;150&#34; height=&#34;150&#34; srcset=&#34;https://i2.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/2010/12/Resize.jpg?resize=150%2C150 150w, https://i2.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/2010/12/Resize.jpg?zoom=2&amp;resize=150%2C150 300w, https://i2.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/2010/12/Resize.jpg?zoom=3&amp;resize=150%2C150 450w&#34; sizes=&#34;(max-width: 150px) 100vw, 150px&#34; data-recalc-dims=&#34;1&#34; /&gt;][1]&lt;figcaption id=&#34;caption-attachment-2743&#34; class=&#34;wp-caption-text&#34;&gt;Resize icon&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;and then you can resize the icon from the borders:&lt;/p&gt;
&lt;figure id=&#34;attachment_2744&#34; aria-describedby=&#34;caption-attachment-2744&#34; style=&#34;width: 150px&#34; class=&#34;wp-caption aligncenter&#34;&gt;[&lt;img class=&#34;size-thumbnail wp-image-2744&#34; title=&#34;Resize icon&#34; src=&#34;https://i1.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/2010/12/Resize-1.jpg?resize=150%2C150&#34; alt=&#34;Resize icon&#34; width=&#34;150&#34; height=&#34;150&#34; srcset=&#34;https://i1.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/2010/12/Resize-1.jpg?resize=150%2C150 150w, https://i1.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/2010/12/Resize-1.jpg?resize=64%2C64 64w, https://i1.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/2010/12/Resize-1.jpg?resize=128%2C128 128w, https://i1.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/2010/12/Resize-1.jpg?zoom=2&amp;resize=150%2C150 300w&#34; sizes=&#34;(max-width: 150px) 100vw, 150px&#34; data-recalc-dims=&#34;1&#34; /&gt;][2]&lt;figcaption id=&#34;caption-attachment-2744&#34; class=&#34;wp-caption-text&#34;&gt;Resize icon&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h6 class=&#34;zemanta-related-title&#34; style=&#34;font-size: 1em;&#34;&gt;
  Related articles
&lt;/h6&gt;
&lt;ul class=&#34;zemanta-article-ul&#34;&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://www.omgubuntu.co.uk/2010/12/where-is-this-icon-nautilus-script-ubuntu/&#34;&gt;&amp;#8220;Where is this icon?&amp;#8221; Nautilus script is incredibly nifty&lt;/a&gt; (omgubuntu.co.uk)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://www.omgubuntu.co.uk/2010/11/use-nautilus-folder-emblems-to-organise-your-home-folder/&#34;&gt;Use Nautilus&amp;#8217; Emblems feature to keep your home folder organised&lt;/a&gt; (omgubuntu.co.uk)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://www.omgubuntu.co.uk/2010/12/screenshot-desktop-unity-in-natty/&#34;&gt;Screenshots: Desktop Unity in Natty&lt;/a&gt; (omgubuntu.co.uk)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://www.ghacks.net/2010/11/29/add-a-quick-access-shortcuts-to-the-gnome-right-click-menu/&#34;&gt;Add a quick-access shortcuts to the GNOME right-click menu&lt;/a&gt; (ghacks.net)
  &lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;zemanta-pixie&#34; style=&#34;margin-top: 10px; height: 15px;&#34;&gt;
  &lt;a class=&#34;zemanta-pixie-a&#34; title=&#34;Enhanced by Zemanta&#34; href=&#34;http://www.zemanta.com/&#34;&gt;&lt;img class=&#34;zemanta-pixie-img&#34; style=&#34;border: medium none; float: right;&#34; src=&#34;https://i1.wp.com/img.zemanta.com/zemified_e.png?w=688&#34; alt=&#34;Enhanced by Zemanta&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;span class=&#34;zem-script more-related pretty-attribution&#34;&gt;&lt;/span&gt;
&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>Shell Scripting</title>
      <link>/2011/01/05/shell-scripting/</link>
      <pubDate>Wed, 05 Jan 2011 15:08:44 +0000</pubDate>
      
      <guid>/2011/01/05/shell-scripting/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Here are some links for bash programming that you may find useful.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://tips-linux.net/en/content/pro-bash-programming&#34;&gt;http://tips-linux.net/en/content/pro-bash-programming&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://tips-linux.net/en/content/expert-shell-scripting&#34;&gt;http://tips-linux.net/en/content/expert-shell-scripting&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://tips-linux.net/en/content/beginning-linux-command-line&#34;&gt;http://tips-linux.net/en/content/beginning-linux-command-line&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://tips-linux.net/en/content/bash-pocket-reference&#34;&gt;http://tips-linux.net/en/content/bash-pocket-reference&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://tips-linux.net/en/content/linux-command-line-and-shell-scripting-bible&#34;&gt;http://tips-linux.net/en/content/linux-command-line-and-shell-scripting-bible&lt;/a&gt;&lt;/p&gt;
&lt;h6 class=&#34;zemanta-related-title&#34; style=&#34;font-size: 1em;&#34;&gt;
  Related articles
&lt;/h6&gt;
&lt;ul class=&#34;zemanta-article-ul&#34;&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://www.edugeek.net/forums/nix/63944-linux-learning-shell.html&#34;&gt;Linux &amp;#8211; Learning the Shell&lt;/a&gt; (edugeek.net)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://maketecheasier.com/10-useful-tools-websites-tricks-to-master-linux-command/2010/11/09&#34;&gt;10 Useful Tools, Websites And Tricks to Help You Master Linux Command&lt;/a&gt; (maketecheasier.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://blog.yjl.im/2010/12/lf-submitsh-bash-mplayer-lastfm.html&#34;&gt;lf-submit.sh &amp;#8211; Bash mplayer Last.fm scrobbler&lt;/a&gt; (yjl.im)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://blog.interstellr.com/linux-command-line-tricks-you-need-to-know-io&#34;&gt;Linux command line tricks you need to know: IO redirection and piping&lt;/a&gt; (interstellr.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://houcemhachicha.blogspot.com/2010/07/my-top-ten-shellbash-tricks.html&#34;&gt;imabonehead: Houcem HACHICHA&amp;#8217;s Blog: My top ten shell/bash tricks!&lt;/a&gt; (houcemhachicha.blogspot.com)
  &lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;zemanta-pixie&#34; style=&#34;margin-top: 10px; height: 15px;&#34;&gt;
  &lt;a class=&#34;zemanta-pixie-a&#34; title=&#34;Enhanced by Zemanta&#34; href=&#34;http://www.zemanta.com/&#34;&gt;&lt;img class=&#34;zemanta-pixie-img&#34; style=&#34;border: medium none; float: right;&#34; src=&#34;https://i1.wp.com/img.zemanta.com/zemified_e.png?w=688&#34; alt=&#34;Enhanced by Zemanta&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;span class=&#34;zem-script more-related pretty-attribution&#34;&gt;&lt;/span&gt;
&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>Execute a command with a timeout</title>
      <link>/2010/12/29/execute-command-timeout/</link>
      <pubDate>Wed, 29 Dec 2010 15:03:18 +0000</pubDate>
      
      <guid>/2010/12/29/execute-command-timeout/</guid>
      <description>&lt;div class=&#34;zemanta-img&#34; style=&#34;margin: 1em; display: block;&#34;&gt;
  &lt;div&gt;
    &lt;dl class=&#34;wp-caption alignright&#34; style=&#34;width: 310px;&#34;&gt;
      &lt;dt class=&#34;wp-caption-dt&#34;&gt;
        &lt;a href=&#34;http://commons.wikipedia.org/wiki/File:Ubuntu_logo.svg&#34;&gt;&lt;img title=&#34;Official Ubuntu circle with wordmark. Replace ...&#34; src=&#34;http://upload.wikimedia.org/wikipedia/commons/thumb/9/9d/Ubuntu_logo.svg/300px-Ubuntu_logo.svg.png&#34; alt=&#34;Official Ubuntu circle with wordmark. Replace ...&#34; width=&#34;300&#34; height=&#34;70&#34; /&gt;&lt;/a&gt;
      &lt;/dt&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;dd class=&amp;quot;wp-caption-dd zemanta-img-attribution&amp;quot; style=&amp;quot;font-size: 0.8em;&amp;quot;&amp;gt;
    Image via &amp;lt;a href=&amp;quot;http://commons.wikipedia.org/wiki/File:Ubuntu_logo.svg&amp;quot;&amp;gt;Wikipedia&amp;lt;/a&amp;gt;
  &amp;lt;/dd&amp;gt;
&amp;lt;/dl&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Execute a command with a timeout&lt;/p&gt;
&lt;div class=&#34;codecolorer-container text solarized-light&#34; style=&#34;overflow:auto;white-space:nowrap;width:550px;&#34;&gt;
  &lt;table cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&gt;
    &lt;tr&gt;
      &lt;td class=&#34;line-numbers&#34;&gt;
        &lt;div&gt;
          1&lt;br /&gt;
        &lt;/div&gt;
      &lt;/td&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;td&amp;gt;
    &amp;lt;div class=&amp;quot;text codecolorer&amp;quot;&amp;gt;
      &amp;amp;nbsp;timelimit -t100 somecommand
    &amp;lt;/div&amp;gt;
  &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;I found this in &lt;a class=&#34;zem_slink&#34; title=&#34;Ubuntu (operating system)&#34; rel=&#34;homepage&#34; href=&#34;http://www.ubuntu.com/&#34;&gt;Ubuntu&lt;/a&gt; repos, and consider it better than timeout.&lt;/p&gt;
&lt;p&gt;* View this command to comment, vote or add to favourites * View all commands by CodSpirit&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>write the output of a command to /var/log/user.log… each line will contain $USER, making this easy to grep for.</title>
      <link>/2010/12/28/write-output-command-varloguserlog-line-user-making-easy-grep/</link>
      <pubDate>Tue, 28 Dec 2010 15:00:24 +0000</pubDate>
      
      <guid>/2010/12/28/write-output-command-varloguserlog-line-user-making-easy-grep/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;write the &lt;a class=&#34;zem_slink&#34; title=&#34;Output&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Output&#34;&gt;output&lt;/a&gt; of a &lt;a class=&#34;zem_slink&#34; title=&#34;Command (computing)&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Command_%28computing%29&#34;&gt;command&lt;/a&gt; to /var/log/user.log… each line will contain $USER, making this easy to &lt;a class=&#34;zem_slink&#34; title=&#34;Grep&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Grep&#34;&gt;grep&lt;/a&gt; for.&lt;/p&gt;
&lt;div class=&#34;codecolorer-container text solarized-light&#34; style=&#34;overflow:auto;white-space:nowrap;width:550px;&#34;&gt;
  &lt;table cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&gt;
    &lt;tr&gt;
      &lt;td class=&#34;line-numbers&#34;&gt;
        &lt;div&gt;
          1&lt;br /&gt;
        &lt;/div&gt;
      &lt;/td&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;td&amp;gt;
    &amp;lt;div class=&amp;quot;text codecolorer&amp;quot;&amp;gt;
      &amp;amp;nbsp;log() { (echo &amp;quot;$ $@&amp;quot;;$@) | logger -t $USER; }
    &amp;lt;/div&amp;gt;
  &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;This command is useful if you want to copy the output of a series of commands to a file, for example if you want to pastebin the output from ‘&lt;a class=&#34;zem_slink&#34; title=&#34;Uname&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Uname&#34;&gt;uname&lt;/a&gt; -a’, ‘lspci -vvv’ and ‘lsmod’ for video driver trouble-shooting on your favorite &lt;a class=&#34;zem_slink&#34; title=&#34;Linux&#34; rel=&#34;homepage&#34; href=&#34;http://www.kernel.org/&#34;&gt;Linux&lt;/a&gt; forum.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Empty a file</title>
      <link>/2010/12/26/empty-file/</link>
      <pubDate>Sun, 26 Dec 2010 14:56:13 +0000</pubDate>
      
      <guid>/2010/12/26/empty-file/</guid>
      <description>&lt;div class=&#34;zemanta-img&#34; style=&#34;margin: 1em; display: block;&#34;&gt;
  &lt;div&gt;
    &lt;dl class=&#34;wp-caption alignright&#34; style=&#34;width: 310px;&#34;&gt;
      &lt;dt class=&#34;wp-caption-dt&#34;&gt;
        &lt;a href=&#34;http://commons.wikipedia.org/wiki/File:Calculator.NET_Screenshot.png&#34;&gt;&lt;img title=&#34;Screenshot of Calculator.NET, a Free Open Sour...&#34; src=&#34;http://upload.wikimedia.org/wikipedia/commons/thumb/b/be/Calculator.NET_Screenshot.png/300px-Calculator.NET_Screenshot.png&#34; alt=&#34;Screenshot of Calculator.NET, a Free Open Sour...&#34; width=&#34;300&#34; height=&#34;188&#34; /&gt;&lt;/a&gt;
      &lt;/dt&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;dd class=&amp;quot;wp-caption-dd zemanta-img-attribution&amp;quot; style=&amp;quot;font-size: 0.8em;&amp;quot;&amp;gt;
    Image via &amp;lt;a href=&amp;quot;http://commons.wikipedia.org/wiki/File:Calculator.NET_Screenshot.png&amp;quot;&amp;gt;Wikipedia&amp;lt;/a&amp;gt;
  &amp;lt;/dd&amp;gt;
&amp;lt;/dl&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;This one is for those who know the “touch” command. Hope all of us do not follow a  command just because it is on one of the popular site without trying to understand the command and the output.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Bash Script Beautifier</title>
      <link>/2010/12/23/bash-script-beautifier/</link>
      <pubDate>Thu, 23 Dec 2010 14:51:01 +0000</pubDate>
      
      <guid>/2010/12/23/bash-script-beautifier/</guid>
      <description>&lt;div class=&#34;zemanta-img&#34; style=&#34;margin: 1em; display: block;&#34;&gt;
  &lt;div&gt;
    &lt;dl class=&#34;wp-caption alignright&#34; style=&#34;width: 266px;&#34;&gt;
      &lt;dt class=&#34;wp-caption-dt&#34;&gt;
        &lt;a href=&#34;http://en.wikipedia.org/wiki/File:Bash-org.png&#34;&gt;&lt;img title=&#34;Bash (Unix shell)&#34; src=&#34;http://upload.wikimedia.org/wikipedia/en/4/41/Bash-org.png&#34; alt=&#34;Bash (Unix shell)&#34; width=&#34;256&#34; height=&#34;108&#34; /&gt;&lt;/a&gt;
      &lt;/dt&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;dd class=&amp;quot;wp-caption-dd zemanta-img-attribution&amp;quot; style=&amp;quot;font-size: 0.8em;&amp;quot;&amp;gt;
    Image via &amp;lt;a href=&amp;quot;http://en.wikipedia.org/wiki/File:Bash-org.png&amp;quot;&amp;gt;Wikipedia&amp;lt;/a&amp;gt;
  &amp;lt;/dd&amp;gt;
&amp;lt;/dl&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Today I was working on a bash script written by someone else. And the script was maintained since long and had actually become quite big and there was no indentation followed. So, you can understand how difficult it was to understand the script. So, I set my foot forth to first find a beautifier for the bash script before I fixed it and my search ended here.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Take a screenshot of the window the user clicks on and name the file the same as the window title</title>
      <link>/2010/12/19/screenshot-window-user-clicks-file-window-title/</link>
      <pubDate>Sun, 19 Dec 2010 14:45:06 +0000</pubDate>
      
      <guid>/2010/12/19/screenshot-window-user-clicks-file-window-title/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Take a screenshot of the window the user clicks on and name the file the same as the window title&lt;/p&gt;
&lt;div class=&#34;codecolorer-container text solarized-light&#34; style=&#34;overflow:auto;white-space:nowrap;width:550px;&#34;&gt;
  &lt;table cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&gt;
    &lt;tr&gt;
      &lt;td class=&#34;line-numbers&#34;&gt;
        &lt;div&gt;
          1&lt;br /&gt;
        &lt;/div&gt;
      &lt;/td&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;td&amp;gt;
    &amp;lt;div class=&amp;quot;text codecolorer&amp;quot;&amp;gt;
      &amp;amp;nbsp;sleep 4; xwd &amp;gt;foo.xwd; mv foo.xwd &amp;quot;$(dd skip=100 if=foo.xwd bs=1 count=256 2&amp;gt;/dev/null | egrep -ao &#39;^[[:print:]]+&#39; | tr / :).xwd&amp;quot;
    &amp;lt;/div&amp;gt;
  &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;In general, this is actually not better than the “scrot -d4” command I’m listing it as an alternative to, so please don’t vote it down for that. I’m adding this command because xwd (X window dumper) comes with X11, so it is already installed on your machine, whereas scrot probably is not. I’ve found xwd handy on boxen that I don’t want to (or am not allowed to) install packages on.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Repeat a portrait eight times so it can be cut out from a 6″x4″ photo and used for visa or passport photos</title>
      <link>/2010/12/17/repeat-portrait-times-cut-6x4-photo-visa-passport-photos/</link>
      <pubDate>Fri, 17 Dec 2010 14:41:57 +0000</pubDate>
      
      <guid>/2010/12/17/repeat-portrait-times-cut-6x4-photo-visa-passport-photos/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Repeat a portrait eight times so it can be cut out from a 6″x4″ photo and used for visa or passport photos&lt;/p&gt;
&lt;div class=&#34;codecolorer-container text solarized-light&#34; style=&#34;overflow:auto;white-space:nowrap;width:550px;&#34;&gt;
  &lt;table cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&gt;
    &lt;tr&gt;
      &lt;td class=&#34;line-numbers&#34;&gt;
        &lt;div&gt;
          1&lt;br /&gt;
        &lt;/div&gt;
      &lt;/td&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;td&amp;gt;
    &amp;lt;div class=&amp;quot;text codecolorer&amp;quot;&amp;gt;
      montage 2007-08-25-3685.jpg +clone -clone 0-1 -clone 0-3 -geometry 500 -frame 5 output.jpg
    &amp;lt;/div&amp;gt;
  &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;Yes, You could do it in the &lt;a class=&#34;zem_slink&#34; title=&#34;GIMP&#34; rel=&#34;homepage&#34; href=&#34;http://www.gimp.org/&#34;&gt;GIMP&lt;/a&gt; or even use &lt;a class=&#34;zem_slink&#34; title=&#34;Inkscape&#34; rel=&#34;homepage&#34; href=&#34;http://www.inkscape.org/&#34;&gt;Inkscape&lt;/a&gt; to auto-align the clones, but the &lt;a class=&#34;zem_slink&#34; title=&#34;Command-line interface&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Command-line_interface&#34;&gt;command line&lt;/a&gt; is so much easier.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Screen enable/disable logging in all windows</title>
      <link>/2010/11/19/screen-enabledisable-loggin-windows/</link>
      <pubDate>Fri, 19 Nov 2010 15:13:30 +0000</pubDate>
      
      <guid>/2010/11/19/screen-enabledisable-loggin-windows/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;If you use screen command a lot then this is something that you will like 🙂&lt;/p&gt;
&lt;p&gt;Screen &lt;a class=&#34;zem_slink&#34; title=&#34;GUI widget&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/GUI_widget&#34;&gt;enable/disable&lt;/a&gt; loggin in all windows&lt;/p&gt;
&lt;div class=&#34;codecolorer-container text solarized-light&#34; style=&#34;overflow:auto;white-space:nowrap;width:550px;&#34;&gt;
  &lt;table cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&gt;
    &lt;tr&gt;
      &lt;td class=&#34;line-numbers&#34;&gt;
        &lt;div&gt;
          1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;
        &lt;/div&gt;
      &lt;/td&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;td&amp;gt;
    &amp;lt;div class=&amp;quot;text codecolorer&amp;quot;&amp;gt;
      bindkey ^l at &amp;quot;#&amp;quot; log on&amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt; bindkey ^o at &amp;quot;#&amp;quot; log off
    &amp;lt;/div&amp;gt;
  &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;The command when added in screenrc enables logging all open windows by using the C-l (control-l &lt;a class=&#34;zem_slink&#34; title=&#34;Keyboard shortcut&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Keyboard_shortcut&#34;&gt;key combination&lt;/a&gt;) and disable by C-o . The lines need to be added in separate lines .&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>OpenLDAP and SSL – some links</title>
      <link>/2010/11/15/openldap-ssl-links/</link>
      <pubDate>Mon, 15 Nov 2010 14:51:49 +0000</pubDate>
      
      <guid>/2010/11/15/openldap-ssl-links/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Here are some of the links that may be of great help to you if you are having issues with setting up &lt;a class=&#34;zem_slink&#34; title=&#34;Transport Layer Security&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Transport_Layer_Security&#34;&gt;SSL&lt;/a&gt; and &lt;a class=&#34;zem_slink&#34; title=&#34;OpenLDAP&#34; rel=&#34;homepage&#34; href=&#34;http://www.openldap.org/&#34;&gt;OpenLDAP&lt;/a&gt;. I was having some issues with this setup and these links helped me fix the same.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.faqs.org/docs/Linux-HOWTO/SSL-RedHat-HOWTO.html&#34;&gt;http://www.faqs.org/docs/Linux-HOWTO/SSL-RedHat-HOWTO.html&lt;/a&gt; &lt;a href=&#34;http://www.tc.umn.edu/~brams006/selfsign_redhat.html&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.tc.umn.edu/~brams006/selfsign_redhat.html&#34;&gt;http://www.tc.umn.edu/~brams006/selfsign_redhat.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://docs.redhat.com/docs/en-US/Red_Hat_Directory_Server/8.1/html/Using_Red_Hat_Console/Starting_the_Server_with_SSL_Enabled-Enabling_SSL_in_the_DS_Admin_Server_and_Console.html&#34;&gt;http://docs.redhat.com/docs/en-US/Red_Hat_Directory_Server/8.1/html/Using_Red_Hat_Console/Starting_the_Server_with_SSL_Enabled-Enabling_SSL_in_the_DS_Admin_Server_and_Console.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://directory.fedoraproject.org/wiki/Howto:SSL&#34;&gt;http://directory.fedoraproject.org/wiki/Howto:SSL&lt;/a&gt; &lt;a href=&#34;http://www.linuxtopia.org/online_books//network_administration_guides/ldap_administration/appendix-common-errors_Common_causes_of_LDAP_errors.html&#34;&gt;http://www.linuxtopia.org/online_books//network_administration_guides/ldap_administration/appendix-common-errors_Common_causes_of_LDAP_errors.html&lt;/a&gt;&lt;/p&gt;
&lt;!--
LDAP-SSL ========================================

Purpose/Scope of this Guide The purpose of this guide is to assist &lt;a class=&#34;zem_slink&#34; title=&#34;Red Hat Linux&#34; rel=&#34;homepage&#34; href=&#34;http://www.redhat.com&#34; mce_href=&#34;http://www.redhat.com&#34;&gt;RedHat Linux&lt;/a&gt; users with the installation of server (SSL) certificates using the &lt;a class=&#34;zem_slink&#34; title=&#34;Apache HTTP Server&#34; rel=&#34;homepage&#34; href=&#34;http://httpd.apache.org/&#34; mce_href=&#34;http://httpd.apache.org/&#34;&gt;Apache web server&lt;/a&gt;. The goal is to provide a clear procedure that will save time and, in many cases, money!

First, I will cover what you need to know about the SSL protocol and digital certificates. In my experience, building an Apache web server with ModSSL and &lt;a class=&#34;zem_slink&#34; title=&#34;OpenSSL&#34; rel=&#34;homepage&#34; href=&#34;http://www.openssl.org/&#34; mce_href=&#34;http://www.openssl.org/&#34;&gt;OpenSSL&lt;/a&gt; is the most beneficial software combination. OpenSSL is a general-purpose cryptography library that supports the SSL v2/v3 and TLS v1 protocols. ModSSL is an Apache API module designed to act as an interface between Apache and OpenSSL. The biggest advantage is that all three packages are free.

Then, beginning with Section 4, I will go through the step-by-step procedures for generating keys and installing certificates on a RedHat-Apache server compiled with ModSSL and OpenSSL. The procedures in Section 4 will also work with commercial SSL-server packages such as Stronghold and Raven that are closely related to Apache.

Disclaimer: I am a technical support engineer for &lt;a class=&#34;zem_slink&#34; title=&#34;Equifax&#34; rel=&#34;homepage&#34; href=&#34;http://www.equifax.com&#34; mce_href=&#34;http://www.equifax.com&#34;&gt;Equifax&lt;/a&gt; Secure Inc., a Certificate Authority. Therefore, I use Equifax Secure certificates and examples geared towards installing Equifax Secure certificates. However, the instructions will also work with certificates issued by other &lt;a class=&#34;zem_slink&#34; title=&#34;Certificate authority&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Certificate_authority&#34; mce_href=&#34;http://en.wikipedia.org/wiki/Certificate_authority&#34;&gt;Certificate Authorities&lt;/a&gt;. Since this document was written at my own initiative, Equifax Secure Inc. is neither liable nor accountable for any consequences resulting from the use of these procedures.

My comments to the reader is in this style (emphasized).

Example lines are in plain roman style.

Note that extra comments and advice is found in comments within the SGML source.

1.1 About &lt;a class=&#34;zem_slink&#34; title=&#34;Transport Layer Security&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Transport_Layer_Security&#34; mce_href=&#34;http://en.wikipedia.org/wiki/Transport_Layer_Security&#34;&gt;Secure Sockets Layer&lt;/a&gt; (SSL) SSL is a presentation layer service, located between the TCP and the application layer. It is platform and application independent. SSL is responsible for the management of a secure communications channel between the client and server. SSL provides a strong mechanism for encrypting data transferred between a client and a server.

1.2 FeedBack Comments on this guide may be directed to the author (richard.sigle@equifax.com).

1.3 Copyrights and Trademarks Copyright (c) 2001 by Richard L. Sigle

Please freely copy and distribute this document in any format. It&#39;s requested that corrections and/or comments be forwarded to the document maintainer. You may create a derivative work and distribute it provided that you:

* Send your derivative work (in the most suitable format such as sgml) to the LDP (&lt;a class=&#34;zem_slink&#34; title=&#34;Linux Documentation Project&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Linux_Documentation_Project&#34; mce_href=&#34;http://en.wikipedia.org/wiki/Linux_Documentation_Project&#34;&gt;Linux Documentation Project&lt;/a&gt;) or the like for posting on the Internet. If not the LDP, then let the LDP know where it is available. * License the derivative work with this same license or use GPL. Include a copyright notice and at least a pointer to the license used. * Give due credit to previous authors and major contributors.

If you&#39;re considering making a derived work other than a translation, it&#39;s requested that you discuss your plans with the current maintainer.

1.4 Acknowledgements and Thanks I would like to thank Tony Villasenor for tirelessly reading my drafts and offering his input and advice. Without Tony, this document would never have been finished.

________________________________________________________________________ 2. Introduction to Secure Sockets Layer/Private Key Infrastructure &lt;a class=&#34;zem_slink&#34; title=&#34;Public key infrastructure&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Public_key_infrastructure&#34; mce_href=&#34;http://en.wikipedia.org/wiki/Public_key_infrastructure&#34;&gt;PKI&lt;/a&gt; is an asymmetric key system which consists of a public key (which is sent to clients) and a private key (stays local on the server). PKI differs from a symmetric key system in which both the client and server use the same key for encryption/decryption.

2.1 Responsibilities of SSL/PKI SSL sets out to fulfill requirements that make it acceptable for use in the transmission of even the most sensitive of transactions, such as credit card information, medical records, legal documents, and e-commerce applications. Each application can choose to utilize some or all of the following criteria depending on the sensitivity and value of the transactions it will be processing.

Privacy

Let&#39;s say that a message is to be coded for transmission from A to B. A uses B&#39;s public key to encrypt the message. In this way B will be the only person who can decode and read this message using his private key. We cannot however be sure that A is the person who he claims to be.

Authenticity

In order to be sure that A is the person who he claims to be, we want guaranteed authenticity. This requires a slightly more complex coding process. In this case, A&#39;s message to B is first encrypted with A&#39;s private key and then with B&#39;s public key. B now has to decrypt it first with his private key and then with A&#39;s public key. Now B can be sure that A is who he claims to be as nobody else could create a message encrypted with his private key. SSL achieves this with the use of certificates (PKI). A certificate is issued by a neutral third party - such as a certificate authority (CA) - and includes a digital signature and/or a time stamp in addition to the public key of the certified party. A self-signed digital certificate can be created by anyone with the correct SSL tools, but self-signed certificates lack the weight of validation performed by a mutually respected neutral third party.

integrity

In SSL, integrity is guaranteed by using a MAC (&lt;a class=&#34;zem_slink&#34; title=&#34;Message authentication code&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Message_authentication_code&#34; mce_href=&#34;http://en.wikipedia.org/wiki/Message_authentication_code&#34;&gt;Message Authentication Code&lt;/a&gt;) with the necessary hash table functions. Upon generation of a message, the MAC is obtained by applying a hash function and the result is then added to the message. After the message has been received, validity is then checked by comparing the message&#39;s embedded MAC with a new MAC computed from the received message. This would immediately reveal messages that have been altered by a third party.

&lt;a class=&#34;zem_slink&#34; title=&#34;Non-repudiation&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Non-repudiation&#34; mce_href=&#34;http://en.wikipedia.org/wiki/Non-repudiation&#34;&gt;Non-Repudiation&lt;/a&gt;

Non-repudiation protects both parties from each other during online transactions. It prevents one or the other from saying that they did not send a particular piece of information. Non-repudiation does not allow either party to alter the transaction after it has been made. Digital non-repudiation is the equivalent of signing a contract, in the traditional sense.

2.2 How SSL Works The SSL protocol includes two sub-protocols: the SSL record protocol and the SSL handshake protocol. The SSL record protocol defines the format used to transmit data. The SSL handshake protocol involves using the SSL record protocol to exchange a series of messages between an SSL-enabled server and an SSL-enabled client when they first establish an SSL connection. This exchange of messages is designed to facilitate the following actions:

* Authenticate the server to the client. The server certificate is signed by a Certificate Authority to insure that it is not corrupted and establishes a chain of trust. * Allow the client and server to select the cryptographic algorithms, or ciphers, that they both support. * Optionally authenticate the client to the server. * Use public-key encryption techniques to generate shared secrets. * Establish an encrypted SSL connection.

SSL Handshake Protocol The Handshake Protocol is used to co-ordinate the state of the client and the server. During the handshake, the following events take place:

* Certificates are exchanged between the client and server (asymmetric keys). The server sends its public key to the client. If the server is set to verify client authentication via a certificate, the client sends its public key to the server. The validity dates on the certificates are verified and they are checked for the digital signature of a trusted certificate authority. If the validity date and/or digital signature are not correct, the browser will issue a warning to the user. The user is then given the option to trust the certificate holder. * The client then generates a random key (symmetric key). These will be used for encryption and for calculating MACs. They are encrypted using the server&#39;s public key and sent to the server. Only the server has the ability to decrypt the new random key. The new symmetric key is used for encrypting the data that is sent between client and server.

Note: The use of a symmetric key after server-browser authentication greatly enhances subsequent throughput performance.

* A message encryption algorithm and a hash function for integrity are negotiated. This negotiation process could be carried out such that the client presents a list of supported algorithms to the server, which, in turn, selects the strongest cipher available to both of them. Identifiers for the chosen encryption algorithm and hash function are stored in the cipher spec field of the current state for use by the record protocol. * All of the following fields are set during handshaking: Protocol Version, Session ID, Cipher Suite, Compression Method and two random values ClientHello.random and ServerHello.random.

Note: An IP address is required for each SSL connection. Name based virtual hosts are resolved during the application layer. Remember Secure Sockets Layer resides below the application layer.

Session Key(Symmetric Code) * 40-bit, originally used only for export purposes * 56-bit, used by DES * 64-bit key - used by CAST, 256 times stronger than 56-bit * 80-bit key - used by CAST, 16 million times stronger than 56-bit (infeasible to break with current technology) * 128-bit key - used by CAST or RC2, exhaustive key search impossible now and for the foreseeable future

Public/Private Key Pair(Asymmetric Code) * 512-bit * 768-bit * 1024-bit * 2048-bit

2.3 How PKI Works The client and the server each have a public key and a private key (the client&#39;s browser randomly creates a key pair for the SSL session, unless, a client certificate is held by the client and requested by the server).

The sender uses their private key to encrypt a message. This act authenticates the source of the message. The resulting cipher is encrypted once more with the receiving party&#39;s public key. This action provides confidentiality because only the receiving party is able to do the initial decryption of the message using their private key. The receiver uses the sender&#39;s public key to further decrypt the encrypted message. Because only the sender has access to their private key, the receiver is assured that the encrypted message originated from the sender.

A message digest is used to verify that neither party or a third party has tampered with or changed the message in any way. A message digest is obtained by applying a hash function (part of the private key known as the fingerprint) to the message. The digest (which is now known as the signature) is attached or appended to the message. The signature&#39;s length is constant (no matter how large the file is) and depends on what type of message digest the private key contains (md5 - 128 bit, sha1 - 160 bit, etc). Changing even one bit in the message will change the length of the signature and thus prove that the message has been tampered with.

2.4 Certificates(x509 Standard) Digital certificates make it possible to trust an entity on the Internet. A digital certificate contains the user&#39;s credentials, which have been verified by a neutral third-party certificate authority.

A mathematical algorithm and a value (key) are used to encrypt data into an unreadable form. A second key is used to decrypt the data, using a complementary algorithm and a related value. The two keys must contain a related value and are known as a key pair.

Note: ITU-T Recommendation X.509 [CCI88c] specifies the authentication service for X.500 directories, as well as the X.509 certificate syntax. The certificate is signed by the issuer to authenticate the binding between the subject (user&#39;s) name and the user&#39;s public key. SSLv3 was adopted in 1994. The major difference between versions 2 and 3 is the addition of the extensions field. This field grants more flexibility as it can convey additional information beyond just the key and name binding. Standard extensions include subject and issuer attributes, certification policy information, and key usage restrictions.

An X.509 certificate consists of the following fields:

* Version * serial number * signature algorithm ID * issuer name * validity period * subject (user) name * subject public key information * issuer unique identifier (version 2 and 3 only) * subject unique identifier (version 2 and 3 only) * extensions (version 3 only) * signature on the above fields

2.5 Digital Certificate Private Key The private key is not embedded within a digital certificate. The private key does not include any server information. It contains encryption information and a fingerprint. It is generated locally on your system and should remain in a secure environment. If the private key is compromised, a perpetrator essentially has the code to your security system. The transmissions between client and server can be intercepted and decrypted. This type of vulnerability is why it is recommended to create a private key that is encrypted using triple DES technology. The file is then encrypted and password protected making it all but impossible to use without the correct pass phrase.

The security of a transaction is dependent on its private key. Should this key fall into the wrong hands then anyone can easily duplicate it and use it to compromise security. A compromised key could lead to messages meant for the server to be intercepted and manipulated by unscrupulous hackers. A fully secure system must be able to detect impostors and prevent the duplication of keys.

2.6 Digital Certificate Public Key The public key is embedded in a digital certificate, which is sent by the server to a client when a secure connection is requested. This process identifies the server using the certificate. The public key validates the integrity, authenticity, and is also used to encrypt data to create a private data transmission.

2.7 Certificate Signing Request(CSR) A CSR contains the information required by a certificate authority to create the certificate. The CSR contains an encrypted version of the private key&#39;s complimentary algorithm, common value, and information that identifies the server. This information includes, but is not limited to, country, state, organization, common name (domain name), and contact information.

________________________________________________________________________ 3. Working with Certificates The following section covers the steps involved in creating the private key file, certificate signing request, and a self-signed certificate. If you plan to obtain a certificate signed by a certificate authority, you will need to create a certificate signing request (CSR). Otherwise, you can create a self-signed certificate.

3.1 Create a Private Key To create a private key, you must have the OpenSSL toolkit installed and configured with Apache. The following examples use the OpenSSL command line tool which is located in the /usr/local/ssl/bin directory by default. The examples assume that the directory containing the OpenSSL command line tool has been added to the $PATH.

To create a private key using the triple des encryption standard (recommended), use the following command:

openssl genrsa -des3 -out filename.key 1024

You will be prompted to enter and re-enter a pass phrase. If you choose to use triple des encryption, you will be prompted for the password each time you start the SSL server from a cold start. (When using the restart command, you will not be prompted for the password). Some of you may find this password prompt to be a nuisance, especially if you need to boot the system during off-hours. Or, you may believe that your system is already sufficiently secure. So, if you choose not to have a password prompt (hence no triple des encryption), use the command below. If you would rather create just a 512-bit key, then omit the 1024 at the end of the command and OpenSSL will default to 512 bits. Using the smaller key is slightly faster, but it is also less secure.

To create a private key without triple des encryption, use the following command:

openssl genrsa -out filename.key 1024

To add a password to an existing private key, use the following command:

openssl -in filename.key -des3 -out newfilename.key

To remove a password from an existing private key, use the following command:

openssl -in filename.key -out newfilename.key

Note: Your private key will be created in the current directory unless otherwise specified. There are 3 easy ways to deal with this. If OpenSSL is in your path, you can run it from the directory that you have designated to store your key files in (default is /etc/httpd/conf/ssl.key if you installed Apache using the RPM or /usr/local/apache/conf/ssl.key if you installed Apache using the source files). Another solution is to copy the files from the directory where they were created to the correct directory. And, last but not least, you can specify the path when running the command (eg. openssl genrsa -out /etc/httpd/conf/ssl.key/filename.key 1024). Doesn&#39;t matter how you do it as long as it gets done before you proceed.

For more information on the OpenSSL toolkit check out: OpenSSL Website.

3.2 Create a Certificate Signing Request To obtain a certificate signed by a certificate authority, you will need to create a Certificate Signing Request (CSR). The purpose is to send the certificate authority enough information to create the certificate without sending the entire private key or compromising any sensitive information. The CSR also contains the information that will be included in the certificate, such as, domain name, locality information, etc.

* Locate the private key that you would like to creat a CSR from. Enter the following command: openssl req -new -key filename.key -out filename.csr * You will be prompted for Locality information, common name (domain name), organizational information, etc. Check with the CA that you are applying to for information on required fields and invalid entries. * Send the CSR to the CA per their instructions. * Wait for your new certificate and/or create a self-signed certificate. A self-signed certificate can be used until you receive your certificate from the certificate authority.

Note: Use the following command to create a private key and request at the same time.

openssl genrsa -des3 -out filename.key 1024

3.3 Creating a Self-Signed Certificate It is not necessary to create a self-signed certificate if you are obtaining a CA-signed certificate. However, creating a self-signed certificate is very simple. All you need is a private key and the name of the server (fully qualified domain name) that you want to secure. You will be prompted for information such as locality information, common name (domain name), organizational information, etc. OpenSSL gives you a great deal of freedom here. The only required field for the certificate to function correctly is the common name (domain name) field. If this is not present or incorrect, you will receive a Certificate Name Check warning from your browser.

To create a self-signed certificate:

openssl req -new -key filename.key -x509 -out filename.crt

3.4 Installing your Web Server Certificate If you followed these instructions so far you shouldn&#39;t have any problems at this point. If you sent your CSR to a certificate authority and you have not gotten your certificate back yet, you can take a break now! If you are using a self-signed certificate, or you have received your certificate, you may continue.

* Ensure that the private key file is in the directory that you have chosen to use. The following examples will be based on the RedHat RPM installation default of /etc/httpd/conf/ssl.key. * Ensure that the CA-signed or self-signed certificate is in its designated location. Again, I will be using the RPM default of /etc/httpd/conf/ssl.crt. If it is not there already, put it there. * If there is an intermediate (root) certificate to be installed, copy it to the /etc/httpd/conf/ssl.crt directory, also. * Now, you will be required to edit the httpd.conf file. Make a back-up of this file before you proceed to the next step, Configuring your Apache Server.

________________________________________________________________________ 4. Configuring your Apache Server The Apache server must be configured with supplementary API modules in order to support SSL. There are many SSL software packages available. My examples are based on Apache configured with ModSSL and OpenSSL. There are countless mailing lists and newsgroups available to support these products. You may find these instructions helpful for some commercial SSL software packages that are based on the Apache web server.

A few things to keep in mind: You can have multiple virtual hosts on the same server. You can have numerous name-based virtual hosts on the same IP address. You can also have numerous name-based virtual hosts and one (1) secure virtual host on the same IP. But - you cannot have multiple secure virtual hosts on the same IP. The question that so many ask: Why? The answer is: SSL works below the application layer. Name based hosts are not defined until the application layer.

Specifically, you cannot have multiple secure virtual hosts on the same SOCKET (IP address + port). By default, a secure host will use port 443. You can change configure your virtual host to use a different port number with the same IP, thus creating another socket. There are many disadvantages to this approach. The most obvious disadvantage is that if you are not using the default port, your URL must also contain the port number to access the secure site.

Example:

* Site using default port - &lt;a href=&#34;http://www.something.com&#34; mce_href=&#34;http://www.something.com&#34;&gt;www.something.com&lt;/a&gt; - would be accessed as &lt;a href=&#34;https://www.something.com&#34; mce_href=&#34;https://www.something.com&#34;&gt;https://www.something.com&lt;/a&gt; * A site using port 8888 would be accessed as &lt;a href=&#34;https://www.something.com:8888&#34; mce_href=&#34;https://www.something.com:8888&#34;&gt;https://www.something.com:8888&lt;/a&gt;

Another disadvantage is that if you introduce more ports, you will be providing more opportunities for port sniffing hackers. Last, if you select a port that is used by something else, you will create conflict problem.

4.1 Define a Secure Virtual Host Setting up virtual hosts is fairly straightforward. I will go through the basics of setting up a secure virtual host.

In these examples, I use the .crt and .key file extensions. That is my personal way of avoiding confusion with the various files. With Apache, you can use any extension you choose - or no extension at all.

All of your secure virtual hosts should be contained within  and , usually located towards the end of the httpd.conf file.

An example of a secure virtual host:

DocumentRoot /etc/httpd/htdocs ServerName &lt;a href=&#34;http://www.somewhere.com&#34; mce_href=&#34;http://www.somewhere.com&#34;&gt;www.somewhere.com&lt;/a&gt; ServerAdmin &lt;a href=&#34;mailto:someone@somewhere.com&#34; mce_href=&#34;mailto:someone@somewhere.com&#34;&gt;someone@somewhere.com&lt;/a&gt; ErrorLog /etc/httpd/logs/error_log TransferLog /etc/httpd/logs/access_log SSLEngine on SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key SSLCACertificateFile /etc/httpd/conf/ssl.crt/ca-bundle.crt  SSLOptions +StdEnvVars   SSLOptions +StdEnvVars  SetEnvIf User-Agent &#34;.*MSIE.*&#34; nokeepalive ssl-unclean-shutdown CustomLog /etc/httpd/logs/ssl_request_log  &#34;%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x &#34;%r&#34; %b&#34;

The directives that are the most important for SSL are the SSLEngine on, SSLCertificateFile, SSLCertificateKeyFile, and in many cases SSLCACertificateFile directives.

SSL Engine &#34;SSLEngine on&#34; - this is ModSSL&#39;s command to start SSL.

SSLCertificateFile SSLCertificateFile Tells Apache where to find the certificate file and what it is named. The example above shows &#34;server.crt&#34; as the certificate file name. This is the default that is added when you configure ModSSL with Apache. I personally don&#39;t recommend using the default names. Save yourself some frustration and name your certificates as servername.crt (domainname.crt). You may also decide to use an alternative directory than the default /etc/httpd/conf/ssl.crt or /usr/local/apache/conf/ssl.crt. Just remember to make the necessary changes to the path.

SSLCertificateKeyFile SSLCertificateKeyFile tells Apache the name of the private key and where to find it. The directory defined here should have read/write permissions for root only. No one else should have access to this directory.

SSLCACertificateFile The SSLCACertificateFile directive tells Apache where to find the Intermediate (root) certificate. This directive may or may not be necessary depending on the CA that you are using. This certificate is essentially a ring of trust.

Intermediate Certificate - A Certificate Authority obtains a certificate in much the same way as you. This is known as an intermediate certificate. It basically says that the holder of the intermediate certificate is whom they say they are and is authorized to issue certificates to customers. Web browsers have a list of &#34;trusted&#34; certificate authorities that is updated with each release. If a Certificate authority is fairly new, its intermediate certificate may not be in the browser&#39;s list of trusted CA&#39;s. Combine this with the fact that most people don&#39;t update their browsers very often; it could take years before a CA is recognized as trusted automatically. The solution is to install the intermediate certificate on the server using the SSLCACertificateFile directive. Usually, a &#34;trusted&#34; CA issues the intermediate certificate. If it is not, then you may need to use the SSLCertificateChainFile directive, although this is unlikely.

4.2 Certificate Examples Server Certificate File


&lt;div class=&#34;zemanta-pixie&#34; style=&#34;margin-top: 10px; height: 15px;&#34;&gt;&lt;a class=&#34;zemanta-pixie-a&#34; title=&#34;Enhanced by Zemanta&#34; href=&#34;http://www.zemanta.com/&#34; mce_href=&#34;http://www.zemanta.com/&#34;&gt;&lt;img class=&#34;zemanta-pixie-img&#34; style=&#34;border: medium none; float: right;&#34; mce_style=&#34;border: medium none; float: right;&#34; src=&#34;https://i1.wp.com/img.zemanta.com/zemified_e.png?w=688&#34; mce_src=&#34;https://i1.wp.com/img.zemanta.com/zemified_e.png?w=688&#34; alt=&#34;Enhanced by Zemanta&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;span class=&#34;zem-script more-related pretty-attribution&#34;&gt;&lt;mce:script mce_src=&#34;http://static.zemanta.com/readside/loader.js&#34; type=&#34;text/javascript&#34;&gt;&lt;/mce:script&gt;&lt;/span&gt;&lt;/div&gt;


--&gt;
&lt;h6 class=&#34;zemanta-related-title&#34; style=&#34;font-size: 1em;&#34;&gt;
  Related articles
&lt;/h6&gt;
&lt;ul class=&#34;zemanta-article-ul&#34;&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://www.shermann.name/2010/08/ubuntu-1004-lts-and-openldap.html&#34;&gt;Stephan Hermann: Ubuntu 10.04 LTS and OpenLDAP&lt;/a&gt; (shermann.name)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://intridea.com/posts/exploring-ldap-sasl-authentication-with-ruby&#34;&gt;Exploring LDAP SASL Authentication With Ruby&lt;/a&gt; (intridea.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://www.shermann.name/2010/08/solved-openldap-passwd-and-crypt.html&#34;&gt;Stephan Hermann: [SOLVED] OpenLDAP, passwd and CRYPT passwords&lt;/a&gt; (shermann.name)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://www.edugeek.net/forums/virtual-learning-platforms/61792-moodle-slow-ldap-login.html&#34;&gt;Moodle &amp;#8211; Slow LDAP Login&lt;/a&gt; (edugeek.net)
  &lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;zemanta-pixie&#34; style=&#34;margin-top: 10px; height: 15px;&#34;&gt;
  &lt;a class=&#34;zemanta-pixie-a&#34; title=&#34;Enhanced by Zemanta&#34; href=&#34;http://www.zemanta.com/&#34;&gt;&lt;img class=&#34;zemanta-pixie-img&#34; style=&#34;border: medium none; float: right;&#34; src=&#34;https://i1.wp.com/img.zemanta.com/zemified_e.png?w=688&#34; alt=&#34;Enhanced by Zemanta&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;span class=&#34;zem-script more-related pretty-attribution&#34;&gt;&lt;/span&gt;
&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>Firesheep addon allows the clueless to hack Facebook, Twitter over Wi-Fi</title>
      <link>/2010/11/13/firesheep-addon-clueless-hack-facebook-twitter-wifi/</link>
      <pubDate>Sat, 13 Nov 2010 03:51:20 +0000</pubDate>
      
      <guid>/2010/11/13/firesheep-addon-clueless-hack-facebook-twitter-wifi/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Firesheep addon allows the clueless to hack &lt;a class=&#34;zem_slink&#34; title=&#34;Facebook&#34; rel=&#34;homepage&#34; href=&#34;http://facebook.com&#34;&gt;Facebook&lt;/a&gt;, &lt;a class=&#34;zem_slink&#34; title=&#34;Twitter&#34; rel=&#34;homepage&#34; href=&#34;http://twitter.com&#34;&gt;Twitter&lt;/a&gt; over &lt;a class=&#34;zem_slink&#34; title=&#34;Wi-Fi&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Wi-Fi&#34;&gt;Wi-Fi&lt;/a&gt; If you thought hijacking a user’s social media session was only done by skilled hackers, now the Firesheep addon can allow even the truly clueless to become an &lt;a class=&#34;zem_slink&#34; title=&#34;Internet&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Internet&#34;&gt;Internet&lt;/a&gt; &lt;a class=&#34;zem_slink&#34; title=&#34;Griefer&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Griefer&#34;&gt;griefer&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;zem_slink&#34; title=&#34;Uniform Resource Locator&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Uniform_Resource_Locator&#34;&gt;URL&lt;/a&gt;: &lt;a href=&#34;http://feeds.digg.com/~r/digg/topic/linux_unix/popular/~3/cb0qD08tfpU/firesheep_addon_allows_the_clueless_to_hack_facebook_twitter_over_wi_fi&#34;&gt;http://feeds.digg.com/~r/digg/topic/linux_unix/popular/~3/cb0qD08tfpU/firesheep_addon_allows_the_clueless_to_hack_facebook_twitter_over_wi_fi&lt;/a&gt;&lt;/p&gt;
&lt;h6 class=&#34;zemanta-related-title&#34; style=&#34;font-size: 1em;&#34;&gt;
  Related articles
&lt;/h6&gt;
&lt;ul class=&#34;zemanta-article-ul&#34;&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://voipsa.org/blog/2010/10/26/firesheep-a-new-tool-for-capturing-data-on-unsecured-wifi/&#34;&gt;Firesheep &amp;#8211; a new tool for capturing data on unsecured WiFi&lt;/a&gt; (voipsa.org)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://blogs.forbes.com/kashmirhill/2010/10/25/firesheep-why-you-may-never-want-to-use-an-open-wi-fi-network-again/&#34;&gt;Firesheep: Why You May Never Want to Use an Open Wi-Fi Network Again&lt;/a&gt; (blogs.forbes.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://www.gizmag.com/firesheep-http-hijacking-tool/16726/&#34;&gt;Firesheep session hijacking tool makes public Wi-Fi useless&lt;/a&gt; (gizmag.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://www.pcworld.com/article/208727/Firesheep_Brings_Hacking_to_the_Masses.html?tk=rss_news&#34;&gt;Firefox Add-on Firesheep Brings Hacking to the Masses&lt;/a&gt; (pcworld.com)
  &lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;zemanta-pixie&#34; style=&#34;margin-top: 10px; height: 15px;&#34;&gt;
  &lt;a class=&#34;zemanta-pixie-a&#34; title=&#34;Enhanced by Zemanta&#34; href=&#34;http://www.zemanta.com/&#34;&gt;&lt;img class=&#34;zemanta-pixie-img&#34; style=&#34;border: medium none; float: right;&#34; src=&#34;https://i1.wp.com/img.zemanta.com/zemified_e.png?w=688&#34; alt=&#34;Enhanced by Zemanta&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;span class=&#34;zem-script more-related pretty-attribution&#34;&gt;&lt;/span&gt;
&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>Quick tip on zipping logs in real time.</title>
      <link>/2010/10/13/quick-tip-zipping-logs-real-time/</link>
      <pubDate>Wed, 13 Oct 2010 17:57:53 +0000</pubDate>
      
      <guid>/2010/10/13/quick-tip-zipping-logs-real-time/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Sometimes, some small things that we don’t actually think can be useful are such useful. I faced this couple of days back when I was working on something and the amount of logs getting generated and the files getting rotated was too fast. If I had to use this for sometime, I needed some script, application or something to make sure that the logs are zipped every few seconds. Finding an application for this would take time and what good is bash if we need to find applications for this. So, a simple bash command did the trick. Most of us would know this but applying it and using it at the right time, was what saved my life. Thanks to bash. Here is the command:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introduction to the Command Line (Second Edition) — Free Ebook Download</title>
      <link>/2010/10/06/introduction-command-line-edition-free-ebook-download/</link>
      <pubDate>Wed, 06 Oct 2010 15:21:46 +0000</pubDate>
      
      <guid>/2010/10/06/introduction-command-line-edition-free-ebook-download/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Pretty good book for beginners on command line whether you work on &lt;a class=&#34;zem_slink&#34; title=&#34;Ubuntu (operating system)&#34; rel=&#34;homepage&#34; href=&#34;http://www.ubuntu.com/&#34;&gt;Ubuntu&lt;/a&gt;, &lt;a class=&#34;zem_slink&#34; title=&#34;Fedora&#34; rel=&#34;homepage&#34; href=&#34;http://fedoraproject.org/&#34;&gt;Fedora&lt;/a&gt;, BSD or any other version.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&#34;http://www.lulu.com/product/ebook/introduction-to-the-command-line-%28second-edition%29/12665426&#34; target=&#34;_blank&#34;&gt;&lt;a href=&#34;http://www.lulu.com/product/ebook/introduction-to-the-command-line-%28second-edition%29/12665426&#34;&gt;http://www.lulu.com/product/ebook/introduction-to-the-command-line-%28second-edition%29/12665426&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h6 class=&#34;zemanta-related-title&#34; style=&#34;font-size: 1em;&#34;&gt;
  Related articles by Zemanta
&lt;/h6&gt;
&lt;ul class=&#34;zemanta-article-ul&#34;&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://www.ghacks.net/2010/09/30/install-libreoffice-on-fedora-and-ubuntu/&#34;&gt;Install LibreOffice on Fedora and Ubuntu&lt;/a&gt; (ghacks.net)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://www.makeuseof.com/tag/learn-ubuntu-command-line-clicompanion/&#34;&gt;Learn To Use The Ubuntu Command Line With CLIcompanion&lt;/a&gt; (makeuseof.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://crenk.com/how-to-install-gimp-in-ubuntu/&#34;&gt;How To Install GIMP in Ubuntu&lt;/a&gt; (crenk.com)
  &lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;zemanta-pixie&#34; style=&#34;margin-top: 10px; height: 15px;&#34;&gt;
  &lt;a class=&#34;zemanta-pixie-a&#34; title=&#34;Enhanced by Zemanta&#34; href=&#34;http://www.zemanta.com/&#34;&gt;&lt;img class=&#34;zemanta-pixie-img&#34; style=&#34;border: medium none; float: right;&#34; src=&#34;https://i1.wp.com/img.zemanta.com/zemified_e.png?w=688&#34; alt=&#34;Enhanced by Zemanta&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;span class=&#34;zem-script more-related pretty-attribution&#34;&gt;&lt;/span&gt;
&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>[Solved] Abbreviations not working in vim</title>
      <link>/2010/10/02/solved-abbreviations-working-vim/</link>
      <pubDate>Sat, 02 Oct 2010 15:17:39 +0000</pubDate>
      
      <guid>/2010/10/02/solved-abbreviations-working-vim/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Today I found that abbreviations are not working in vim in my current login. I searched log of blog’s and sill did not find any solution so I decided to take the matters in my hand.&lt;/p&gt;
&lt;p&gt;To start with I &lt;a class=&#34;zem_slink&#34; title=&#34;Disability&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Disability&#34;&gt;disabled&lt;/a&gt; all the plugin’s by moving my &lt;a class=&#34;zem_slink&#34; title=&#34;WordPress Plugin Directory&#34; rel=&#34;homepage&#34; href=&#34;http://wordpress.org/extend/plugins/&#34;&gt;plugin directory&lt;/a&gt;. This did not help me solve the issue, so the only other option left was to now disable the vimrc file completely. Once I removed the vimrc file, the abbreviations started working.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>bash script to run a command and take screenshot in every loop.</title>
      <link>/2010/09/24/bash-script-to-run-a-command-and-take-screenshot-in-every-loop/</link>
      <pubDate>Fri, 24 Sep 2010 16:02:14 +0000</pubDate>
      
      <guid>/2010/09/24/bash-script-to-run-a-command-and-take-screenshot-in-every-loop/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Couple of days back, I had posted a command to display a stop timer with bash and echo. There I had also put the following gif file:&lt;/p&gt;
&lt;p&gt;&amp;lt;img class=&amp;quot;size-medium wp-image-2555&amp;quot; title=&amp;quot;bash screenshot for the script output&amp;quot; src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/09/temp-300x170.gif&amp;quot; alt=&amp;quot;bash screenshot for the script output&amp;quot; width=&amp;quot;300&amp;quot; height=&amp;quot;170&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;Here the tricky part was to capture the jpg&amp;amp;#8217;s to create the gif file.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Preparation:&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Rename the terminal to aka – amit-capture&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Execute the command once with the import command and check the output and jpg&amp;amp;#8217;s&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>bash – echo command with option to display the output on the same line.</title>
      <link>/2010/09/21/bash-echo-command-with-option-to-display-the-output-on-the-same-line/</link>
      <pubDate>Tue, 21 Sep 2010 15:15:05 +0000</pubDate>
      
      <guid>/2010/09/21/bash-echo-command-with-option-to-display-the-output-on-the-same-line/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Here is a nice little trick to display the output in the same line :&lt;/p&gt;
&lt;div class=&#34;codecolorer-container bash solarized-light&#34; style=&#34;overflow:auto;white-space:nowrap;width:550px;&#34;&gt;
  &lt;table cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&gt;
    &lt;tr&gt;
      &lt;td class=&#34;line-numbers&#34;&gt;
        &lt;div&gt;
          1&lt;br /&gt;
        &lt;/div&gt;
      &lt;/td&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;td&amp;gt;
    &amp;lt;div class=&amp;quot;bash codecolorer&amp;quot;&amp;gt;
      &amp;amp;nbsp;&amp;lt;span class=&amp;quot;kw3&amp;quot;&amp;gt;echo&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;re5&amp;quot;&amp;gt;-ne&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;output\&amp;lt;span class=&amp;quot;es1&amp;quot;&amp;gt;\r&amp;lt;/span&amp;gt;&amp;quot;&amp;lt;/span&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;The trick here is simple, first we disable the &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Newline&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Newline&amp;quot;&amp;gt;newline&lt;/a&gt; printed by &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Echo (command)&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Echo_%28command%29&amp;quot;&amp;gt;echo command&lt;/a&gt; with the &amp;amp;#8221;&lt;strong&gt;-n&lt;/strong&gt;&amp;amp;#8221; option and then we enable the interpretation of the &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Backslash&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Backslash&amp;quot;&amp;gt;backslash&lt;/a&gt; characters with the &amp;amp;#8221;&lt;strong&gt;-e&lt;/strong&gt;&amp;amp;#8221; option. As the &amp;amp;#8221;\r&amp;amp;#8221; is used as &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Carriage return&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Carriage_return&amp;quot;&amp;gt;carriage return&lt;/a&gt; which brings you to the start of the line without the newline (like in &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Typewriter&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Typewriter&amp;quot;&amp;gt;typewriter&lt;/a&gt;), we will use the same to get the desired effect. So, if you wanted a stopwatch for a 100 seconds on the console then this simple bash &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;For loop&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/For_loop&amp;quot;&amp;gt;for loop&lt;/a&gt; would do the same:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>OpenID for non-SuperUsers</title>
      <link>/2010/09/07/openid-nonsuperusers/</link>
      <pubDate>Tue, 07 Sep 2010 23:36:05 +0000</pubDate>
      
      <guid>/2010/09/07/openid-nonsuperusers/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Based on the results of my Unobtrusive &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;OpenID Foundation&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://openid.net&amp;quot;&amp;gt;OpenID&lt;/a&gt; post, it is quite evident that there is a lot of partial &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Knowledge&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Knowledge&amp;quot;&amp;gt;knowledge&lt;/a&gt; about OpenID out there. While my knowledge on the subject is far from complete, this post is my attempt to share what I have learned with others.&lt;/p&gt;
&lt;p&gt;The target audience for the bulk of this post is people who are capable of adding autodiscovery links to their blog templates, may be able to install a small &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;PHP&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://www.php.net/&amp;quot;&amp;gt;PHP&lt;/a&gt; script and/or know what a &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Hypertext Transfer Protocol&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol&amp;quot;&amp;gt;HTTP&lt;/a&gt; &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;List of HTTP headers&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/List_of_HTTP_headers&amp;quot;&amp;gt;header&lt;/a&gt; is.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Getting your wordpress self hosted stats on your console with bash script.</title>
      <link>/2010/06/29/wordpress-hosted-stats-console-bash-script/</link>
      <pubDate>Tue, 29 Jun 2010 12:23:05 +0000</pubDate>
      
      <guid>/2010/06/29/wordpress-hosted-stats-console-bash-script/</guid>
      <description>&lt;p&gt;Some time back I wrote a blog on how to get your site stats using curl in &amp;lt;a class=&amp;quot;zem_slink freebase/en/bash&amp;quot; title=&amp;quot;Bash&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://tiswww.case.edu/php/chet/bash/bashtop.html&amp;quot;&amp;gt;bash shell&lt;/a&gt;. Today we will use the same script to get the stats every few seconds on the terminal on the same line, similar to progress meter.&lt;/p&gt;
&lt;p&gt;Here is the script and the description:&lt;/p&gt;
&lt;div class=&#34;codecolorer-container bash solarized-light&#34; style=&#34;overflow:auto;white-space:nowrap;width:550px;&#34;&gt;
  &lt;table cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&gt;
    &lt;tr&gt;
      &lt;td class=&#34;line-numbers&#34;&gt;
        &lt;div&gt;
          1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4&lt;br /&gt;5&lt;br /&gt;6&lt;br /&gt;7&lt;br /&gt;8&lt;br /&gt;9&lt;br /&gt;10&lt;br /&gt;11&lt;br /&gt;12&lt;br /&gt;13&lt;br /&gt;14&lt;br /&gt;15&lt;br /&gt;16&lt;br /&gt;17&lt;br /&gt;18&lt;br /&gt;19&lt;br /&gt;20&lt;br /&gt;21&lt;br /&gt;22&lt;br /&gt;23&lt;br /&gt;24&lt;br /&gt;25&lt;br /&gt;26&lt;br /&gt;27&lt;br /&gt;28&lt;br /&gt;29&lt;br /&gt;30&lt;br /&gt;31&lt;br /&gt;
        &lt;/div&gt;
      &lt;/td&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;td&amp;gt;
    &amp;lt;div class=&amp;quot;bash codecolorer&amp;quot;&amp;gt;
      &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#!/bin/bash -&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#===============================================================================&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#          FILE:  update_stats.sh&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#         USAGE:  ./update_stats.sh&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#   DESCRIPTION:  Update the stats inline in shell every $1 seconds.&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#       OPTIONS:  ---&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#  REQUIREMENTS:  ---&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#          BUGS:  ---&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#         NOTES:  ---&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#        AUTHOR:  &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Amit Agarwal&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://amit-agarwal.co.in&amp;quot;&amp;gt;Amit Agarwal&amp;lt;/a&amp;gt; (AKA), amit.agarwal@amit-agarwal.co.in&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#       COMPANY:  Individual&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#       VERSION:  1.0&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#       CREATED:  06/21/2010 11:27:16 PM IST&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#      REVISION:  ---&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#===============================================================================&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;sleep_time&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;nu0&amp;quot;&amp;gt;30&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;#the time to wait between stats collection&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;run_stats&amp;lt;/span&amp;gt;=get_stats  &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;# the script to run to get the stats&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;filename&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;/&amp;lt;/span&amp;gt;tmp&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;/&amp;lt;/span&amp;gt;statpress.html &amp;lt;span class=&amp;quot;co0&amp;quot;&amp;gt;# the filename where the script is storing the html file of your statpress page.&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;kw3&amp;quot;&amp;gt;eval&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;re1&amp;quot;&amp;gt;$run_stats&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;nu0&amp;quot;&amp;gt;2&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;gt;&amp;lt;&amp;lt;/span&amp;gt;a &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;class&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;zem_slink freebase/en/dev_null&amp;quot;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;title&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;/dev/null&amp;quot;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;rel&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;wikipedia&amp;quot;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;href&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;http://en.wikipedia.org/wiki//dev/null&amp;quot;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;gt;/&amp;lt;/span&amp;gt;dev&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;/&amp;lt;/span&amp;gt;null&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;lt;/&amp;lt;/span&amp;gt;a&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;kw1&amp;quot;&amp;gt;while&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;br0&amp;quot;&amp;gt;&amp;amp;#40;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;kw2&amp;quot;&amp;gt;true&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;br0&amp;quot;&amp;gt;&amp;amp;#41;&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;kw1&amp;quot;&amp;gt;do&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;lt;!&amp;lt;/span&amp;gt;--loginview start--&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;values&amp;lt;/span&amp;gt;=$&amp;lt;span class=&amp;quot;br0&amp;quot;&amp;gt;&amp;amp;#40;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;kw2&amp;quot;&amp;gt;cat&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;re1&amp;quot;&amp;gt;$filename&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt; w3m &amp;lt;span class=&amp;quot;re5&amp;quot;&amp;gt;-dump&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;re5&amp;quot;&amp;gt;-T&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;lt;&amp;lt;/span&amp;gt;a &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;class&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;zem_slink freebase/en/html&amp;quot;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;title&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;HTML&amp;quot;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;rel&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;wikipedia&amp;quot;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;href&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;http://en.wikipedia.org/wiki/HTML&amp;quot;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;gt;&amp;lt;/span&amp;gt;text&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;/&amp;lt;/span&amp;gt;html&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;lt;/&amp;lt;/span&amp;gt;a&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;gt;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;|&amp;lt;&amp;lt;/span&amp;gt;a &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;class&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;zem_slink freebase/en/grep&amp;quot;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;title&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;Grep&amp;quot;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;rel&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;wikipedia&amp;quot;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;href&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;http://en.wikipedia.org/wiki/Grep&amp;quot;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;kw2&amp;quot;&amp;gt;grep&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;lt;/&amp;lt;/span&amp;gt;a&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;gt;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;^Visitor\\|^Pageviews&amp;quot;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;|&amp;lt;&amp;lt;/span&amp;gt;a &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;class&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;zem_slink freebase/en/awk&amp;quot;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;title&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;AWK&amp;quot;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;rel&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;homepage&amp;quot;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;href&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;http://cm.bell-labs.com/cm/cs/awkbook/index.html&amp;quot;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;kw2&amp;quot;&amp;gt;awk&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;lt;/&amp;lt;/span&amp;gt;a&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;gt;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;co3&amp;quot;&amp;gt;\&#39;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;br0&amp;quot;&amp;gt;&amp;amp;#123;&amp;lt;/span&amp;gt;print &amp;lt;span class=&amp;quot;re4&amp;quot;&amp;gt;$1&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;nu0&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;br0&amp;quot;&amp;gt;&amp;amp;#125;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;co3&amp;quot;&amp;gt;\&#39;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;kw2&amp;quot;&amp;gt;tr&amp;lt;/span&amp;gt;  &amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;\&amp;lt;span class=&amp;quot;es1&amp;quot;&amp;gt;\n&amp;lt;/span&amp;gt;&amp;quot;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot; &amp;quot;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;br0&amp;quot;&amp;gt;&amp;amp;#41;&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;re2&amp;quot;&amp;gt;time&amp;lt;/span&amp;gt;=$&amp;lt;span class=&amp;quot;br0&amp;quot;&amp;gt;&amp;amp;#40;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;kw2&amp;quot;&amp;gt;date&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;br0&amp;quot;&amp;gt;&amp;amp;#41;&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;kw3&amp;quot;&amp;gt;printf&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;&amp;lt;span class=&amp;quot;es2&amp;quot;&amp;gt;$time&amp;lt;/span&amp;gt; --&amp;gt; &amp;lt;span class=&amp;quot;es2&amp;quot;&amp;gt;$values&amp;lt;/span&amp;gt; \&amp;lt;span class=&amp;quot;es1&amp;quot;&amp;gt;\r&amp;lt;/span&amp;gt;&amp;quot;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;lt;!&amp;lt;/span&amp;gt;--loginview end--&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;kw2&amp;quot;&amp;gt;sleep&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;re1&amp;quot;&amp;gt;$sleep_time&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;span class=&amp;quot;kw1&amp;quot;&amp;gt;done&amp;lt;/span&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/table&gt;
&lt;/div&gt;&lt;h6 class=\&#34;zemanta-related-title\&#34;&gt;Related articles by Zemanta&lt;/h6&gt; &lt;ul class=\&#34;zemanta-article-ul\&#34;&gt; &lt;li class=\&#34;zemanta-article-ul-li\&#34;&gt;&lt;a href=\&#34;http://blog.amit-agarwal.co.in/2010/06/11/for-loop-in-bash-script-on-solaris-without-seq/\&#34;&gt;for loop in bash script on solaris without seq&lt;/a&gt; (amit-agarwal.co.in)&lt;/li&gt; &lt;li class=\&#34;zemanta-article-ul-li\&#34;&gt;&lt;a href=\&#34;http://blog.amit-agarwal.co.in/2010/04/12/mappings-tex-file-vim-plugins/\&#34;&gt;Get the mappings from tex file for vim plugins&lt;/a&gt; (amit-agarwal.co.in)&lt;/li&gt; &lt;li class=\&#34;zemanta-article-ul-li\&#34;&gt;&lt;a href=\&#34;http://blog.amit-agarwal.co.in/2010/03/23/unbound-variable-bash-completion-not-working-and-having-issues-with-other-stuff-like-command-not-found/\&#34;&gt;unbound variable &amp;#8211; bash completion not working and having issues with other stuff like command not found.&lt;/a&gt; (amit-agarwal.co.in)&lt;/li&gt; &lt;li class=\&#34;zemanta-article-ul-li\&#34;&gt;&lt;a href=\&#34;http://almirkaric.com/2010/5/2/bash-builtins/\&#34;&gt;bash builtins&lt;/a&gt; (almirkaric.com)&lt;/li&gt; &lt;/ul&gt; &lt;div class=\&#34;zemanta-pixie\&#34;&gt;&lt;a class=\&#34;zemanta-pixie-a\&#34; title=\&#34;Enhanced by Zemanta\&#34; href=\&#34;http://www.zemanta.com/\&#34;&gt;&lt;img class=\&#34;zemanta-pixie-img\&#34; src=\&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/zemified_c11.gif\&#34; alt=\&#34;Enhanced by Zemanta\&#34; /&gt;&lt;/a&gt;&lt;span class=\&#34;zem-script more-related more-info pretty-attribution paragraph-reblog\&#34;&gt;&lt;/span&gt;&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>bash one liner to change/remove test pattern from config file or text file.</title>
      <link>/2010/06/25/bash-one-liner-to-changeremove-test-pattern-from-config-file-or-text-file/</link>
      <pubDate>Fri, 25 Jun 2010 11:47:05 +0000</pubDate>
      
      <guid>/2010/06/25/bash-one-liner-to-changeremove-test-pattern-from-config-file-or-text-file/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Problem:&lt;/p&gt;
&lt;p&gt;I had a directory with a lot of config files in the ini file format, i.e. name and value separated by equals. Some/all of these contained some directory names and other values which had to be replaced. But there were other place where I should not not replace them, if there was no exact match. I also needed to have a backup copy of the file that I was modifying. Since the number of files that I needed to change was multiple so was quite difficult to do it without using some script.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>find duplicate entry in a list in bash with sed</title>
      <link>/2010/06/25/find-duplicate-entry-in-a-list-in-bash-with-sed/</link>
      <pubDate>Fri, 25 Jun 2010 11:46:58 +0000</pubDate>
      
      <guid>/2010/06/25/find-duplicate-entry-in-a-list-in-bash-with-sed/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Here I will take an example of rss2email list, but I guess I will be able to pass on the concept.&lt;/p&gt;
&lt;p&gt;Here is example of the output of the r2e list command:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;1: &lt;a href=&#34;http://blog.amit-agarwal.co.in/feed&#34;&gt;http://blog.amit-agarwal.co.in/feed&lt;/a&gt; (default: amitag@localhost)&lt;br&gt;
2: &lt;a href=&#34;http://feeds2.feedburner.com/AllAboutLinux&#34;&gt;http://feeds2.feedburner.com/AllAboutLinux&lt;/a&gt; (default: amitag@localhost)&lt;br&gt;
3: &lt;a href=&#34;http://feeds2.feedburner.com/Command-line-fu&#34;&gt;http://feeds2.feedburner.com/Command-line-fu&lt;/a&gt; (default: amitag@localhost)&lt;br&gt;
4: &lt;a href=&#34;http://blogs.members.freewebs.com/Members/Blogs/viewBlogRSS.jsp?userid=29731143&#34;&gt;http://blogs.members.freewebs.com/Members/Blogs/viewBlogRSS.jsp?userid=29731143&lt;/a&gt; (default: amitag@localhost)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Target here is to get the list of all duplicate entries if any. So, first we need to remove the numbers from the begining and the email ID from the end.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>bash script to change the vim colorscheme from the list of locally available schemes</title>
      <link>/2010/06/25/bash-script-to-change-the-vim-colorscheme-from-the-list-of-locally-available-schemes/</link>
      <pubDate>Thu, 24 Jun 2010 20:51:35 +0000</pubDate>
      
      <guid>/2010/06/25/bash-script-to-change-the-vim-colorscheme-from-the-list-of-locally-available-schemes/</guid>
      <description>&lt;div class=\&#34;zemanta-img\&#34;&gt; 
&lt;div&gt;
  &lt;dl class=\&#34;wp-caption alignright\&#34;&gt; &lt;dt class=\&#34;wp-caption-dt\&#34;&gt;&lt;a href=\&#34;http://commons.wikipedia.org/wiki/Image:Vim_gloss_128.png\&#34;&gt;&lt;img title=\&#34;MacVim icon, glossy style\&#34; src=\&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Vim_gloss_128.png\&#34; alt=\&#34;MacVim icon, glossy style\&#34; /&gt;&lt;/a&gt;&lt;/dt&gt; &lt;dd class=\&#34;wp-caption-dd zemanta-img-attribution\&#34;&gt;Image via &lt;a href=\&#34;http://commons.wikipedia.org/wiki/Image:Vim_gloss_128.png\&#34;&gt;Wikipedia&lt;/a&gt;&lt;/dd&gt; &lt;/dl&gt;
&lt;/div&gt;&lt;/div&gt; 
&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Today I was just wondering how good it would be to have a script to change the &amp;lt;a class=&amp;quot;zem_slink freebase/en/vim&amp;quot; title=&amp;quot;Vim (text editor)&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://www.vim.org/&amp;quot;&amp;gt;vim&lt;/a&gt; colorscheme from the &amp;lt;a class=&amp;quot;zem_slink freebase/en/cmd_exe&amp;quot; title=&amp;quot;Command Prompt&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Command_Prompt&amp;quot;&amp;gt;command prompt&lt;/a&gt;. The plan for the script was simply to print the list of available schemes and then let the user select the actions from there on. So, here is the result:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>cdargs – bash cd command with bookmarks and browser.</title>
      <link>/2010/06/22/cdargs-bash-cd-command-with-bookmarks-and-browser/</link>
      <pubDate>Tue, 22 Jun 2010 02:37:47 +0000</pubDate>
      
      <guid>/2010/06/22/cdargs-bash-cd-command-with-bookmarks-and-browser/</guid>
      <description>&lt;div class=\&#34;zemanta-img\&#34;&gt; 
&lt;div&gt;
  &lt;dl class=\&#34;wp-caption alignright\&#34;&gt; &lt;dt class=\&#34;wp-caption-dt\&#34;&gt;&lt;a href=\&#34;http://commons.wikipedia.org/wiki/Image:Bash_demo.png\&#34;&gt;&lt;img title=\&#34;Screenshot of a Bash 3.1 session demonstrating...\&#34; src=\&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/300px-Bash_demo.png\&#34; alt=\&#34;Screenshot of a Bash 3.1 session demonstrating...\&#34; /&gt;&lt;/a&gt;&lt;/dt&gt; &lt;dd class=\&#34;wp-caption-dd zemanta-img-attribution\&#34;&gt;Image via &lt;a href=\&#34;http://commons.wikipedia.org/wiki/Image:Bash_demo.png\&#34;&gt;Wikipedia&lt;/a&gt;&lt;/dd&gt; &lt;/dl&gt;
&lt;/div&gt;&lt;/div&gt; 
&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;cdargs is a &amp;lt;a class=&amp;quot;zem_slink freebase/en/bash&amp;quot; title=&amp;quot;Bash&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://tiswww.case.edu/php/chet/bash/bashtop.html&amp;quot;&amp;gt;bash shell&lt;/a&gt; cd with bookmarks and browser. Quite useful if you are developer or someone who use&amp;amp;#8217;s the bash shell very frequently&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;Name       : cdargs
&lt;/blockquote&gt;
&lt;p&gt;Arch       : i686
Version    : 1.35
Release    : 5.fc12
Size       : 114 k
Repo       : installed
From repo  : fedora
Summary    : The shell cd with bookmarks and browser
URL        : &lt;a href=&#34;http://www.skamphausen.de/software/cdargs/&#34;&gt;http://www.skamphausen.de/software/cdargs/&lt;/a&gt;
License    : &amp;lt;a class=&amp;quot;zem_slink freebase/en/gnu_general_public_license&amp;quot; title=&amp;quot;GNU General Public License&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/GNU_General_Public_License&amp;quot;&amp;gt;GPLv2&amp;lt;/a&amp;gt;+
Description: Enables the user to quickly change &amp;lt;a class=&amp;quot;zem_slink freebase/en/working_directory&amp;quot; title=&amp;quot;Working directory&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Working_directory&amp;quot;&amp;gt;working directory&amp;lt;/a&amp;gt; by navigating cd arguments
: and expanding the shell built-in cd with bookmarks and browser.&lt;/pre&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>List of commands you use most often</title>
      <link>/2010/06/16/list-commands/</link>
      <pubDate>Wed, 16 Jun 2010 02:17:01 +0000</pubDate>
      
      <guid>/2010/06/16/list-commands/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;h1 id=&#34;span-stylefont-size-x-largea-hrefhttpfeedproxygooglecomrcommand-line-fu36mxhisiindolist-of-commands-you-use-most-oftenlist-of-commands-you-use-most-oftenaspan&#34;&gt;&lt;strong&gt;&amp;lt;span style=&amp;quot;font-size: x-large;&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://feedproxy.google.com/~r/Command-line-fu/~3/6MxHiSiINdo/list-of-commands-you-use-most-often&amp;quot;&amp;gt;List of commands you use most often&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;&lt;tt&gt;$ history | &amp;lt;a class=&amp;quot;zem_slink freebase/en/awk&amp;quot; title=&amp;quot;AWK&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://cm.bell-labs.com/cm/cs/awkbook/index.html&amp;quot;&amp;gt;awk&lt;/a&gt; &#39;{a[$2]++}END{for(i in a){print a[i] &amp;quot; &amp;quot; i}}&#39; | sort -rn | head &amp;gt; /tmp/cmds | gnuplot -persist &amp;lt;(echo &#39;plot &amp;quot;/tmp/cmds&amp;quot; using 1:xticlabels(2) with boxes&#39;)&lt;/tt&gt; Plot your most used commands with gnuplot.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;lt;a href=&amp;quot;http://www.commandlinefu.com/commands/view/5845/list-of-commands-you-use-most-often&amp;quot;&amp;gt;View this command to comment, vote or add to favourites&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&amp;lt;a href=&amp;quot;http://feeds2.feedburner.com/commands/by/sthrs&amp;quot;&amp;gt;View all commands by &lt;/a&gt;&lt;strong&gt;&amp;lt;a href=&amp;quot;http://feeds2.feedburner.com/commands/by/sthrs&amp;quot;&amp;gt;sthrs&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://www.commandlinefu.com&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/header-logo.jpg&amp;quot; alt=&amp;quot;commandlinefu.com&amp;quot; align=&amp;quot;bottom&amp;quot; /&amp;gt;&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Verify all the paths in the PATH directory</title>
      <link>/2010/06/08/verify-paths-path-directory/</link>
      <pubDate>Tue, 08 Jun 2010 09:13:35 +0000</pubDate>
      
      <guid>/2010/06/08/verify-paths-path-directory/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Here is the command to test that all the directories in your path actually exist.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;(&amp;lt;a class=&amp;quot;zem_slink freebase/en/internal_field_separator&amp;quot; title=&amp;quot;Internal field separator&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Internal_field_separator&amp;quot;&amp;gt;IFS&lt;/a&gt;=:;for p in $PATH; do test -d $p || echo $p; done)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And the explanation :&lt;/p&gt;
&lt;p&gt;Set the IFS to &amp;amp;#8221;:&amp;amp;#8221;&lt;/p&gt;
&lt;p&gt;now we loop through the PATH variable&lt;/p&gt;
&lt;p&gt;and test all the directories with &amp;amp;#8221;test -d&amp;amp;#8221;&lt;/p&gt;
&lt;p&gt;Here is another version without IFS:&lt;/p&gt;
&lt;!--loginview start--&gt;
&lt;blockquote&gt;
&lt;p&gt;for i in ${PATH//:/ };do test  -d $i || echo $i;done&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>PuTTY alternatives - AlternativeTo.net</title>
      <link>/2010/06/04/putty-alternatives-alternativeto-net/</link>
      <pubDate>Fri, 04 Jun 2010 02:06:45 +0000</pubDate>
      
      <guid>/2010/06/04/putty-alternatives-alternativeto-net/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Sometimes after hours of searching you find a link so good that it needs no introductions and neither any writeup. I found one such page today :&lt;/p&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://alternativeto.net/desktop/putty/&amp;quot;&amp;gt;http://alternativeto.net/desktop/putty/&lt;/a&gt;&amp;lt;h6 class=&amp;quot;zemanta-related-title&amp;quot;&amp;gt;Related articles by Zemanta&lt;/h6&gt; &amp;lt;ul class=&amp;quot;zemanta-article-ul&amp;quot;&amp;gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://www.downloadsquad.com/2010/05/18/kitty-is-win32-native-putty/&amp;quot;&amp;gt;KiTTY is Win32-native PuTTY&lt;/a&gt; (downloadsquad.com)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://blog.amit-agarwal.co.in/2010/04/11/putty-export-client-display-on-login-for-opening-x-application-and-terminal/&amp;quot;&amp;gt;PuTTY export client display on login for opening X application and terminal.&lt;/a&gt; (amit-agarwal.co.in)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://colonelqubit.wordpress.com/2010/05/05/time-to-empty-my-pockets-for-foss-projects/&amp;quot;&amp;gt;Time to empty my pockets for FOSS projects&lt;/a&gt; (colonelqubit.wordpress.com)&lt;/li&gt; &lt;/ul&gt; &amp;lt;div class=&amp;quot;zemanta-pixie&amp;quot;&amp;gt;&amp;lt;a class=&amp;quot;zemanta-pixie-a&amp;quot; title=&amp;quot;Reblog this post [with Zemanta]&amp;quot; href=&amp;quot;http://reblog.zemanta.com/zemified/a0e0301f-eb88-41fd-afbb-ab5bea19c81b/&amp;quot;&amp;gt;&amp;lt;img class=&amp;quot;zemanta-pixie-img&amp;quot; src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_b96.png&amp;quot; alt=&amp;quot;Reblog this post [with Zemanta]&amp;quot; /&amp;gt;&lt;/a&gt;&amp;lt;span class=&amp;quot;zem-script more-related more-info pretty-attribution paragraph-reblog&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>vim – get the list of all the scripts available.</title>
      <link>/2010/05/28/vim-get-the-list-of-all-the-scripts-available/</link>
      <pubDate>Thu, 27 May 2010 20:26:35 +0000</pubDate>
      
      <guid>/2010/05/28/vim-get-the-list-of-all-the-scripts-available/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;To get a list of all the scripts in the vim.sf.net project, you can run the following command. This will list all the scripts with the script id.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;wget -O – &amp;amp;#8217;http://www.vim.org/scripts/script_search_results.php?&amp;amp;show_me=4000&amp;amp;result_ptr=0&amp;amp;#8217; -o /dev/null | &amp;lt;a class=&amp;quot;zem_slink freebase/en/grep&amp;quot; title=&amp;quot;Grep&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Grep&amp;quot;&amp;gt;grep&lt;/a&gt; width| grep script_id= |&amp;lt;a class=&amp;quot;zem_slink freebase/en/sed&amp;quot; title=&amp;quot;Sed&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Sed&amp;quot;&amp;gt;sed&lt;/a&gt; &amp;amp;#8217;s/.*script_id=//&amp;amp;#8217;|tr -d &amp;amp;#8221;&amp;amp;#8221;&amp;amp;#8221;|tr &amp;amp;#8221;&amp;gt;&amp;amp;#8221; &amp;amp;#8221; &amp;amp;#8221;|sed &amp;amp;#8217;s/&amp;lt; .*//&amp;amp;#8217; | tr -d &amp;amp;#8217;\001&amp;amp;#8217;-&amp;amp;#8217;\011&amp;amp;#8217;&amp;amp;#8217;\013&amp;amp;#8217;&amp;amp;#8217;\014&amp;amp;#8217;&amp;amp;#8217;\016&amp;amp;#8217;-&amp;amp;#8217;\037&amp;amp;#8217;&amp;amp;#8217;\200&amp;amp;#8217;-&amp;amp;#8217;\377&amp;amp;#8217; |sort -n&amp;lt;h6 class=&amp;quot;zemanta-related-title&amp;quot;&amp;gt;Related articles by Zemanta&lt;/h6&gt; &amp;lt;ul class=&amp;quot;zemanta-article-ul&amp;quot;&amp;gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://www.slumpedoverkeyboarddead.com/2009/09/17/use-curl-to-monitor-your-vonage-phone-bill/&amp;quot;&amp;gt;Use curl to Monitor Your Vonage Phone Bill&lt;/a&gt; (slumpedoverkeyboarddead.com)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://securewebs.com/yum-updates/&amp;quot;&amp;gt;Yum Updates&lt;/a&gt; (securewebs.com)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://www.gubatron.com/blog/2009/10/10/ubuntudebian-quick-reference-how-to-change-your-servers-utc-timezone-on-the-command-line/&amp;quot;&amp;gt;Ubuntu/Debian Quick Reference: How To Change Your Server&amp;amp;#8217;s UTC Timezone on the command line&lt;/a&gt; (gubatron.com)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://blog.amit-agarwal.co.in/2009/11/22/short-information-about-loaded-kernel-modules/&amp;quot;&amp;gt;Short Information about loaded kernel modules&lt;/a&gt; (amit-agarwal.co.in)&lt;/li&gt; &lt;/ul&gt; &amp;lt;div class=&amp;quot;zemanta-pixie&amp;quot;&amp;gt;&amp;lt;a class=&amp;quot;zemanta-pixie-a&amp;quot; title=&amp;quot;Reblog this post [with Zemanta]&amp;quot; href=&amp;quot;http://reblog.zemanta.com/zemified/b22b2e85-8107-4f9b-9130-85a8e8ae370b/&amp;quot;&amp;gt;&amp;lt;img class=&amp;quot;zemanta-pixie-img&amp;quot; src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_b52.png&amp;quot; alt=&amp;quot;Reblog this post [with Zemanta]&amp;quot; /&amp;gt;&lt;/a&gt;&amp;lt;span class=&amp;quot;zem-script more-related more-info pretty-attribution paragraph-reblog&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Checking the links to your site (from affiliates) using cron and bash script.</title>
      <link>/2010/05/28/checking-links-site-affiliates-cron-bash-script/</link>
      <pubDate>Thu, 27 May 2010 20:26:33 +0000</pubDate>
      
      <guid>/2010/05/28/checking-links-site-affiliates-cron-bash-script/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;If you have some affiliate links and are concerned about their presence then you can setup &amp;lt;a class=&amp;quot;zem_slink freebase/guid/9202a8c04000641f80000000045c9c5b&amp;quot; title=&amp;quot;Cron&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Cron&amp;quot;&amp;gt;cron&lt;/a&gt; to check the links for you regularly. For this you need a very simple script (as below) and a cron entry (example further down).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;#!/bin/bash –&lt;br&gt;
#===============================================================================&lt;/p&gt;
&lt;h1 id=&#34;heading&#34;&gt;&lt;/h1&gt;
&lt;p&gt;#          FILE:  checklinks.sh&lt;/p&gt;
&lt;h1 id=&#34;heading-1&#34;&gt;&lt;/h1&gt;
&lt;p&gt;#         USAGE:  ./checklinks.sh&lt;/p&gt;
&lt;h1 id=&#34;heading-2&#34;&gt;&lt;/h1&gt;
&lt;p&gt;#   DESCRIPTION:  Check if the links exists on affiliate sites&lt;/p&gt;
&lt;h1 id=&#34;heading-3&#34;&gt;&lt;/h1&gt;
&lt;p&gt;#       OPTIONS:  —&lt;br&gt;
#  REQUIREMENTS:  —&lt;br&gt;
#          BUGS:  —&lt;br&gt;
#         NOTES:  —&lt;br&gt;
#        AUTHOR:  &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Amit Agarwal&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://amit-agarwal.co.in&amp;quot;&amp;gt;Amit Agarwal&lt;/a&gt; (AKA), &lt;a href=&#34;mailto:amit.agarwal@amit-agarwal.co.in&#34;&gt;amit.agarwal@amit-agarwal.co.in&lt;/a&gt;&lt;br&gt;
#       COMPANY:  Individual&lt;br&gt;
#       VERSION:  1.0&lt;br&gt;
#       CREATED:  04/07/2010 08:19:29 AM IST&lt;br&gt;
#      REVISION:  —&lt;br&gt;
#===============================================================================&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>vim - get mappings from the help tex files available with the scripts.</title>
      <link>/2010/05/27/vim-mappings-tex-files-scripts/</link>
      <pubDate>Thu, 27 May 2010 11:44:39 +0000</pubDate>
      
      <guid>/2010/05/27/vim-mappings-tex-files-scripts/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Here is a simple script that will show all the vim mappings from the tex file (help file that comes with the vim scripts).&lt;/p&gt;
&lt;p&gt;This will prove to be very useful in usin gthe mappings 🙂&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;#!/bin/bash –&lt;br&gt;
#===============================================================================&lt;/p&gt;
&lt;h1 id=&#34;heading&#34;&gt;&lt;/h1&gt;
&lt;p&gt;#          FILE:  get_mappings_from_tex_for_vim.sh&lt;/p&gt;
&lt;h1 id=&#34;heading-1&#34;&gt;&lt;/h1&gt;
&lt;p&gt;#         USAGE:  ./get_mappings_from_tex_for_vim.sh&lt;/p&gt;
&lt;h1 id=&#34;heading-2&#34;&gt;&lt;/h1&gt;
&lt;p&gt;#   DESCRIPTION:  Get the mappings from tex file&lt;/p&gt;
&lt;h1 id=&#34;heading-3&#34;&gt;&lt;/h1&gt;
&lt;p&gt;#       OPTIONS:  —&lt;br&gt;
#  REQUIREMENTS:  —&lt;br&gt;
#          BUGS:  —&lt;br&gt;
#         NOTES:  —&lt;br&gt;
#        AUTHOR:  &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Amit Agarwal&amp;quot; rel=&amp;quot;self&amp;quot; href=&amp;quot;http://blog.amit-agarwal.co.in&amp;quot;&amp;gt;Amit Agarwal&lt;/a&gt; (AKA), &lt;a href=&#34;mailto:amit.agarwal@amit-agarwal.co.in&#34;&gt;amit.agarwal@amit-agarwal.co.in&lt;/a&gt;&lt;br&gt;
#       COMPANY:  Individual&lt;br&gt;
#       VERSION:  1.0&lt;br&gt;
#       CREATED:  09/06/2009 09:19:19 PM IST&lt;br&gt;
#      REVISION:  —&lt;br&gt;
#===============================================================================&lt;br&gt;
file=$1&lt;br&gt;
IFS=$(echo -e &amp;amp;#8217;\n&amp;amp;#8217;)&lt;br&gt;
for i in $(cat $file |&amp;lt;a class=&amp;quot;zem_slink freebase/en/grep&amp;quot; title=&amp;quot;Grep&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Grep&amp;quot;&amp;gt;grep&lt;/a&gt; &amp;amp;#8221;^..line&amp;amp;#8221;)&lt;br&gt;
do&lt;br&gt;
#echo $i |&amp;lt;a class=&amp;quot;zem_slink freebase/en/awk&amp;quot; title=&amp;quot;AWK&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://cm.bell-labs.com/cm/cs/awkbook/index.html&amp;quot;&amp;gt;awk&lt;/a&gt; -F&amp;amp;#8221;&amp;amp;#8217;&amp;amp;#8221; &#39;{print $2&amp;amp;#8221; &amp;amp;#8221; $3&amp;amp;#8221; &amp;amp;#8221;$4}&amp;amp;#8217;|awk -F&amp;amp;#8221;&amp;amp;&amp;amp;#8221; &#39;{print $1&amp;amp;#8221; &amp;amp;#8221;$2}&amp;amp;#8217;&lt;br&gt;
echo $i |awk -F&amp;amp;#8221;&amp;amp;#8217;&amp;amp;#8221; &#39;{&lt;br&gt;
if ( NF &amp;gt;= 4 )&lt;br&gt;
{&lt;br&gt;
print ($2&amp;amp;#8221;\t -&amp;gt;&amp;amp;#8221;$4&amp;amp;#8221;\t==&amp;raquo;&amp;amp;#8221;$NF);&lt;br&gt;
}&lt;br&gt;
else&lt;br&gt;
{&lt;br&gt;
print($2&amp;amp;#8221;\t–&amp;gt;&amp;amp;#8221;$3);&lt;br&gt;
}&lt;br&gt;
fi&lt;br&gt;
}&amp;amp;#8217;  |&amp;lt;a class=&amp;quot;zem_slink freebase/en/sed&amp;quot; title=&amp;quot;Sed&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Sed&amp;quot;&amp;gt;sed&lt;/a&gt; &amp;amp;#8217;s/\h.*(/(/&amp;amp;#8217; |sed &amp;amp;#8217;s/&amp;gt;.*&amp;amp;/&amp;gt;/&amp;amp;#8217; |sed &amp;amp;#8217;s/\t*-.&amp;gt;$//&amp;amp;#8217; |sed &amp;amp;#8217;s/\//&amp;amp;#8217;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Inotify Example - Introduction to Inotify with a C Program Example</title>
      <link>/2010/05/24/inotify/</link>
      <pubDate>Mon, 24 May 2010 16:25:39 +0000</pubDate>
      
      <guid>/2010/05/24/inotify/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://www.thegeekstuff.com/2010/04/inotify-c-program-example/&amp;quot;&amp;gt;Inotify Example: Introduction to Inotify with a C Program Example&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&amp;lt;a class=&amp;quot;zem_slink freebase/en/inotify&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Inotify&amp;quot; title=&amp;quot;Inotify&amp;quot; rel=&amp;quot;wikipedia&amp;quot;&amp;gt;inotify&lt;/a&gt; utility is an effective tool to monitor and notify &amp;lt;a class=&amp;quot;zem_slink freebase/en/file_system&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/File_system&amp;quot; title=&amp;quot;File system&amp;quot; rel=&amp;quot;wikipedia&amp;quot;&amp;gt;filesystem&lt;/a&gt; changes. You can specify a list of files and directories that needs to be monitored by inotify. This &amp;lt;a class=&amp;quot;zem_slink freebase/guid/9202a8c04000641f8000000000023d0f&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Library&amp;quot; title=&amp;quot;Library&amp;quot; rel=&amp;quot;wikipedia&amp;quot;&amp;gt;library&lt;/a&gt; is used by various other programs. For example, &amp;lt;a class=&amp;quot;zem_slink freebase/en/cpan&amp;quot; href=&amp;quot;http://www.cpan.org/&amp;quot; title=&amp;quot;CPAN&amp;quot; rel=&amp;quot;homepage&amp;quot;&amp;gt;CPAN&lt;/a&gt; module Linux::Inotify is developed based on this library.&lt;br&gt;
iNotify Execution Flow&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>LPI Certification help and tutorials</title>
      <link>/2010/05/20/lpi-certification-help-and-tutorials/</link>
      <pubDate>Thu, 20 May 2010 16:43:32 +0000</pubDate>
      
      <guid>/2010/05/20/lpi-certification-help-and-tutorials/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;For the last couple of days I have been very busy but not too away from my desktop. Though I did not get time to publish anything. Here&amp;amp;#8217;s one of my other favourite distributions. Its known as elpicx. This distribution is oriented towards LPI certification exams and contains some documents and links that are quite helpful.&lt;/p&gt;
&lt;p&gt;Good thing is now it supports F9 with KDE.&lt;/p&gt;
&lt;p&gt;I found that the documents in the distro are GPL and thus I dont think that there should be any issue in re-distributing the pdfs and the links, so &amp;lt;a href=&amp;quot;http://amit.with-linux.com/elpicx/&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;here&lt;/a&gt; it is. If you find anything in these docs or links that I should not link or upload them, let me know. I wil remove them.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Startup animation and theme for Fedora 12 onwards.</title>
      <link>/2010/05/20/startup-animation-theme-fedora-12-onwards/</link>
      <pubDate>Thu, 20 May 2010 16:43:31 +0000</pubDate>
      
      <guid>/2010/05/20/startup-animation-theme-fedora-12-onwards/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Since the release of &amp;lt;a class=&amp;quot;zem_slink freebase/en/fedora&amp;quot; title=&amp;quot;Fedora&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://fedoraproject.org/&amp;quot;&amp;gt;Fedora&lt;/a&gt; 12, fedora is using plymouth. Plymouth kicks in just after grub and before the Xserver starts.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Description:&lt;/p&gt;
&lt;p&gt;Plymouth provides an attractive graphical &amp;lt;a class=&amp;quot;zem_slink freebase/en/bootsplash&amp;quot; title=&amp;quot;Bootsplash&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Bootsplash&amp;quot;&amp;gt;boot animation&lt;/a&gt; in&lt;br&gt;
place of the &amp;lt;a class=&amp;quot;zem_slink freebase/en/text_messaging&amp;quot; title=&amp;quot;Text messaging&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Text_messaging&amp;quot;&amp;gt;text messages&lt;/a&gt; that normally get shown.  Text&lt;br&gt;
messages are instead redirected to a &amp;lt;a class=&amp;quot;zem_slink freebase/en/data_logger&amp;quot; title=&amp;quot;Data logger&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Data_logger&amp;quot;&amp;gt;log file&lt;/a&gt; for viewing&lt;br&gt;
after boot.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>vim – get names of the scripts and the details from the command line</title>
      <link>/2010/05/19/vim-get-names-of-the-scripts-and-the-details-from-the-command-line/</link>
      <pubDate>Wed, 19 May 2010 16:38:42 +0000</pubDate>
      
      <guid>/2010/05/19/vim-get-names-of-the-scripts-and-the-details-from-the-command-line/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;For the below commands either you can set the two variables in bold and then run the scripts or change the following in the commands and run the scripts.&lt;/p&gt;
&lt;p&gt;If you have html2text installed then you can use this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;wget -o /dev/null -O &lt;strong&gt;$script_id_file&lt;/strong&gt; &amp;amp;#8217;http://www.vim.org/scripts/script.php?script_id=&amp;amp;#8217;&lt;strong&gt;$script_id&lt;/strong&gt; |html2text&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you dont have html2text installed then you can use:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;wget -o /dev/null -O &lt;strong&gt;$script_id_file&lt;/strong&gt; &amp;amp;#8217;http://www.vim.org/scripts/script.php?script_id=&amp;amp;#8217;&lt;strong&gt;$script_id&lt;/strong&gt;&amp;lt;h6 class=&amp;quot;zemanta-related-title&amp;quot;&amp;gt;Related articles by Zemanta&lt;/h6&gt; &amp;lt;ul class=&amp;quot;zemanta-article-ul&amp;quot;&amp;gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://www.inquisitr.com/55496/twilight-eclipse-script-allegedly-leaked/&amp;quot;&amp;gt;Twilight Eclipse Script Allegedly Leaked&lt;/a&gt; (inquisitr.com)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://huddledmasses.org/powershell-script-club-in-rochester-on-wednesday/&amp;quot;&amp;gt;PowerShell Script Club in Rochester on Wednesday&lt;/a&gt; (huddledmasses.org)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://blogs.adobe.com/acrolaw/2010/02/add_a_flatten_document_menu_item.html&amp;quot;&amp;gt;Add a Flatten Document Menu Item to Acrobat&lt;/a&gt; (blogs.adobe.com)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://codebetter.com/blogs/james.kovacs/archive/2010/02/25/the-exec-problem.aspx&amp;quot;&amp;gt;The Exec Problem&lt;/a&gt; (codebetter.com)&lt;/li&gt; &lt;/ul&gt; &amp;lt;div class=&amp;quot;zemanta-pixie&amp;quot; style=&amp;quot;margin-top: 10px; height: 15px;&amp;quot;&amp;gt;&amp;lt;a class=&amp;quot;zemanta-pixie-a&amp;quot; title=&amp;quot;Reblog this post [with Zemanta]&amp;quot; href=&amp;quot;http://reblog.zemanta.com/zemified/d25e9b6c-aca3-4008-9a3c-3403140d32e0/&amp;quot;&amp;gt;&amp;lt;img class=&amp;quot;zemanta-pixie-img&amp;quot; style=&amp;quot;border: medium none; float: right;&amp;quot; src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_e38.png&amp;quot; alt=&amp;quot;Reblog this post [with Zemanta]&amp;quot; /&amp;gt;&lt;/a&gt;&amp;lt;span class=&amp;quot;zem-script more-related pretty-attribution&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Downloading all related videos from youtube with youtube-dl</title>
      <link>/2010/05/16/downloading-related-videos-youtube-youtubedl/</link>
      <pubDate>Sun, 16 May 2010 15:53:16 +0000</pubDate>
      
      <guid>/2010/05/16/downloading-related-videos-youtube-youtubedl/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;How many time did you want to see all the videos (related) to the one you were watching on youtube but decided otherwise as the downloaded was not fast enough. Or has it happened to you that you wanted to &amp;lt;a class=&amp;quot;zem_slink freebase/en/uploading_and_downloading&amp;quot; title=&amp;quot;Uploading and downloading&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Uploading_and_downloading&amp;quot;&amp;gt;download&lt;/a&gt; all the related videos, in either case you can use the youtube-dl utility I blogged about some times back. First you need to get all the &amp;lt;a class=&amp;quot;zem_slink freebase/en/uniform_resource_locator&amp;quot; title=&amp;quot;Uniform Resource Locator&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Uniform_Resource_Locator&amp;quot;&amp;gt;URL&lt;/a&gt;&amp;amp;#8217;s in a &amp;lt;a class=&amp;quot;zem_slink freebase/en/text_file&amp;quot; title=&amp;quot;Text file&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Text_file&amp;quot;&amp;gt;text file&lt;/a&gt;, and the simplest way to do this is :&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>top - looks better and is more useful with a rc file...</title>
      <link>/2010/05/07/top-rc-file/</link>
      <pubDate>Fri, 07 May 2010 03:27:39 +0000</pubDate>
      
      <guid>/2010/05/07/top-rc-file/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;top is a very useful command to find out who is eating up the &amp;lt;a class=&amp;quot;zem_slink freebase/en/central_processing_unit&amp;quot; title=&amp;quot;Central processing unit&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Central_processing_unit&amp;quot;&amp;gt;CPU&lt;/a&gt; or the memory. But sometimes the plain and simple look simply would be boring so how about some fun. Copy the below code to file : ~/.toprc&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;RCfile for &amp;amp;#8221;top&amp;amp;#8221;&lt;br&gt;
Id:a, Mode_altscr=1, Mode_irixps=0, Delay_time=5.000, Curwin=0&lt;br&gt;
Def    fieldscur=mfcAbdEgHIursOpQTvyzWjKNLX&lt;br&gt;
winflags=32184, sortindx=10, maxtasks=0&lt;br&gt;
summclr=4, msgsclr=5, headclr=5, taskclr=4&lt;br&gt;
Job    fieldscur=ABcefgjlrstuvyzMKNHIWOPQDX&lt;br&gt;
winflags=62777, sortindx=0, maxtasks=0&lt;br&gt;
summclr=6, msgsclr=6, headclr=7, taskclr=6&lt;br&gt;
Mem    fieldscur=ANOPQRSTUVbcdefgjlmyzWHIKX&lt;br&gt;
winflags=62777, sortindx=13, maxtasks=0&lt;br&gt;
summclr=5, msgsclr=5, headclr=4, taskclr=5&lt;br&gt;
Usr    fieldscur=ABDECGfhijlopqrstuvyzMKNWX&lt;br&gt;
winflags=62777, sortindx=4, maxtasks=0&lt;br&gt;
summclr=3, msgsclr=3, headclr=2, taskclr=3&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Solved -- Errors with afraid-dyndns in Goddard (Fedora 13)</title>
      <link>/2010/05/06/solved-errors-afraiddyndns-goddard-fedora-13/</link>
      <pubDate>Thu, 06 May 2010 13:31:17 +0000</pubDate>
      
      <guid>/2010/05/06/solved-errors-afraiddyndns-goddard-fedora-13/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Since I updated to the &amp;lt;a class=&amp;quot;zem_slink freebase/en/fedora&amp;quot; title=&amp;quot;Fedora&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://fedoraproject.org/&amp;quot;&amp;gt;Fedora&lt;/a&gt; 13, I was getting error from the &amp;lt;a class=&amp;quot;zem_slink freebase/en/dynamic_dns&amp;quot; title=&amp;quot;Dynamic DNS&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Dynamic_DNS&amp;quot;&amp;gt;Dynamic DNS&lt;/a&gt; client for afraid. I was not getting enough time to fix this, so finally I decided to fix this in the night itself 🙂&lt;/p&gt;
&lt;p&gt;Problem:&lt;br&gt;
On running&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;afraid-dyndns&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I was getting the error:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Entity: line 100: &amp;lt;a class=&amp;quot;zem_slink freebase/en/parsing&amp;quot; title=&amp;quot;Parsing&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Parsing&amp;quot;&amp;gt;parser&lt;/a&gt; error : Opening and ending tag mismatch: br line 99 and div&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Lock the hardware eject button of the cdrom</title>
      <link>/2010/04/29/lock-hardware-eject-button-cdrom/</link>
      <pubDate>Thu, 29 Apr 2010 14:46:29 +0000</pubDate>
      
      <guid>/2010/04/29/lock-hardware-eject-button-cdrom/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;&lt;tt&gt;$ eject -i 1&lt;/tt&gt; This command will lock the hardware eject button of your cdrom drive. Some uses are:&lt;/p&gt;
&lt;p&gt;1: If you have a toddler and has discovered the cdrom button&lt;/p&gt;
&lt;p&gt;2: If you are carrying a laptop in a bag or case and don&amp;amp;#8217;t want it to eject if the button is inadvertently pressed.&lt;/p&gt;
&lt;p&gt;To unlock the button use:&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;eject -i 0&lt;/tt&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;lt;a href=&amp;quot;http://www.commandlinefu.com/commands/view/5390/lock-the-hardware-eject-button-of-the-cdrom&amp;quot;&amp;gt;View this command to comment, vote or add to favourites&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&amp;lt;a href=&amp;quot;http://feeds2.feedburner.com/commands/by/mdelatorre&amp;quot;&amp;gt;View all commands by &lt;/a&gt;&lt;strong&gt;&amp;lt;a href=&amp;quot;http://feeds2.feedburner.com/commands/by/mdelatorre&amp;quot;&amp;gt;mdelatorre&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://www.commandlinefu.com&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/header-logo.jpg&amp;quot; alt=&amp;quot;&amp;quot; align=&amp;quot;bottom&amp;quot; /&amp;gt;&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>String and Array Creation</title>
      <link>/2010/04/28/string-and-array-creation/</link>
      <pubDate>Wed, 28 Apr 2010 14:23:03 +0000</pubDate>
      
      <guid>/2010/04/28/string-and-array-creation/</guid>
      <description>&lt;div class=\&#34;zemanta-img\&#34;&gt; 
&lt;div&gt;
  &lt;dl class=\&#34;wp-caption alignright\&#34;&gt; &lt;dt class=\&#34;wp-caption-dt\&#34;&gt;&lt;a href=\&#34;http://en.wikipedia.org/wiki/Image:Programming-republic-of-perl.png\&#34;&gt;&lt;img title=\&#34;Perl\&#34; src=\&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Programming-republic-of-perl.png\&#34; alt=\&#34;Perl\&#34; /&gt;&lt;/a&gt;&lt;/dt&gt; &lt;dd class=\&#34;wp-caption-dd zemanta-img-attribution\&#34;&gt;Image via &lt;a href=\&#34;http://en.wikipedia.org/wiki/Image:Programming-republic-of-perl.png\&#34;&gt;Wikipedia&lt;/a&gt;&lt;/dd&gt; &lt;/dl&gt;
&lt;/div&gt;&lt;/div&gt; 
&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;&amp;lt;img src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/perl-one-liners.jpg&amp;quot; alt=&amp;quot;Perl One Liners&amp;quot; align=&amp;quot;bottom&amp;quot; /&amp;gt;This is the fourth part of a nine-part article on &lt;strong&gt;famous &amp;lt;a class=&amp;quot;zem_slink freebase/en/perl&amp;quot; title=&amp;quot;Perl&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://www.perl.org/&amp;quot;&amp;gt;Perl&lt;/a&gt; one-liners&lt;/strong&gt;. In this part I will create various one-liners for &lt;strong&gt;string and array creation&lt;/strong&gt;. See &amp;lt;a href=&amp;quot;http://www.catonmat.net/blog/perl-one-liners-explained-part-one/&amp;quot;&amp;gt;part one&lt;/a&gt; for introduction of the series.&lt;/p&gt;
&lt;p&gt;Famous Perl one-liners is my attempt to create “&lt;strong&gt;perl1line.txt&lt;/strong&gt;” that is similar to “&amp;lt;a href=&amp;quot;http://www.catonmat.net/blog/awk-one-liners-explained-part-one/&amp;quot;&amp;gt;awk1line.txt&lt;/a&gt;” and “&amp;lt;a href=&amp;quot;http://www.catonmat.net/blog/sed-one-liners-explained-part-one/&amp;quot;&amp;gt;sed1line.txt&lt;/a&gt;” that have been so popular among Awk and Sed programmers.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>How To Modify Your Wordpress Theme Via The Browser Using Stiqr</title>
      <link>/2010/04/27/modify-wordpress-theme-browser-stiqr/</link>
      <pubDate>Tue, 27 Apr 2010 16:07:43 +0000</pubDate>
      
      <guid>/2010/04/27/modify-wordpress-theme-browser-stiqr/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://feedads.g.doubleclick.net/%7Ea/O7jc_lFA7WTnPLGHjbYaxjhpRBM/0/da&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/%7Ea/O7jc_lFA7WTnPLGHjbYaxjhpRBM/0/di&amp;quot; alt=&amp;quot;&amp;quot; align=&amp;quot;bottom&amp;quot; /&amp;gt;&lt;/a&gt;&lt;br&gt;
&amp;lt;a href=&amp;quot;http://feedads.g.doubleclick.net/%7Ea/O7jc_lFA7WTnPLGHjbYaxjhpRBM/1/da&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/%7Ea/O7jc_lFA7WTnPLGHjbYaxjhpRBM/1/di&amp;quot; alt=&amp;quot;&amp;quot; align=&amp;quot;bottom&amp;quot; /&amp;gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;img src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/00_Stiqr_logo.jpg&amp;quot; alt=&amp;quot;00_Stiqr_logo.jpg&amp;quot; width=&amp;quot;253&amp;quot; height=&amp;quot;114&amp;quot; align=&amp;quot;bottom&amp;quot; /&amp;gt;Ordinary &amp;lt;a href=&amp;quot;http://www.makeuseof.com/tag/how-to-build-a-self-hosted-wordpress-blog-for-free/&amp;quot;&amp;gt;self-hosted WordPress&lt;/a&gt; users know only too well that even though choosing and using thousands of available themes is a snap, creating one is an almost impossible task. You could use &amp;lt;a href=&amp;quot;http://www.makeuseof.com/tag/customize-design-wordpress-theme-easily-constructor/&amp;quot;&amp;gt;one of the customizable themes&lt;/a&gt; to modify the look to your liking, but that’s as far as you can go. Theme creating is not for the faint-hearted who are afraid to plunge into &amp;lt;a class=&amp;quot;zem_slink freebase/en/html&amp;quot; title=&amp;quot;HTML&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/HTML&amp;quot;&amp;gt;HTML&lt;/a&gt;, &amp;lt;a class=&amp;quot;zem_slink freebase/en/php&amp;quot; title=&amp;quot;PHP&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://www.php.net/&amp;quot;&amp;gt;PHP&lt;/a&gt; and &amp;lt;a class=&amp;quot;zem_slink freebase/en/cascading_style_sheets&amp;quot; title=&amp;quot;Cascading Style Sheets&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Cascading_Style_Sheets&amp;quot;&amp;gt;CSS&lt;/a&gt; coding.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Linux Shell Scripting Tutorial – A Beginner\’s handbook</title>
      <link>/2010/04/11/linux-shell-scripting-tutorial-a-beginners-handbook/</link>
      <pubDate>Sun, 11 Apr 2010 09:11:57 +0000</pubDate>
      
      <guid>/2010/04/11/linux-shell-scripting-tutorial-a-beginners-handbook/</guid>
      <description>&lt;div class=\&#34;zemanta-img\&#34;&gt; 
&lt;div&gt;
  &lt;dl class=\&#34;wp-caption alignright\&#34;&gt; &lt;dt class=\&#34;wp-caption-dt\&#34;&gt;&lt;a href=\&#34;http://commons.wikipedia.org/wiki/Image:Tux.png\&#34;&gt;&lt;img title=\&#34;Tux, the Linux mascot\&#34; src=\&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Tux.png\&#34; alt=\&#34;Tux, the Linux mascot\&#34; /&gt;&lt;/a&gt;&lt;/dt&gt; &lt;dd class=\&#34;wp-caption-dd zemanta-img-attribution\&#34;&gt;Image via &lt;a href=\&#34;http://commons.wikipedia.org/wiki/Image:Tux.png\&#34;&gt;Wikipedia&lt;/a&gt;&lt;/dd&gt; &lt;/dl&gt;
&lt;/div&gt;&lt;/div&gt; 
&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;&amp;lt;a class=&amp;quot;zem_slink freebase/en/unix_shell&amp;quot; title=&amp;quot;Unix shell&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Unix_shell&amp;quot;&amp;gt;Linux Shell&lt;/a&gt; Scripting Tutorial – A Beginner&amp;amp;#8217;s handbook —&lt;/p&gt;
&lt;p&gt;This book is for students and Linux System Administrators. It provides the skills to read, write, and debug &amp;lt;a title=&amp;quot;Linux&amp;quot; href=&amp;quot;http://bash.cyberciti.biz/guide/Linux&amp;quot;&amp;gt;Linux&lt;/a&gt; &amp;lt;a class=&amp;quot;zem_slink freebase/en/shell_script&amp;quot; title=&amp;quot;Shell script&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Shell_script&amp;quot;&amp;gt;shell scripts&lt;/a&gt; using &amp;lt;a title=&amp;quot;Bash&amp;quot; href=&amp;quot;http://bash.cyberciti.biz/guide/Bash&amp;quot;&amp;gt;bash&lt;/a&gt; &amp;lt;a title=&amp;quot;Shell&amp;quot; href=&amp;quot;http://bash.cyberciti.biz/guide/Shell&amp;quot;&amp;gt;shell&lt;/a&gt;. The book begins by describing &amp;lt;a title=&amp;quot;Linux&amp;quot; href=&amp;quot;http://bash.cyberciti.biz/guide/Linux&amp;quot;&amp;gt;Linux&lt;/a&gt; and simple scripts to automate frequently executed commands and continues by describing conditional logic, &amp;lt;a class=&amp;quot;zem_slink freebase/en/interactivity&amp;quot; title=&amp;quot;Interactivity&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Interactivity&amp;quot;&amp;gt;user interaction&lt;/a&gt;, loops, menus, traps, and functions. Finally, book covers various sys admin related scripts such as making a backup, using &amp;lt;a class=&amp;quot;zem_slink freebase/guid/9202a8c04000641f80000000045c9c5b&amp;quot; title=&amp;quot;Cron&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Cron&amp;quot;&amp;gt;cron&lt;/a&gt; jobs, writing interactive tools, web based tools, remote login, ftp and database backup related scripts. This book is intended for Linux &amp;lt;a class=&amp;quot;zem_slink freebase/en/system_administrator&amp;quot; title=&amp;quot;System administrator&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/System_administrator&amp;quot;&amp;gt;system administrators&lt;/a&gt; or students who have mastered the basics of a Linux Operating System. You should be able to:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Script to get the number of events from the logs.</title>
      <link>/2010/04/11/script-to-get-the-number-of-events-from-the-logs/</link>
      <pubDate>Sun, 11 Apr 2010 09:11:49 +0000</pubDate>
      
      <guid>/2010/04/11/script-to-get-the-number-of-events-from-the-logs/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;&amp;lt;a id=&amp;quot;aptureLink_4P0PJ73NaG&amp;quot; style=&amp;quot;margin: 0pt auto; padding: 0px 6px; text-align: center; display: block;&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Log%20analysis&amp;quot;&amp;gt;&amp;lt;img style=&amp;quot;border: 0px none;&amp;quot; title=&amp;quot;Log analysis&amp;quot; src=&amp;quot;http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/ph/360x320_WikipediaArticle&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;360px&amp;quot; height=&amp;quot;320px&amp;quot; /&amp;gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I was trying to do some &amp;lt;a class=&amp;quot;zem_slink freebase/en/log_analysis&amp;quot; title=&amp;quot;Log analysis&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Log_analysis&amp;quot;&amp;gt;log analysis&lt;/a&gt; and finding the events in the logs. For this the logs had the Events logged as &amp;amp;#8221;|+Event name|&amp;amp;#8221; or with sending and receiving. So I wrote this little script to take care of my requirements.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>monkeystudio IDE on Fedora 12.. IDE of choice</title>
      <link>/2010/03/30/monkeystudio-ide-on-fedora-12-ide-of-choice/</link>
      <pubDate>Tue, 30 Mar 2010 12:05:30 +0000</pubDate>
      
      <guid>/2010/03/30/monkeystudio-ide-on-fedora-12-ide-of-choice/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://www.monkeystudio.org/&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;Monkey IDE&lt;/a&gt; is a Free &amp;lt;a class=&amp;quot;zem_slink freebase/en/cross-platform&amp;quot; title=&amp;quot;Cross-platform&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Cross-platform&amp;quot;&amp;gt;crossplatform&lt;/a&gt; &amp;lt;a class=&amp;quot;zem_slink freebase/en/qt&amp;quot; title=&amp;quot;Qt (framework)&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://qt.nokia.com/&amp;quot;&amp;gt;Qt&lt;/a&gt; 4 IDE&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;MonkeyStudio is a crossplatform &amp;lt;a class=&amp;quot;zem_slink freebase/en/integrated_development_environment&amp;quot; title=&amp;quot;Integrated development environment&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Integrated_development_environment&amp;quot;&amp;gt;Integrated Development Environment&lt;/a&gt; ( IDE ) aiming to become a &amp;lt;a class=&amp;quot;zem_slink freebase/en/rapid_application_development&amp;quot; title=&amp;quot;Rapid application development&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Rapid_application_development&amp;quot;&amp;gt;Rapid Application Development&lt;/a&gt; ( RAD ) environment. MonkeyStudio runs everywhere Qt 4.4.0 ( minimum required to build it ) is available as a &amp;lt;a class=&amp;quot;zem_slink freebase/en/library&amp;quot; title=&amp;quot;Library (computing)&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Library_%28computing%29&amp;quot;&amp;gt;shared library&lt;/a&gt;. It is extensible via a great and powerful &amp;lt;a class=&amp;quot;zem_slink freebase/en/plugin&amp;quot; title=&amp;quot;Plug-in (computing)&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Plug-in_%28computing%29&amp;quot;&amp;gt;plugin&lt;/a&gt; system which help make it do nearly anything you want and support virtually any kind of project type for which a plugin exists or is created. The primary goal of MonkeyStudio was to manage Qt4 projects as best as possible, it directly uses .pro files and does not create intrusive or unsightly &amp;lt;a class=&amp;quot;zem_slink freebase/en/configuration_file&amp;quot; title=&amp;quot;Configuration file&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Configuration_file&amp;quot;&amp;gt;configuration files&lt;/a&gt;. MonkyStudio is also a multi language &amp;lt;a class=&amp;quot;zem_slink freebase/en/source_code_editor&amp;quot; title=&amp;quot;Source code editor&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Source_code_editor&amp;quot;&amp;gt;code editor&lt;/a&gt; too ( javascript, xml, … ).&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Search &amp; replace with find &amp; ed</title>
      <link>/2010/03/28/search-replace-with-find-ed/</link>
      <pubDate>Sun, 28 Mar 2010 11:58:32 +0000</pubDate>
      
      <guid>/2010/03/28/search-replace-with-find-ed/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;&lt;div class=\&#34;zemanta-img\&#34;&gt; 
&lt;div&gt;
  &lt;dl class=\&#34;wp-caption alignright\&#34;&gt; &lt;dt class=\&#34;wp-caption-dt\&#34;&gt;&lt;a href=\&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/03/Image:DirectoryListing1.png\&#34;&gt;&lt;img src=\&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/300px-DirectoryListing1.png\&#34; alt=\&#34;Computer directory listing\&#34; title=\&#34;Computer directory listing\&#34; /&gt;&lt;/a&gt;&lt;/dt&gt; &lt;dd class=\&#34;wp-caption-dd zemanta-img-attribution\&#34;&gt;Image via &lt;a href=\&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/03/Image:DirectoryListing1.png\&#34;&gt;Wikipedia&lt;/a&gt;&lt;/dd&gt; &lt;/dl&gt;
&lt;/div&gt;&lt;/div&gt; 
&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;&lt;tt&gt;function sr() { &lt;/tt&gt;&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;declare pattern replacement name usage &lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;declare -i pvar=0 rvar=0 tvar=0 &lt;/tt&gt;&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;usage=&#39;usage: sr [-t ] [-n name] [-p pattern] [-r replacement] [&amp;ndash; ] [dir1 dir2 &amp;hellip;]&#39; &lt;/tt&gt;&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;# cf. &amp;lt;a href=&amp;quot;http://bsdpants.blogspot.com/2007/02/option-ize-your-shell-scripts.html&amp;quot;&amp;gt;http://bsdpants.blogspot.com/2007/02/option-ize-your-shell-scripts.html&lt;/a&gt; &lt;/tt&gt;&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;while [[ &amp;quot;${1:0:1}&amp;quot; == &#39;-&#39; ]] ; do &lt;/tt&gt;&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;[[ &amp;quot;${1}&amp;quot; == &#39;&amp;ndash;&#39; ]] &amp;amp;&amp;amp; { shift; break; } # &amp;ndash; marks end of options &lt;/tt&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>unbound variable – bash completion not working and having issues with other stuff like command not found.</title>
      <link>/2010/03/23/unbound-variable-bash-completion-not-working-and-having-issues-with-other-stuff-like-command-not-found/</link>
      <pubDate>Tue, 23 Mar 2010 03:29:09 +0000</pubDate>
      
      <guid>/2010/03/23/unbound-variable-bash-completion-not-working-and-having-issues-with-other-stuff-like-command-not-found/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;I generally use vi/vim for all my practical purposes of working with text files. And I have all the vi/vim plugins required to work with the files. This causes the following to be in the skeleton for all the bash scripts that I create:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;set -o nounset                              # Treat unset variables as an error&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;With this all the unbound variables as errors and was problem with all the shell scripts that was being sourced in the startup of bash. So all I had to do was remove this from all the startup scripts and then from the skeleton of the bash script in vim :).&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>swaks – Swiff army nife for SMTP</title>
      <link>/2010/03/09/swaks-swiff-army-nife-for-smtp/</link>
      <pubDate>Tue, 09 Mar 2010 03:52:02 +0000</pubDate>
      
      <guid>/2010/03/09/swaks-swiff-army-nife-for-smtp/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;If you are having issues with the &amp;lt;a class=&amp;quot;zem_slink freebase/en/simple_mail_transfer_protocol&amp;quot; title=&amp;quot;Simple Mail Transfer Protocol&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol&amp;quot;&amp;gt;SMTP&lt;/a&gt; Server, then sometimes you just wish you had a swiss army knife to test the same and then you would not have to spend your precious time on some silly mistake that you may have made. Your wish is now fulfilled.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;lt;a class=&amp;quot;zem_slink freebase/en/military_of_switzerland&amp;quot; title=&amp;quot;Military of Switzerland&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Military_of_Switzerland&amp;quot;&amp;gt;Swiss Army&lt;/a&gt; Knife SMTP: A &amp;lt;a class=&amp;quot;zem_slink freebase/en/command_line_interface&amp;quot; title=&amp;quot;Command-line interface&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Command-line_interface&amp;quot;&amp;gt;command line&lt;/a&gt; SMTP tester.  Swaks can test various aspects of your SMTP &amp;lt;a class=&amp;quot;zem_slink freebase/en/server&amp;quot; title=&amp;quot;Server (computing)&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Server_%28computing%29&amp;quot;&amp;gt;server&lt;/a&gt;, including &amp;lt;a class=&amp;quot;zem_slink freebase/en/transport_layer_security&amp;quot; title=&amp;quot;Transport Layer Security&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Transport_Layer_Security&amp;quot;&amp;gt;TLS&lt;/a&gt; and AUTH.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Openoffice.org and/or Excel useful tips.</title>
      <link>/2010/02/10/openoffice-org-andor-excel-useful-tips/</link>
      <pubDate>Wed, 10 Feb 2010 15:19:48 +0000</pubDate>
      
      <guid>/2010/02/10/openoffice-org-andor-excel-useful-tips/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Today I was working on Excel sheets and had to do quite a lot of manipulations. Here are some of those:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Find the value of the cell whose number is stored in another cell.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can use the indirect function.&lt;/p&gt;
&lt;p&gt;Here is example:&lt;/p&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/screenshot_0022.jpe&amp;quot;&amp;gt;&amp;lt;img class=&amp;quot;size-full wp-image-959&amp;quot; title=&amp;quot;indirect&amp;quot; src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/screenshot_0022.jpe&amp;quot; alt=&amp;quot;indirect&amp;quot; width=&amp;quot;354&amp;quot; height=&amp;quot;98&amp;quot; /&amp;gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That&amp;amp;#8217;s cool and easy.&lt;/p&gt;
&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;Indirect reference with some constant values.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can add constant and cell id with &amp;amp;#8221;&lt;strong&gt;&amp;amp;&lt;/strong&gt;&amp;amp;#8221;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>bash script with sql to get the number of records from multiple tables.</title>
      <link>/2010/02/10/bash-script-with-sql-to-get-the-number-of-records-from-multiple-tables/</link>
      <pubDate>Wed, 10 Feb 2010 15:19:40 +0000</pubDate>
      
      <guid>/2010/02/10/bash-script-with-sql-to-get-the-number-of-records-from-multiple-tables/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Here is the bash script:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;#!/bin/sh&lt;br&gt;
names[1]=errorlog&lt;br&gt;
names[2]=amit1log&lt;br&gt;
names[3]=amit2log&lt;br&gt;
names[4]=amit3log&lt;br&gt;
names[5]=amit4log&lt;br&gt;
j=1&lt;br&gt;
echo $1&lt;br&gt;
for i in $( sqlplus amit/passwd@tns @get_count.sql |sed  -n &amp;amp;#8217;/COUNT/,/Disconnected/p&amp;amp;#8217;|sed &amp;amp;#8217;/COUNT/ d&amp;amp;#8217;|sed &amp;amp;#8217;/—/ d&amp;amp;#8217;|sed &amp;amp;#8217;/Disconnected/ d&amp;amp;#8217;|tr &amp;amp;#8217;n&amp;amp;#8217; &amp;amp;#8217; &amp;amp;#8217;  )&lt;br&gt;
do&lt;br&gt;
temp=${names[$j]}&lt;br&gt;
let count=30-${#temp}&lt;br&gt;
for ((I=1; I &amp;lt;= $count ; I++))&lt;br&gt;
do&lt;br&gt;
printf &amp;amp;#8221; &amp;amp;#8221;&lt;br&gt;
done&lt;br&gt;
echo  &amp;amp;#8221;${names[$j]}    : $i&amp;amp;#8221;&lt;br&gt;
# echo $j&lt;br&gt;
let j=j+1&lt;br&gt;
done&lt;br&gt;
echo&lt;br&gt;
echo&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;and the required sql script:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;select count(&lt;em&gt;) from errorlog;&lt;br&gt;
select count(&lt;/em&gt;) from amit1log;&lt;br&gt;
select count(&lt;em&gt;) from amit2log;&lt;br&gt;
select count(&lt;/em&gt;) from amit3log;&lt;br&gt;
select count(*) from amit4log;&lt;br&gt;
quit;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Built-in lists in vim</title>
      <link>/2010/02/03/built-in-lists-in-vim/</link>
      <pubDate>Wed, 03 Feb 2010 16:49:32 +0000</pubDate>
      
      <guid>/2010/02/03/built-in-lists-in-vim/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;&amp;lt;a class=&amp;quot;zem_slink freebase/en/vimscript&amp;quot; title=&amp;quot;Vimscript&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Vimscript&amp;quot;&amp;gt;Vimscript&lt;/a&gt; provides excellent support for operating on collections of &amp;lt;a class=&amp;quot;zem_slink freebase/en/data&amp;quot; title=&amp;quot;Data&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Data&amp;quot;&amp;gt;data&lt;/a&gt;, a cornerstone of programming. In this third article in the series, learn how to use Vimscript&amp;amp;#8217;s built-in lists to ease everyday operations such as reformatting lists, filtering sequences of filenames, and sorting sets of line numbers. You&amp;amp;#8217;ll also walk through examples that demonstrate the power of lists to extend and enhance two common uses of &amp;lt;a class=&amp;quot;zem_slink freebase/en/vim&amp;quot; title=&amp;quot;Vim (text editor)&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://www.vim.org/&amp;quot;&amp;gt;Vim&lt;/a&gt;: creating a &amp;lt;a class=&amp;quot;zem_slink freebase/en/user_defined_function&amp;quot; title=&amp;quot;User-defined function&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/User-defined_function&amp;quot;&amp;gt;user-defined function&lt;/a&gt; to align assignment operators, and improving the built-in text completions mechanism.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Understand Awk Variables with 3 Practical Examples</title>
      <link>/2010/01/28/understand-awk-variables-with-3-practical-examples/</link>
      <pubDate>Thu, 28 Jan 2010 08:02:21 +0000</pubDate>
      
      <guid>/2010/01/28/understand-awk-variables-with-3-practical-examples/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;&amp;lt;a id=&amp;quot;aptureLink_gQhJKQ92Kn&amp;quot; style=&amp;quot;padding: 0px 6px; float: left;&amp;quot; href=&amp;quot;http://www.gnu.org/software/gawk/manual/gawk.html&amp;quot;&amp;gt;&amp;lt;img style=&amp;quot;border: 0px none;&amp;quot; title=&amp;quot;The GNU Awk User&#39;s Guide&amp;quot; src=&amp;quot;http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/ph/400x270_WebClip&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;400px&amp;quot; height=&amp;quot;270px&amp;quot; /&amp;gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;a id=&amp;quot;aptureLink_CLV4LbC1Dr&amp;quot; style=&amp;quot;padding: 0px 6px; float: right;&amp;quot; href=&amp;quot;http://gnuwin32.sourceforge.net/packages/mawk.htm&amp;quot;&amp;gt;&amp;lt;img style=&amp;quot;border: 0px none;&amp;quot; title=&amp;quot;Mawk for Windows&amp;quot; src=&amp;quot;http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/ph/400x270_WebClip&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;400px&amp;quot; height=&amp;quot;270px&amp;quot; /&amp;gt;&lt;/a&gt; This article is part of the on-going Awk Tutorial and Examples series. Like any other &amp;lt;a class=&amp;quot;zem_slink freebase/en/programming_language&amp;quot; title=&amp;quot;Programming language&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Programming_language&amp;quot;&amp;gt;programming languages&lt;/a&gt;, Awk also has user defined variables and built-in variables. In this article let us review how to define and use &amp;lt;a class=&amp;quot;zem_slink freebase/en/awk&amp;quot; title=&amp;quot;AWK&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://cm.bell-labs.com/cm/cs/awkbook/index.html&amp;quot;&amp;gt;awk&lt;/a&gt; variables. Awk variables should begin with the letter, followed by it can consist of alpha numeric characters or underscore. Keywords […]&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Seders\’s grab bag – Tutorials</title>
      <link>/2010/01/24/sederss-grab-bag-tutorials/</link>
      <pubDate>Sun, 24 Jan 2010 15:45:56 +0000</pubDate>
      
      <guid>/2010/01/24/sederss-grab-bag-tutorials/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://sed.sourceforge.net/grabbag/tutorials/&amp;quot;&amp;gt;http://sed.sourceforge.net/grabbag/tutorials/&lt;/a&gt;&lt;/p&gt;
&lt;h1 id=&#34;span-stylefont-size-x-largea-hrefhttpsedsourceforgenetgrabbagseder8217saa-hrefhttpsedsourceforgenetgrabbag-grab-bagaspan&#34;&gt;&lt;strong&gt;&amp;lt;span style=&amp;quot;font-size: x-large;&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://sed.sourceforge.net/grabbag/&amp;quot;&amp;gt;seder&amp;amp;#8217;s&lt;/a&gt;&amp;lt;a href=&amp;quot;http://sed.sourceforge.net/grabbag/&amp;quot;&amp;gt; grab bag&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://sed.sourceforge.net/grabbag/scripts/&amp;quot;&amp;gt;scripts&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://sed.sourceforge.net/grabbag/tutorials/&amp;quot;&amp;gt;tutorials&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://sed.sourceforge.net/grabbag/seders/&amp;quot;&amp;gt;seders&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://sed.sourceforge.net/grabbag/ssed/&amp;quot;&amp;gt;ssed&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://sed.sourceforge.net/grabbag/links/&amp;quot;&amp;gt;links&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://sed.sourceforge.net/grabbag/tutorials/#intros&amp;quot;&amp;gt;Intros&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://sed.sourceforge.net/grabbag/tutorials/#advanced&amp;quot;&amp;gt;Advanced&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://sed.sourceforge.net/grabbag/tutorials/#misc&amp;quot;&amp;gt;Miscellaneous&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;span-stylefont-size-largesed-tutorialsspan&#34;&gt;&lt;strong&gt;&amp;lt;span style=&amp;quot;font-size: large;&amp;quot;&amp;gt;Sed Tutorials&lt;/span&gt;&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;If you have written anything about sed – whether an introduction, how sed got you out of a real-life situation, or perhaps an advanced technique you&amp;amp;#8217;ve discovered – you may like have your work published here. &amp;lt;a href=&amp;quot;mailto:bonzini@gnu.org&amp;quot;&amp;gt;Your contribution&lt;/a&gt; will be very welcome.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Perl script to create csv files with a pattern – Generic script.</title>
      <link>/2010/01/19/perl-script-to-create-csv-files-with-a-pattern-generic-script/</link>
      <pubDate>Tue, 19 Jan 2010 03:11:16 +0000</pubDate>
      
      <guid>/2010/01/19/perl-script-to-create-csv-files-with-a-pattern-generic-script/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;I was having a really bad day and needed a quick solution to create some csv files. And this I needed to do for multiple data kinds and patterns, so I created this small script to do the job for me…&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;#Number of rows required in the output.&lt;/p&gt;
&lt;p&gt;$rows = 100;&lt;/p&gt;
&lt;p&gt;#The config and the output file&lt;/p&gt;
&lt;p&gt;open (CF_FILE, &amp;amp;#8221;&amp;lt;Config.test&amp;amp;#8221;);&lt;br&gt;
open (OUT_FILE, &amp;amp;#8221;&amp;gt;test.csv&amp;amp;#8221;);&lt;/p&gt;
&lt;p&gt;#—————————————————————————&lt;br&gt;
# No need to change anything below this.&lt;br&gt;
#—————————————————————————&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Opens Four Google Frames At Once</title>
      <link>/2009/12/19/opens-four-google-frames-at-once/</link>
      <pubDate>Sat, 19 Dec 2009 07:51:49 +0000</pubDate>
      
      <guid>/2009/12/19/opens-four-google-frames-at-once/</guid>
      <description>&lt;div class=\&#34;zemanta-img\&#34;&gt; 
&lt;div&gt;
  &lt;dl class=\&#34;wp-caption alignright\&#34;&gt; &lt;dt class=\&#34;wp-caption-dt\&#34;&gt;&lt;a href=\&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2009/12/Image:Google.png\&#34;&gt;&lt;img title=\&#34;Google Inc.\&#34; src=\&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/300px-Google.png\&#34; alt=\&#34;Google Inc.\&#34; /&gt;&lt;/a&gt;&lt;/dt&gt; &lt;dd class=\&#34;wp-caption-dd zemanta-img-attribution\&#34;&gt;Image via &lt;a href=\&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2009/12/Image:Google.png\&#34;&gt;Wikipedia&lt;/a&gt;&lt;/dd&gt; &lt;/dl&gt;
&lt;/div&gt;&lt;/div&gt; 
&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;&lt;strong&gt;Googlegooglegooglegoogle: Opens Four &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Google&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://google.com&amp;quot;&amp;gt;Google&lt;/a&gt; Frames At Once&lt;/strong&gt; Googlegooglegooglegoogle (that is Google times 4!) is a simple &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Website&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Website&amp;quot;&amp;gt;website&lt;/a&gt;/&amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Homepage&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Homepage&amp;quot;&amp;gt;startpage&lt;/a&gt; that puts four Google search windows in one page. It basically displays four frames so that you do not have to leave the page to search simultaneously. This tool is incredibly useful for Google power searchers.&lt;br&gt;
&amp;lt;img src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/g4_thumb.png&amp;quot; alt=&amp;quot;&amp;quot; align=&amp;quot;bottom&amp;quot; /&amp;gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>check out http://browsershots.org/</title>
      <link>/2009/12/19/check-out-httpbrowsershots-org/</link>
      <pubDate>Sat, 19 Dec 2009 07:49:06 +0000</pubDate>
      
      <guid>/2009/12/19/check-out-httpbrowsershots-org/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;If you are a web developer and are worried about how your &amp;lt;a class=&amp;quot;zem_slink&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Website&amp;quot; title=&amp;quot;Website&amp;quot; rel=&amp;quot;wikipedia&amp;quot;&amp;gt;website&lt;/a&gt; would look like in the various browsers and do not have the resources to test all the browsers, what do you do? Check out the &amp;lt;a class=&amp;quot;zem_slink&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Web_page&amp;quot; title=&amp;quot;Web page&amp;quot; rel=&amp;quot;wikipedia&amp;quot;&amp;gt;webpage&lt;/a&gt; at&lt;/p&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://browsershots.org/&amp;quot;&amp;gt;http://browsershots.org/&lt;/a&gt;&amp;lt;h6 class=&amp;quot;zemanta-related-title&amp;quot;&amp;gt;Related articles by Zemanta&lt;/h6&gt; &amp;lt;ul class=&amp;quot;zemanta-article-ul&amp;quot;&amp;gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://www.macstories.net/iphone/website-iphone/&amp;quot;&amp;gt;Setting Up Your Website to Run on iPhone Browser&lt;/a&gt; (macstories.net)&lt;/li&gt; &lt;/ul&gt; &amp;lt;div class=&amp;quot;zemanta-pixie&amp;quot;&amp;gt;&amp;lt;a class=&amp;quot;zemanta-pixie-a&amp;quot; href=&amp;quot;http://reblog.zemanta.com/zemified/8d5363f4-7641-40c8-b111-4a4d12d41ba5/&amp;quot; title=&amp;quot;Reblog this post [with Zemanta]&amp;quot;&amp;gt;&amp;lt;img class=&amp;quot;zemanta-pixie-img&amp;quot; src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_e36.png&amp;quot; alt=&amp;quot;Reblog this post [with Zemanta]&amp;quot; /&amp;gt;&lt;/a&gt;&amp;lt;span class=&amp;quot;zem-script more-related more-info pretty-attribution paragraph-reblog&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Some good and nice open source books worth downloading.</title>
      <link>/2009/11/22/some-good-and-nice-open-source-books-worth-downloading/</link>
      <pubDate>Sun, 22 Nov 2009 15:03:46 +0000</pubDate>
      
      <guid>/2009/11/22/some-good-and-nice-open-source-books-worth-downloading/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;There is a nice article &amp;lt;a href=&amp;quot;http://www.tectonic.co.za/?p=4491&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;here&lt;/a&gt; b&amp;lt;span class=&amp;quot;byline&amp;quot;&amp;gt;by Alastair Otter. He has given links to different Books that are worth reading.  These include:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;span class=&amp;quot;byline&amp;quot;&amp;gt;1)&amp;lt;a href=&amp;quot;http://oreilly.com/catalog/9780596517984/&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt; &lt;a href=&#34;http://oreilly.com/catalog/9780596517984/&#34;&gt;http://oreilly.com/catalog/9780596517984/&lt;/a&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;span class=&amp;quot;byline&amp;quot;&amp;gt;2) &amp;lt;a href=&amp;quot;http://en.flossmanuals.net/DigitalFoundations&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://en.flossmanuals.net/DigitalFoundations&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;span class=&amp;quot;byline&amp;quot;&amp;gt;3) &amp;lt;a href=&amp;quot;http://wiki.blender.org/index.php/Doc:Tutorials/Animation/BSoD/Character_Animation&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://wiki.blender.org/index.php/Doc:Tutorials/Animation/BSoD/Character_Animation&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;span class=&amp;quot;byline&amp;quot;&amp;gt;4) &amp;lt;a href=&amp;quot;ftp://ftp.heanet.ie/pub/debian/pool/non-free/r/rutebook/&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;ftp://ftp.heanet.ie/pub/debian/pool/non-free/r/rutebook/&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;span class=&amp;quot;byline&amp;quot;&amp;gt;to name a few, along with others. Its worth reading the article. While you are at it don&amp;amp;#8217;t forget the gems known as comments.&lt;/span&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Multiple search in vim</title>
      <link>/2009/11/19/multiple-search-in-vim/</link>
      <pubDate>Thu, 19 Nov 2009 02:02:19 +0000</pubDate>
      
      <guid>/2009/11/19/multiple-search-in-vim/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;I was looking at a log file and needed to highlight multiple search items to make the logs more readable. I got into multiple threads suggesting various cryptic vim commands but I was in no mood to remember them. So, I finally hit &amp;lt;a href=&amp;quot;http://www.vim.org/scripts/script.php?script_id=479&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;this&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This is a cool vim script which you can use to highlight multiple search patter. You can simply add a search term by doing&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Calculations</title>
      <link>/2009/11/17/calculations/</link>
      <pubDate>Tue, 17 Nov 2009 14:18:34 +0000</pubDate>
      
      <guid>/2009/11/17/calculations/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;&amp;lt;img src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/perl-one-liners.jpg&amp;quot; alt=&amp;quot;Perl One Liners&amp;quot; align=&amp;quot;bottom&amp;quot; /&amp;gt;This is the third part of a seven-part article on &lt;strong&gt;famous Perl one-liners&lt;/strong&gt;. In this part I will create various one-liners for &lt;strong&gt;calculations&lt;/strong&gt;. See &amp;lt;a href=&amp;quot;http://www.catonmat.net/blog/perl-one-liners-explained-part-one/&amp;quot;&amp;gt;part one&lt;/a&gt; for introduction of the series.&lt;/p&gt;
&lt;p&gt;Famous Perl one-liners is my attempt to create “&lt;strong&gt;perl1line.txt&lt;/strong&gt;” that is similar to “&amp;lt;a href=&amp;quot;http://www.catonmat.net/blog/awk-one-liners-explained-part-one/&amp;quot;&amp;gt;awk1line.txt&lt;/a&gt;” and “&amp;lt;a href=&amp;quot;http://www.catonmat.net/blog/sed-one-liners-explained-part-one/&amp;quot;&amp;gt;sed1line.txt&lt;/a&gt;” that have been so popular among Awk and Sed programmers.&lt;/p&gt;
&lt;p&gt;The article on famous Perl one-liners will consist of at least seven parts:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>bash tutorial for begineer and experienced.</title>
      <link>/2009/07/20/bash-tutorial-for-begineer-and-experienced/</link>
      <pubDate>Mon, 20 Jul 2009 15:42:22 +0000</pubDate>
      
      <guid>/2009/07/20/bash-tutorial-for-begineer-and-experienced/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;I having been looking for something like this for sometime. Found &amp;lt;a href=&amp;quot;http://beginlinux.com/desktop_training/comm/shells/232-bash&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;this&lt;/a&gt; while searching.&lt;/p&gt;
&lt;p&gt;A very good thing about this tutorial is its comprehensiveness and the details. A lot of examples are gives which too are quite useful.&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
