<?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>/home/mihap/KrNeki &#187; english</title>
	<atom:link href="http://blog.mihap.si/category/english/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mihap.si</link>
	<description>Mihov BloG o nepomembnih stvareh...</description>
	<lastBuildDate>Wed, 30 Nov 2011 07:29:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>My top 10 mac apps</title>
		<link>http://blog.mihap.si/my-top-10-mac-apps/</link>
		<comments>http://blog.mihap.si/my-top-10-mac-apps/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 12:09:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Aktualno]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[english]]></category>

		<guid isPermaLink="false">http://blog.mihap.si/?p=510</guid>
		<description><![CDATA[Here is my top 10 Apple apps that I use on regular basis and I could not live without&#8230; Panic Coda One-Window Web Development for Mac OS X 1password Password Manager + Automatic Form Filler for Mac OS X Adium Adium is a free instant messaging application for Mac OS X that can connect to [...]]]></description>
			<content:encoded><![CDATA[<p>Here is my top 10 Apple apps that I use on regular basis and I could not live without&#8230;</p>
<ol>
<li style="clear:both"><a href=""><a href="http://www.panic.com/coda/">Panic Coda</a><br />
<img src="http://blog.mihap.si/wp-content/uploads/2010/06/coda1.png" alt="coda1.png" style="width:50px;float:left;border:none" width="50px" width="50px"><br />
One-Window Web Development for Mac OS X
</li>
<li style="clear:both"><a href=""><a href="http://agilewebsolutions.com/products/1Password">1password</a><br />
<img src="http://blog.mihap.si/wp-content/uploads/2010/06/1passwdicon-300x300.png" alt="1passwdicon-300x300.png" style="width:50px;float:left;border:none" width="50px" width="50px"><br />
Password Manager + Automatic Form Filler for Mac OS X
</li>
<p><span id="more-510"></span></p>
<li style="clear:both"><a href=""><a href="http://adium.im/">Adium</a><br />
<img src="http://blog.mihap.si/wp-content/uploads/2010/06/adium.png" alt="adium.png" style="width:50px;float:left;border:none" width="50px"><br />
Adium is a free instant messaging application for Mac OS X that can connect to AIM, MSN, Jabber, Yahoo, and more.
</li>
<li style="clear:both"><a href="http://www.pixelmator.com/">Pixelmator</a><br />
<img src="http://blog.mihap.si/wp-content/uploads/2010/06/pixelmator_icon1.png" alt="pixelmator_icon.png" style="width:50px;float:left;border:none" width="50px"><br />
Mac OS X Image editor for the rest of us.
</li>
<li style="clear:both"><a href="http://www.adobe.com/products/photoshoplightroom/ ">Lightroom</a><br />
<img src="http://blog.mihap.si/wp-content/uploads/2010/06/adobe-lightroom-logo.jpg" alt="adobe-lightroom-logo.jpg" style="width:50px;float:left;border:none" width="50px"><br />
Adobe Photoshop Lightroom is the leading photo management and editing software solution. See what leading photographers use to manage their photos.
</li>
<li style="clear:both"><a href="http://www.omnigroup.com/applications/omnigraffle/">Omnigraffle</a><br />
<img src="http://blog.mihap.si/wp-content/uploads/2010/06/omnigraffle-professional-icon-512x512.png" alt="omnigraffle-professional-icon-512x512.png" style="width:50px;float:left;border:none" width="50px"><br />
Diagramming, charting, and visualization software for Mac OS X. Import and export to many formats; automatic, assisted, and manual layout.
</li>
<li style="clear:both"><a href="www.atebits.com/tweetie-mac/ ">Tweetie</a><br />
<img src="http://blog.mihap.si/wp-content/uploads/2010/06/tweetie.png" alt="tweetie.png" style="width:50px;float:left;border:none" width="50px"><br />
Tweetie is a rockin' Twitter client for Mac, iPhone and iPod touch.
</li>
<li style="clear:both"><a href="www.videolan.org/vlc/download-macosx.html">VLC</a><br />
<img src="http://blog.mihap.si/wp-content/uploads/2010/06/20090624181539VLC_icon.png" alt="20090624181539VLC_icon.png" style="width:50px;float:left;border:none" width="50px"><br />
VLC is a free and open source cross-platform multimedia player and framework.
</li>
<li style="clear:both"><a href="www.red-sweater.com/marsedit/">MarsEdit</a><br />
<img src="http://blog.mihap.si/wp-content/uploads/2010/06/marseditIconLarge.png" alt="marseditIconLarge.png" style="width:50px;float:left;border:none" width="50px"><br />
MarsEdit is a desktop blog editing application for the Mac. It provides an offline interface to most popular blogging systems. WordPress, Tumblr, Blogger ..
</li>
<li style="clear:both"><a href="http://www.transmissionbt.com/">Transmission</a><br />
<img src="http://blog.mihap.si/wp-content/uploads/2010/06/transmission_icon.png" alt="transmission_icon.png" style="width:50px;float:left;border:none" width="50px"><br />
Transmission bittorrent client runs natively on multiple operating systems. A Fast, Easy, and Free BitTorrent Client &#8230;
</li>
<li style="clear:both"><a href="http://www.viscosityvpn.com/">Viscosity</a><br />
<img src="http://blog.mihap.si/wp-content/uploads/2010/06/Viscosity.png" alt="Viscosity.png" style="width:50px;float:left;border:none" width="50px"><br />
Viscosity is an OpenVPN client for Mac, providing a rich Cocoa graphical user interface for creating, editing, and controlling VPN connections.
</li>
</ol>
<p>OK, anyone who counted can see that there are actually 11 apps, but I really couldn't let any out <img src='http://blog.mihap.si/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>brm</p>
<div class="none"><div class="g-plusone" data-href="http://blog.mihap.si/my-top-10-mac-apps/" size="small" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.mihap.si/my-top-10-mac-apps/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Airport extreme 6to4 manual tunnel</title>
		<link>http://blog.mihap.si/airport-extreme-6to4-manual-tunnel/</link>
		<comments>http://blog.mihap.si/airport-extreme-6to4-manual-tunnel/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 16:38:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[ipv6]]></category>

		<guid isPermaLink="false">http://blog.mihap.si/?p=468</guid>
		<description><![CDATA[I noticed that Apple's airport extreme wireless router can do IPv6 tunneling over IPv4 networks, and since my ISP doesnt support native IPv6 yet I have to use this option&#8230; By default it is done automatically using automatic 6to4 tunnels, but since I like to know where my traffic goes to I prefer to do [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed that Apple's <a href="http://www.apple.com/airportextreme/">airport extreme</a> wireless router can do IPv6 tunneling over IPv4 networks, and since my ISP doesnt support native IPv6 yet I have to use this option&#8230; By default it is done automatically using automatic 6to4 tunnels, but since I like to know where my traffic goes to I prefer to do it manually&#8230;</p>
<p>After few tries I managed to get it working, there is just a small, simple trick: <b>IPv4 public address must be set to manually configured static IP address</b>, it does not work with DHCP server, even if the IP address you get is always the same. And since there is no logging output to make troubleshooting figuring this out can be a problem&#8230; <img src='http://blog.mihap.si/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><img src="http://blog.mihap.si/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-6.32.09-PM.png" alt="Screen shot 2010-06-11 at 6.32.09 PM.png" style="border:none"/></p>
<p>After that it works great&#8230; IPv6 to the home! <img src='http://blog.mihap.si/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>lpm</p>
<div class="none"><div class="g-plusone" data-href="http://blog.mihap.si/airport-extreme-6to4-manual-tunnel/" size="small" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.mihap.si/airport-extreme-6to4-manual-tunnel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Apache IPv6 UMTS server @Nokia N900</title>
		<link>http://blog.mihap.si/apache-ipv6-umts-server-nokia-n900/</link>
		<comments>http://blog.mihap.si/apache-ipv6-umts-server-nokia-n900/#comments</comments>
		<pubDate>Sat, 22 May 2010 10:58:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.mihap.si/?p=462</guid>
		<description><![CDATA[Nokia N900 is the first mobile device that can do "dual-stack" IPv4 and IPv6 connection on packet data mobile networks (EDGE,UMTS,HSPA) &#8211; well, 2 separate PDP contexts anyway, but close enough since it is not really supported by 3GPP yet. It requires some kernel modifications, which I cannot provide here, but if there is any [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://maemo.nokia.com/n900/">Nokia N900</a> is the first mobile device that can do "dual-stack" IPv4 and IPv6 connection on packet data mobile networks (EDGE,UMTS,HSPA) &#8211; well, 2 separate PDP contexts anyway, but close enough since it is not really supported by <a href="http://www.3gpp.org/">3GPP</a> yet. It requires some kernel modifications, which I cannot provide here, but if there is any interest send me email and I can provide some info on that subject&#8230;</p>
<p>Anyway, once we have <a href="http://en.wikipedia.org/wiki/IPv6">IPv6</a> connectivity to internet we can also setup device to act as web server &#8211; since it is a <a href="http://www.linux.org/">Linux</a> device this is not too hard to do. However, most mobile operators block the incoming TCP connection toward clients to prevent overcharging, so contact your ISP to verify if incoming connections are allowed. Here is the output from my <i>ifconfig</i>, that shows two active mobile data interfaces and sessions, one for IPv4 and second for IPv6:</p>
<pre>
gprs0     Link encap:UNSPEC  HWaddr *
          inet addr:10.10.9.14  P-t-P:10.10.9.14  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP  MTU:1400  Metric:1
          RX packets:1158 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1294 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10
          RX bytes:162582 (158.7 KiB)  TX bytes:139618 (136.3 KiB)

gprs1     Link encap:UNSPEC  HWaddr *
          inet6 addr: 2a02:840:beef:30::2/0 Scope:Global
          UP POINTOPOINT RUNNING NOARP  MTU:1400  Metric:1
          RX packets:73 errors:0 dropped:0 overruns:0 frame:0
          TX packets:66 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10
          RX bytes:8680 (8.4 KiB)  TX bytes:39414 (38.4 KiB)
</pre>
<p><span id="more-462"></span><br />
For Apache to run we have to first install the <a href="http://wiki.maemo.org/Easy_Debian">Easy Debian</a> package for N900, and after that the <i>libapache2-mod-php</i> package inside chrooted environment, which installs all required packages because of dependancies. Volia! We can verify that apache is listening on IPv6 interface by entering the following command:</p>
<pre>
[root@deb-m5v3d: /]netstat -tunlp | grep apache
tcp6     0    0    :::80    :::*      LISTEN   2009/apache2
[root@deb-m5v3d: /]
</pre>
<p>the <i>:::80</i> means we are listening on all IPv6 interfaces on port 80. Here are some screenshots, just apache showing the basic php info:<xmp><?php phpinfo(); ?></xmp></p>
<p>Server localhost:<br />
<img src="http://mihap.si/share/server_n900.png" style="max-width:600px"><br />
Client access to server:<br />
<img src="http://mihap.si/share/client_n900.png" style="width:600px;border:none"></p>
<p>All other apps should work also&#8230;</p>
<p>brm</p>
<div class="none"><div class="g-plusone" data-href="http://blog.mihap.si/apache-ipv6-umts-server-nokia-n900/" size="small" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.mihap.si/apache-ipv6-umts-server-nokia-n900/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Captcha with jQuery, ajax and php</title>
		<link>http://blog.mihap.si/captcha-with-jquery-ajax-and-php/</link>
		<comments>http://blog.mihap.si/captcha-with-jquery-ajax-and-php/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 21:26:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.mihap.si/?p=380</guid>
		<description><![CDATA[A while ago I came across this guide, as I was searching for some simple captcha implementation for some website. Plain and simple, all clear. The only thing I didn't like too much is the javascript part, for webpages I mainly use jQuery for javascripting, so I wanted to use jquery for ajax functions. Also, [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I came across <a href="http://www.webcheatsheet.com/PHP/create_captcha_protection.php">this  guide</a>, as I was searching for some simple captcha implementation for some website. Plain and simple, all clear. The only thing I didn't like too much is the javascript part, for webpages I mainly use <a href="http://jquery.com/">jQuery</a> for javascripting, so I wanted to use jquery for ajax functions. Also, including multiple inputs besides captcha code makes javscript more comeplex (please read the comments, near the end) nad that is where jquery comes in handy.</p>
<p>The simplest possible example you can find on <a href="http://mihap.si/share/captcha/">http://mihap.si/share/captcha/</a>.</p>
<p>What we need:</p>
<ul>
<li><a href="#html">HTML code and php image generation code</a></li>
<li><a href="#jquery">jQuery library and script</a></li>
<li><a href="#php">PHP page for input verification</a></li>
</ul>
<p><span id="more-380"></span></p>
<h3 name="html">1.) HTML code</h3>
<p>We will use the simplest html input form, besides captcha input we will also add additional name field to demonstrate multiple input posting. For PHP image generation I will use the code from <a href="http://www.webcheatsheet.com/PHP/create_captcha_protection.php">original guide</a>, as no modifications are made.</p>
<p>HTML code (index.html):</p>
<pre class="prettyprint">
<</>!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 

<</>html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<</>head>
	<</>title>Captcha test site</title>
	<</>meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<</>/head>

<</>body>

<</>!-- form -->
<</>form id="myform" method="post">
	Name:
	<</>input type="text" name="name"><</>br>
	Captch code:
	<</>input type="text" name="userinput"><</>br>
	Captcha image:
	<</>img class="captcha" src="captchacreate.php"><</>br>

	<</>input type="submit" value="Verify">
<</>/form>

<</>!-- result holder -->
<</>div class="result"><</>/div>

<</>/body>
<</>/html>
</pre>
<p>PHP image generation code (captchacreate.php):</p>
<pre class="prettyprint">
<</>?php
//Start the session so we can store what the security code actually is
session_start();

//Send a generated image to the browser
create_image();
exit(); 

function create_image()
{
    //Let's generate a totally random string using md5
    $md5_hash = md5(rand(0,999));
    //We don't need a 32 character long string so we trim it down to 5
    $security_code = substr($md5_hash, 15, 5); 

    //Set the session to store the security code
    $_SESSION["security_code"] = $security_code;

    //Set the image width and height
    $width = 100;
    $height = 22;  

    //Create the image resource
    $image = ImageCreate($width, $height);  

    //We are making three colors, white, black and gray
    $white = ImageColorAllocate($image, 255, 255, 255);
    $black = ImageColorAllocate($image, 0, 0, 0);
    $grey = ImageColorAllocate($image, 204, 204, 204); 

    //Make the background black
    ImageFill($image, 0, 0, $white); 

    //Add randomly generated string in white to the image
    ImageString($image, 3, 30, 3, $security_code, $black); 

    //Throw in some lines to make it a little bit harder for any bots to break
    ImageRectangle($image,0,0,$width-1,$height-1,$grey);
    imageline($image, 0, $height/2, $width, $height/2, $grey);
    imageline($image, $width/2, 0, $width/2, $height, $grey);
    //imageline($image, 0, 0, $width, $height, $grey);
    imageline($image, $width, 0, 0, $height, $grey); 

    //Tell the browser what kind of file is come in
    header("Content-Type: image/jpeg"); 

    //Output the newly created image in jpeg format
    ImageJpeg($image); 

    //Free up resources
    ImageDestroy($image);
}
?>
</pre>
<p>As you can see we create new session variable "security_code", into which we store the captcha code and display the created image on page. The same code must be entered through html user input form and then validated.</p>
<h3 name="jquery">2.) jQuery</h3>
<p>For jQuery source you can download the latest version on <a href="http://docs.jquery.com/Downloading_jQuery">download page</a>, or just include this link in index.html page header:</p>
<pre class="prettyprint">
<</>script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"><</>/script>
</pre>
<p>Now we have to tell jquery what to do with page &#8211; after the form with id myform is submitted, get all the variables, execute the ajax post function and in div result display the result of check.php function, into which we submit the entered variables. Also, we have to reload the image and reset the security_code:</p>
<pre class="prettyprint">
<</>script type="text/javascript">
$(document).ready(function()
{
$('#myform').submit(function() {
	//get user input and create random number
	var input = ($(this).serialize());
	var rand = Math.random();

	//submit post to check.php and reload image
	$.post('check.php', input, function(data) {
  		$('div.result').html(data);
  		$('img.captcha').attr("src", 'captchacreate.php?' + rand);
	});

	return false;
	});

return false;
});
<</>/script>
</pre>
<h3 name="php">3.) PHP verification code</h3>
<p>After the form is submitted, we have to check the user entered input against the security_code session variable. If all is ok, we display success and display the entered name &#8211; check.php:</p>
<pre class="prettyprint">
<</>?php
session_start();

//Check if the security code and the session value are not blank
//and if the input text matches the stored text
if ( ($_REQUEST["userinput"] == $_SESSION["security_code"]) &#038;&#038; (!empty($_REQUEST["userinput"]) &#038;&#038; !empty($_SESSION["security_code"])) ) {
	print '<</>h1>Input verification ok!<</>/h1>';
	print 'Welcome, '. $_REQUEST['name'];
}
else {
	print '<</>h1>Input verification failed!<</>/h1>';
}

?>
</pre>
<p>That is it. You can add more inputs as you like, checkboxes etc, no changes to jquery code is required as <a href="http://api.jquery.com/serialize/">.serialize()</a> function will take care of that. Of course the image generation is not good enough, php code must be enhanced to make it unreadable by computers, some hints are on <a href="http://www.webcheatsheet.com/PHP/create_captcha_protection.php#conclusion">original post</a>, you can also search the web for php image generation.</p>
<p>brm</p>
<div class="none"><div class="g-plusone" data-href="http://blog.mihap.si/captcha-with-jquery-ajax-and-php/" size="small" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.mihap.si/captcha-with-jquery-ajax-and-php/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

