<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Application Programming Interface on Amit Agarwal Linux Blog</title>
    <link>/tags/application-programming-interface/</link>
    <description>Recent content in Application Programming Interface on Amit Agarwal Linux Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Mon, 17 Feb 2014 10:35:53 +0000</lastBuildDate>
    
	<atom:link href="/tags/application-programming-interface/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>get all the urls in html file (local or on server).</title>
      <link>/2014/02/17/urls-html-file-local-server/</link>
      <pubDate>Mon, 17 Feb 2014 10:35:53 +0000</pubDate>
      
      <guid>/2014/02/17/urls-html-file-local-server/</guid>
      <description>&lt;p&gt;To use this, you will need the &lt;a class=&#34;zem_slink&#34; title=&#34;Lynx&#34; href=&#34;http://en.wikipedia.org/wiki/Lynx&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;lynx&lt;/a&gt; tool, so install that first.&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;sudo yum install lynx&lt;/pre&gt;
&lt;p&gt;Now, to get list of all 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; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;URLs&lt;/a&gt; in local html file or some URL, just execute this:&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;lynx -dump -listonly&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;http://stackoverflow.com/questions/20797087/trouble-in-using-file-get-contents&#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_97_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/20797087/trouble-in-using-file-get-contents&#34; target=&#34;_blank&#34;&gt;Trouble in using file_get_contents()&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/21453767/how-to-send-image-to-server-with-url-in-ios&#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://i0.wp.com/i.zemanta.com/noimg_43_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/21453767/how-to-send-image-to-server-with-url-in-ios&#34; target=&#34;_blank&#34;&gt;How to send image to server with url in ios&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://christianheilmann.com/2014/01/05/endangered-species-of-the-web-the-link/&#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://i0.wp.com/i.zemanta.com/236173680_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://christianheilmann.com/2014/01/05/endangered-species-of-the-web-the-link/&#34; target=&#34;_blank&#34;&gt;Endangered species of the Web: the Link&lt;/a&gt;
  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Home grown mail scheduler with bash script and cron</title>
      <link>/2013/10/04/home-grown-mail-scheduler-bash-script-cron/</link>
      <pubDate>Fri, 04 Oct 2013 01:04:35 +0000</pubDate>
      
      <guid>/2013/10/04/home-grown-mail-scheduler-bash-script-cron/</guid>
      <description>&lt;p&gt;If you are using &lt;a class=&#34;zem_slink&#34; title=&#34;Linux Boot Camp&#34; href=&#34;http://www.intenseschool.com/boot_camp/linux&#34; target=&#34;_blank&#34; rel=&#34;intenseschool&#34;&gt;Linux&lt;/a&gt; (Fedora/Ubuntu or anything else) then you do get a lot of tools and one of them is &lt;a class=&#34;zem_slink&#34; title=&#34;Cron&#34; href=&#34;http://en.wikipedia.org/wiki/Cron&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;cron&lt;/a&gt;. Very very useful. Just write some &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;script&lt;/a&gt; that can do the task for you, put it in cron and forget it. So, here is a home grown way to schedule mails.&lt;/p&gt;
&lt;p&gt;First, copy this script below:&lt;/p&gt;
&lt;pre class=&#34;brush: actionscript3; gutter: true; first-line: 1&#34;&gt;#!/bin/bash -
#============================================================================&lt;a class=&#34;zem_slink&#34; title=&#34;Relational operator&#34; href=&#34;http://en.wikipedia.org/wiki/Relational_operator&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;===&lt;/a&gt;
#
#          FILE: sched_mail.sh
#
#         USAGE: ./sched_mail.sh
#
#   DESCRIPTION:
#
#       OPTIONS: ---
#  REQUIREMENTS: ---
#          BUGS: ---
#         NOTES: ---
#        AUTHOR: Amit Agarwal (aka), 
#      REVISION:  ---
#===============================================================================

mailfile=&#34;~/mail&#34;
if [[ $(wc -l $mailfile|awk &#39;{print $1}&#39; ) -ge 5 ]]
then
    to=$(grep ^To: $mailfile|sed &#39;s/To: //&#39;)
    echo &#34;Good to send mail... to = $to&#34;
    sendmail -t &amp;lt;$mailfile
    echo &#34;once mail is send, delete the contents of file&#34;
    echo &#34;sed -i &#39;4,$ d&#39; $mailfile&#34;
fi&lt;/pre&gt;
&lt;p&gt;Now, create a file called mail in your &lt;a class=&#34;zem_slink&#34; title=&#34;Home directory&#34; href=&#34;http://en.wikipedia.org/wiki/Home_directory&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;home directory&lt;/a&gt;, with the following contents:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>xmlwf – Is your xml document well formed?</title>
      <link>/2012/02/18/xmlwf-xml-document-formed/</link>
      <pubDate>Sat, 18 Feb 2012 06:36:34 +0000</pubDate>
      
      <guid>/2012/02/18/xmlwf-xml-document-formed/</guid>
      <description>&lt;p&gt;There is a small nifty utility called xmlwf that can check your &lt;a class=&#34;zem_slink&#34; title=&#34;XML&#34; href=&#34;http://en.wikipedia.org/wiki/XML&#34; rel=&#34;wikipedia&#34;&gt;xml documents&lt;/a&gt; to see if they are well formed.&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;sudo yum install expat&lt;/pre&gt;
&lt;p&gt;Once installed, simply use :&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;xmlwf&lt;/pre&gt;
&lt;p&gt;Need more details, just check the &lt;a class=&#34;zem_slink&#34; title=&#34;Man page&#34; href=&#34;http://en.wikipedia.org/wiki/Man_page&#34; rel=&#34;wikipedia&#34;&gt;man page&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://stackoverflow.com/questions/9130665/assigning-id-to-objects-transmitted-in-xml-document&#34;&gt;Assigning ID to Objects transmitted in XML document&lt;/a&gt; (stackoverflow.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://stackoverflow.com/questions/9099344/removing-characters-from-php-output-in-xml&#34;&gt;removing characters from php output in xml&lt;/a&gt; (stackoverflow.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://stackoverflow.com/questions/9117244/xml-parsing-using-xelement-and-child-contents&#34;&gt;C# XML parsing using XElement and child contents&lt;/a&gt; (stackoverflow.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>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>configuration for afraid-dyndns on Fedora and other similar distro.</title>
      <link>/2011/03/04/configuration-for-afraid-dyndns-on-fedora-and-other-similar-distro/</link>
      <pubDate>Fri, 04 Mar 2011 16:42:56 +0000</pubDate>
      
      <guid>/2011/03/04/configuration-for-afraid-dyndns-on-fedora-and-other-similar-distro/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;First install afraid-dyndns with the command:&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 afraid-dyndns
    &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;Now open the &lt;a class=&#34;zem_slink&#34; title=&#34;Configuration file&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Configuration_file&#34;&gt;configuration file&lt;/a&gt; /etc/afraid-dyndns.cfg and we need to change the following:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Notify = root@localhost # leave empty to suppress notifications&lt;br&gt;
CacheFile = /var/cache/afraid-dyndns/IP&lt;br&gt;
AccountHash = &lt;value&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For the Account hash, head over to &lt;a href=&#34;http://freedns.afraid.org/api/ &#34; target=&#34;_blank&#34;&gt;&lt;a href=&#34;http://freedns.afraid.org/api/&#34;&gt;http://freedns.afraid.org/api/&lt;/a&gt; &lt;/a&gt;login and then click one of the &lt;a class=&#34;zem_slink&#34; title=&#34;XML&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/XML&#34;&gt;XML&lt;/a&gt; or the &lt;a class=&#34;zem_slink&#34; title=&#34;ASCII&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/ASCII&#34;&gt;ASCII&lt;/a&gt; links there. Once the page has loaded, look at the &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; which is of form:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>print every nth line</title>
      <link>/2011/03/01/print-every-nth-line/</link>
      <pubDate>Tue, 01 Mar 2011 13:17:30 +0000</pubDate>
      
      <guid>/2011/03/01/print-every-nth-line/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Some time back I was working with lot of data and wanted to analyze only the every 10 line sometimes and sometimes every 20th line. I had to keep doing these changes in vim or otherwise so finally I wrote a program to do this for me. If you need such a program then here it is:&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;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;text codecolorer&amp;quot;&amp;gt;
      #!/bin/bash -&amp;lt;br /&amp;gt; #===============================================================================&amp;lt;br /&amp;gt; #&amp;lt;br /&amp;gt; #          FILE:  print_nth_line.sh&amp;lt;br /&amp;gt; #&amp;lt;br /&amp;gt; #         USAGE:  ./print_nth_line.sh&amp;lt;br /&amp;gt; #&amp;lt;br /&amp;gt; #   DESCRIPTION:  Print every nth line&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:   (),&amp;lt;br /&amp;gt; #       COMPANY:&amp;lt;br /&amp;gt; #       VERSION:  1.0&amp;lt;br /&amp;gt; #       CREATED:  12/08/2010 05:36:53 PM IST&amp;lt;br /&amp;gt; #      REVISION:  ---&amp;lt;br /&amp;gt; #===============================================================================&amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt; if [ x&amp;quot;$1&amp;quot; == &amp;quot;x&amp;quot; ]&amp;lt;br /&amp;gt; then&amp;lt;br /&amp;gt; echo &amp;quot;Please provide the line numbers to print .. .ex 3 will print 3,6,9&amp;quot;&amp;lt;br /&amp;gt; exit -1;&amp;lt;br /&amp;gt; fi&amp;lt;br /&amp;gt; if [ x&amp;quot;$2&amp;quot; == &amp;quot;x&amp;quot; ]&amp;lt;br /&amp;gt; then&amp;lt;br /&amp;gt; echo &amp;quot;Please provide the filename&amp;quot;&amp;lt;br /&amp;gt; exit -2;&amp;lt;br /&amp;gt; fi&amp;lt;br /&amp;gt; awk &#39;temp++ { if ( temp % &#39;$1&#39; == 0) print $1};&#39; $2
    &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;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>analyze debug queries output for wordpress</title>
      <link>/2011/02/09/analyze-debug-queries-output-wordpress/</link>
      <pubDate>Wed, 09 Feb 2011 15:25:14 +0000</pubDate>
      
      <guid>/2011/02/09/analyze-debug-queries-output-wordpress/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Some time back, my website became too slow and I started getting timeout response for quite a lot of my pages. When I analyzed things, I found the issue was with the DB queries taking a lot of time. So, I thought of getting my hands dirty and started with installing the plugin “Debug Queries”. Just in case, you don’t know about the plugin, it lists all &lt;a class=&#34;zem_slink&#34; title=&#34;The Queries&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/The_Queries&#34;&gt;the queries&lt;/a&gt; to DB along with the time taken for the query when a Admin user visits any page.&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>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>intercept stdout/stderr of another process or disowned process</title>
      <link>/2010/11/23/intercept-stdoutstderr-process-disowned-process/</link>
      <pubDate>Tue, 23 Nov 2010 12:51:27 +0000</pubDate>
      
      <guid>/2010/11/23/intercept-stdoutstderr-process-disowned-process/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;The command is definately going to save your day if you have &lt;a class=&#34;zem_slink&#34; title=&#34;Disownment&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Disownment&#34;&gt;disowned&lt;/a&gt; the process by mistake. Only uses &lt;a class=&#34;zem_slink&#34; title=&#34;Strace&#34; rel=&#34;homepage&#34; href=&#34;http://sourceforge.net/projects/strace/&#34;&gt;strace&lt;/a&gt; so might as &lt;a class=&#34;zem_slink&#34; title=&#34;Well intervention&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Well_intervention&#34;&gt;well work&lt;/a&gt; on &lt;a class=&#34;zem_slink&#34; title=&#34;Solaris (operating system)&#34; rel=&#34;homepage&#34; href=&#34;http://oracle.com/solaris&#34;&gt;Solaris&lt;/a&gt; also, though not tried it.&lt;/p&gt;
&lt;p&gt;intercept stdout/&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; of another process or disowned process&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;
      strace -e write=1,2 -p $PID 2&amp;gt;&amp;amp;1 | sed -un &amp;quot;/^ |/p&amp;quot; | sed -ue &amp;quot;s/^.{9 }(.{50}).+/1/g&amp;quot; -e &#39;s/ //g&#39; | xxd -r -p
    &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;Useful to recover a output(stdout and stderr) “disown”ed or “&lt;a class=&#34;zem_slink&#34; title=&#34;Nohup&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Nohup&#34;&gt;nohup&lt;/a&gt;“ep process of other instance of ssh.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using SQLite to maintain your monthly bills.</title>
      <link>/2010/08/24/sqlite-maintain-monthly-bills/</link>
      <pubDate>Tue, 24 Aug 2010 18:13:54 +0000</pubDate>
      
      <guid>/2010/08/24/sqlite-maintain-monthly-bills/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;I was looking for a small application to maintain my every month bills. The application had to be small and script-able. I basically wanted to keep track of the bills that have been generated and pending payment and the bills that have been paid.&lt;/p&gt;
&lt;p&gt;First we will create the &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Database&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Database&amp;quot;&amp;gt;database&lt;/a&gt; schema with the following command:&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;
      CREATE TABLE bills(name varchar(20), due_dt text, p_dt text, amount integer);
    &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;So, I built on the knowledge gathered on &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;SQLite&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://sqlite.org/&amp;quot;&amp;gt;SQLite&lt;/a&gt;. And here is a small script that I wrote:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>SQLite – simple use in scripts</title>
      <link>/2010/08/21/sqlite-simple-scripts/</link>
      <pubDate>Sat, 21 Aug 2010 15:16:31 +0000</pubDate>
      
      <guid>/2010/08/21/sqlite-simple-scripts/</guid>
      <description>&lt;!-- adsense#ad-2--&gt;
&lt;p&gt;Today we will look a the most simple use&amp;amp;#8217;s in the scripts and how to use them.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;echo &amp;amp;#8221;insert into bills values (&amp;amp;#8221;$name&amp;amp;#8221;,$date_now, $date_now,$1)&amp;amp;#8221;|sqlite bills&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;or the other way to do this is&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;SQLite&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://sqlite.org/&amp;quot;&amp;gt;sqlite3&lt;/a&gt; bills &amp;amp;#8221;insert into bills values (&amp;amp;#8221;$name&amp;amp;#8221;,$date_now, $date_now,$1)&amp;amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;OK, now in the next post we will see a simple application that I am currently developing or planning.&amp;lt;h6 class=&amp;quot;zemanta-related-title&amp;quot; style=&amp;quot;font-size: 1em;&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://tobu.lightbird.net/&amp;quot;&amp;gt;Tobu Tutorial&lt;/a&gt; (tobu.lightbird.net)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://go.theregister.com/feed/www.theregister.co.uk/2010/07/02/openoffice_adopts_gstreamer/&amp;quot;&amp;gt;OpenOffice gets Ubuntu-media friendly&lt;/a&gt; (go.theregister.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://elegantcode.com/2010/07/02/using-transactionscope-with-sqlite/&amp;quot;&amp;gt;Using TransactionScope with SQLite&lt;/a&gt; (elegantcode.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.slideshare.net/aikisteve/flash-and-the-city-2010&amp;quot;&amp;gt;Flash And The City 2010&lt;/a&gt; (slideshare.net)&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;Enhanced by Zemanta&amp;quot; href=&amp;quot;http://www.zemanta.com/&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://img.zemanta.com/zemified_e.png?x-id=7b7c893c-d92b-44bc-8923-d7c6fddc8b42&amp;quot; alt=&amp;quot;Enhanced by 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>SQLite : Manager for this simple database</title>
      <link>/2010/08/19/sqlite-manager-for-this-simple-database/</link>
      <pubDate>Thu, 19 Aug 2010 07:43:25 +0000</pubDate>
      
      <guid>/2010/08/19/sqlite-manager-for-this-simple-database/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;We will look at sqliteman – &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;SQLite&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://sqlite.org/&amp;quot;&amp;gt;SQLite&lt;/a&gt; Database manager.&lt;/p&gt;
&lt;p&gt;If you are looking for a tool for tuning &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;SQL&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/SQL&amp;quot;&amp;gt;SQL&lt;/a&gt; statements, manage tables, views, or triggers, administrate the &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Database&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Database&amp;quot;&amp;gt;database&lt;/a&gt; space and index &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Statistics&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Statistics&amp;quot;&amp;gt;statistics&lt;/a&gt; then Sqliteman is the perfect choice.&lt;br&gt;
If you are looking for a &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Graphical user interface&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Graphical_user_interface&amp;quot;&amp;gt;graphical&lt;/a&gt; queries creation wizards, &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;User interface&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/User_interface&amp;quot;&amp;gt;user interface&lt;/a&gt; designers for your database, or an universal report tool try the applications designed for tasks such this (&amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Kexi&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://kexi-project.org/&amp;quot;&amp;gt;Kexi&lt;/a&gt;, knoda).&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>SQLite – Easy to use, dependable and good to use database for small applications.</title>
      <link>/2010/08/17/sqlite-easy-dependable-good-database-small-applications/</link>
      <pubDate>Tue, 17 Aug 2010 07:10:19 +0000</pubDate>
      
      <guid>/2010/08/17/sqlite-easy-dependable-good-database-small-applications/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;For last couple of days I am looking at &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;SQLite&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://sqlite.org/&amp;quot;&amp;gt;SQLite&lt;/a&gt;, a very footprint, file based Database.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;SQLite is a C &amp;lt;a class=&amp;quot;zem_slink&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;library&lt;/a&gt; that implements an &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;SQL&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/SQL&amp;quot;&amp;gt;SQL database&lt;/a&gt; &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Database engine&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Database_engine&amp;quot;&amp;gt;engine&lt;/a&gt;. A large subset of &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;SQL-92&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/SQL-92&amp;quot;&amp;gt;SQL92&lt;/a&gt; is supported. A complete &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Database&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Database&amp;quot;&amp;gt;database&lt;/a&gt; is stored in a single disk file. The &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Application programming interface&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Application_programming_interface&amp;quot;&amp;gt;API&lt;/a&gt; is designed for convenience and ease of use. Applications that link against SQLite can enjoy the power and flexibility of an SQL database without the administrative hassles of supporting a separate &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Database server&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Database_server&amp;quot;&amp;gt;database server&lt;/a&gt;. Version 2 and version 3 binaries are named to permit each to be installed on a single &amp;lt;a class=&amp;quot;zem_slink&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;host&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
