<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Networking Blog &#187; Uncategorized</title>
	<atom:link href="http://blog.webdir.bg/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.webdir.bg</link>
	<description>Networking - Cisco, Juniper, Linux</description>
	<lastBuildDate>Thu, 02 Feb 2012 21:09:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>MySQL match white spaces</title>
		<link>http://blog.webdir.bg/mysql-match-white-spaces/</link>
		<comments>http://blog.webdir.bg/mysql-match-white-spaces/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 15:42:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.webdir.bg/?p=449</guid>
		<description><![CDATA[Read how to match white spaces in MySQL with REGEXP in table field.]]></description>
			<content:encoded><![CDATA[<p>To match a white space in MySQL table field use REGEXP.</p>
<pre>SELECT username FROM mytable WHERE username REGEXP '[[:space:]]'</pre>
<p>the result will be</p>
<pre>+--------------+
| username     |
+--------------+
| user 474     |
| user 113     |
| user 22      |
+--------------+</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.webdir.bg/mysql-match-white-spaces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clear Windows Samba Login Password</title>
		<link>http://blog.webdir.bg/clear-windows-samba-login-password/</link>
		<comments>http://blog.webdir.bg/clear-windows-samba-login-password/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 11:45:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.webdir.bg/?p=430</guid>
		<description><![CDATA[How to clear windows share login cache. Clear Windows login password.]]></description>
			<content:encoded><![CDATA[<p>If you connect for example on Linux Samba server, for example \\192.168.2.1, and use for first shared folder one user and pass, and after that you try to login to second folder with another user and pass, Windows can&#8217;t login. The only way to login ( I found ) is to delete share, to clear window&#8217;s share cache. Open cmd, and type the following command:</p>
<pre>
net use /delete \\192.168.2.1
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.webdir.bg/clear-windows-samba-login-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PERL Apache Realtime Output From Script</title>
		<link>http://blog.webdir.bg/perl-apache-realtime-output-from-script/</link>
		<comments>http://blog.webdir.bg/perl-apache-realtime-output-from-script/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 13:10:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://blog.webdir.bg/?p=325</guid>
		<description><![CDATA[PERL Apache Realtime Output From Script, using  Net::Telnet]]></description>
			<content:encoded><![CDATA[<p>As of Apache 1.3, CGI scripts are essentially not buffered. Every time your script does a &#8220;flush&#8221; to output data, that data gets relayed on to the client. Some scripting languages, for example Perl, have their own buffering for output &#8211; this can be disabled by setting the $| special variable to 1. Of course this does increase the overall number of packets being transmitted, which can result in a sense of slowness for the end user.<br />
CGI scripts that generate their own headers are called nph  (non-parsed headers) scripts. The server must know in advance whether the particular CGI script intends to return a complete set of headers. Web servers handle this differently, but most recognize CGI scripts with a nph- prefix in their filename.<br />
When sending complete headers, you must at least send the   status line plus the Content-type and Server headers. You must print the entire status line; you should not print the Status header. As you will recall, the status line includes the protocol and version string (e.g., &#8220;HTTP/1.1&#8243;), but as you should recall, CGI provides this to you in the environment variable SERVER_PROTOCOL. Always use this variable in your CGI scripts, instead of hardcoding it, because the version in the SERVER_PROTOCOL may vary for older clients.<br />
For example the next perl script, is using telnet to connect to remote host and is executing traceroute. ( The source of this script is taken from freshmeat&#8217;s looking glass project). The most important lines are from 2 to 5. This script is using &#8220;Content-type: text/plain&#8221;, if you plan to use html tags chenged to &#8220;Content-type: text/html&#8221;.<br />
$| &#8211; If set to nonzero, forces a flush after every write or print.<br />
Example of nph-realtime-output.pl</p>
<pre class="brush: perl; title: ; notranslate">
#!/usr/bin/perl
print &quot;$ENV{SERVER_PROTOCOL} 200 OK\n&quot;;
print &quot;Server: $ENV{SERVER_SOFTWARE}\n&quot;;
print &quot;Content-type: text/plain\n\n&quot;;
$|=1;
use Net::Telnet;
$login=&quot;MyLogin&quot;;
$password=&quot;MySecret&quot;;
$port=&quot;23&quot;;
$host=&quot;xxx.xxx.xxx.xxx&quot;;
$command=&quot;traceroute www.google.com | no-more&quot;;
$telnet = new Net::Telnet;
$telnet-&gt;errmode( sub { print &quot;ERROR:&quot; . join('|', @_) . &quot;\n&quot;; } );
$telnet-&gt;timeout('10');
$telnet-&gt;option_callback( sub { return; } );
$telnet-&gt;option_accept(Do =&gt; 31);
$telnet-&gt;open(Host =&gt; $host, Port =&gt; $port);
if ($login ne &quot;&quot;) {
  $telnet-&gt;waitfor('/(ogin|name|word):.*$/');
  $telnet-&gt;print(&quot;$login&quot;);
}
if ($password ne &quot;&quot;) {
    $telnet-&gt;waitfor('/word:.*$/');
    $telnet-&gt;print(&quot;$password&quot;);
}
$telnet-&gt;waitfor(Match =&gt; '/.*[\$%&gt;] {0,1}$/',
                 Match =&gt; '/^[^#]*[\$%#&gt;] {0,1}$/');
$telnet-&gt;telnetmode(0);
$telnet-&gt;put(pack(&quot;C9&quot;,
                  255,                  # TELNET_IAC
                  250,                  # TELNET_SB
                  31, 0, 200, 0, 0,     # TELOPT_NAWS
                  255,                  # TELNET_IAC
                  240));                # TELNET_SE
$telnet-&gt;telnetmode(1);
my $telnetcmd = $command;
$telnet-&gt;print(&quot;$telnetcmd&quot;);
$telnet-&gt;getline;               # read out command line
while (1) {
  if ($#output &gt;= 0) {
    $_ = shift (@output);
  }
  elsif (! $telnet-&gt;eof) {
    my ($prematch, $match) = $telnet-&gt;waitfor(Match =&gt; '/\n/',
                                              Match =&gt; '/[\$%#&gt;] {0,1}$/',
                                              Errmode =&gt; &quot;return&quot;)
    or do {
    };
    if ($match =~ /[\$%#&gt;] {0,1}$/) {
      $telnet-&gt;print(&quot;quit&quot;);
      $telnet-&gt;close;
      last;
    }
    push @output, $prematch . $match;
    next;
  }
  else {
    last;
  }
  print $_;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.webdir.bg/perl-apache-realtime-output-from-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compile 32 bit  MySQL C application on 64 bit Ubuntu</title>
		<link>http://blog.webdir.bg/compile-32-bit-mysql-c-application-on-64-bit-ubuntu/</link>
		<comments>http://blog.webdir.bg/compile-32-bit-mysql-c-application-on-64-bit-ubuntu/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 12:59:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.webdir.bg/?p=132</guid>
		<description><![CDATA[How to compile 32 bit application ( using MySQL C API ) on 64 bit Ubuntu. The articles shows step by step, how to install needed libraries.]]></description>
			<content:encoded><![CDATA[<p>I wrote a small program in C, using MySQL C API. This program was compiled on x86 machine. After a hardware upgrade and installing Ubuntu x64, compiling the program error occurred:</p>
<pre>segfault at 1 ip 00007fdcf44f4a29 sp 00007fff19659078 error 4 in libc-2.10.1.so[7fdcf4451000+166000]
</pre>
<p>After a research in diffrent forums, the solution is:<span id="more-132"></span><br />
Install:</p>
<pre>sudo apt-get install libc6-dev-i386
</pre>
<p>Now we need 32 bit version of MySQL development clien library. But there is a small utility, to help install libraries: <strong>getlibs</strong>. Download getlibs-all from <a rel="nofollow" href="http://frozenfox.freehostia.com/cappy/" target="_blank">http://frozenfox.freehostia.com/cappy/</a>.</p>
<pre>sudo  dpkg -i getlibs-all.deb</pre>
<p>32 bit libraries we needed: libmysqlclient-dev and zlib1g-dev.</p>
<pre>getlibs -w http://mirrors.kernel.org/ubuntu/pool/main/m/mysql-dfsg-5.1/libmysqlclient-dev_5.1.37-1ubuntu5_i386.deb</pre>
<p>The version of MySQL server is:</p>
<pre>mysql  Ver 14.14 Distrib 5.1.37, for debian-linux-gnu (x86_64)</pre>
<p>And last libruary:</p>
<pre>getlibs -w http://mirrors.kernel.org/ubuntu/pool/main/z/zlib/zlib1g-dev_1.2.3.3.dfsg-12ubuntu1_i386.deb</pre>
<p><br/><br />
Compiler ( gcc version 4.4.1, x86_64-linux-gnu) command line:</p>
<pre>
gcc -m32 -c radauth.c -L/usr/lib/mysql -lmysqlclient -lnsl -lm -lz
</pre>
<p>m32 &#8211; 32 bit application<br />
m64 &#8211; 64 bit application</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webdir.bg/compile-32-bit-mysql-c-application-on-64-bit-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Delete Picasa Web Image Or Album</title>
		<link>http://blog.webdir.bg/how-to-delete-picasa-web-image-or-album/</link>
		<comments>http://blog.webdir.bg/how-to-delete-picasa-web-image-or-album/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 22:32:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[picasa]]></category>

		<guid isPermaLink="false">http://blog.webdir.bg/?p=82</guid>
		<description><![CDATA[Go to http://picasaweb.google.com and login. Select image or album you want to delete and from the top menu select edit, the delete.]]></description>
			<content:encoded><![CDATA[<p>Go to <a href="http://http://picasaweb.google.com" target="_blank">http://picasaweb.google.com</a> and login. Select image or album you want to delete and from the top menu select edit, the delete.</p>
<p><a class="thickbox" href="http://blog.webdir.bg/wp-content/uploads/2010/01/picasa_del_album.jpg"><img class="alignnone size-medium wp-image-88" title="picasa_del_album" src="http://blog.webdir.bg/wp-content/uploads/2010/01/picasa_del_album-300x168.jpg" alt="" width="300" height="168" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webdir.bg/how-to-delete-picasa-web-image-or-album/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

