<?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>a32.Blog &#187; I|T</title>
	<atom:link href="http://a32.me/category/it/feed/" rel="self" type="application/rss+xml" />
	<link>http://a32.me</link>
	<description>It&#039;s all about. IT and &#34;stuff&#34; :)</description>
	<lastBuildDate>Fri, 04 May 2012 07:14:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Google Apps as single authentication point for your corporate applications</title>
		<link>http://a32.me/2011/03/google-apps-as-single-authentication-point-for-your-corporate-applications/</link>
		<comments>http://a32.me/2011/03/google-apps-as-single-authentication-point-for-your-corporate-applications/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 08:34:55 +0000</pubDate>
		<dc:creator>Constantin Bosneaga</dc:creator>
				<category><![CDATA[I|T]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://a32.me/?p=789</guid>
		<description><![CDATA[This is an update to my post "Google Apps Premier federated login with PHP". Idea is simple, users do not like passwords, less passwords - less pain and more security. Nowadays many companies have gone cloud, which covers most needs, but leaves space for homegrown small applications, ideas, prototypes, etc. It is convenient to organize user login into these applications [...]]]></description>
			<content:encoded><![CDATA[<p>This is an update to my post "<a href="http://a32.me/2010/02/google-apps-premier-federated-login-with-php/" target="_self">Google Apps Premier federated login with PHP</a>". Idea is simple, users do not like passwords, less passwords - less pain and more security.</p>
<p>Nowadays many companies have gone cloud, which covers most needs, but leaves space for homegrown small applications, ideas, prototypes, etc. It is convenient to organize user login into these applications using already existing Google Apps login infrastructure.</p>
<p>This is about using it with PHP.</p>
<p><span id="more-789"></span><script type="text/javascript"><!--
google_ad_client = "ca-pub-4139588230521520";
/* Intest */
google_ad_slot = "1267310946";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<p>Since previous post, I've updated PHP library used to the latest versions and tested them again. Also I rewrite bundled example to work in more transparent way and made it more clear.</p>
<h3>Libraries version</h3>
<p>php-openid-apps-discover-1.0.2.zip<br />
openid-php-openid-2.2.2-0-ga287b2d.zip</p>
<h3>Online demo</h3>
<p><a href="http://a32.me/other/ga-open-id/">http://a32.me/other/ga-open-id/</a></p>
<h3>Downloads</h3>
<p><a href="http://a32.me/other/ga-open-id.tar.gz" target="_self">All-in-one-pack</a> includes libraries and example</p>
<h3>Installation</h3>
<p>Unpack, make sure make <strong>TMP folder with sub-folders are writable.</strong></p>
<h3>Example code</h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009933; font-style: italic;">/**
 * @date Created on Feb 22, 2011
 * @author		Constantin Bosneaga &lt;ameoba32@gmail.com&gt;
 * 
 */</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Include files</span>
<span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">&quot;Auth/OpenID/Consumer.php&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">&quot;Auth/OpenID/AX.php&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">&quot;Auth/OpenID/google_discovery.php&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">&quot;Auth/OpenID/FileStore.php&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">&quot;Auth/OpenID/SReg.php&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">&quot;Auth/OpenID/PAPE.php&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Init login</span>
<span style="color: #000088;">$tmp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">realpath</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #009900; font-weight: bold;">DIRECTORY_SEPARATOR</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;tmp&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">file_exists</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tmp</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Temp path '</span><span style="color: #339933;">.</span><span style="color: #000088;">$tmp</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' does not exists'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">is_writable</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tmp</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Temp path '</span><span style="color: #339933;">.</span><span style="color: #000088;">$tmp</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' is not writable'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tmp_path'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$tmp</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Return URL</span>
<span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'return_server'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;HTTPS&quot;</span><span style="color: #009900;">&#93;</span>?<span style="color: #0000ff;">'https://'</span><span style="color: #339933;">:</span><span style="color: #0000ff;">'http://'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SERVER_NAME'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SERVER_PORT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'return_url'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'return_server'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;?module=return&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Cache for google discovery (much faster)</span>
<span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cache'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> FileCache<span style="color: #009900;">&#40;</span><span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tmp_path'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Open id lib has many warnig and notices</span>
<span style="color: #990000;">error_reporting</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">E_ALL</span> ^ <span style="color: #009900; font-weight: bold;">E_NOTICE</span> ^ <span style="color: #009900; font-weight: bold;">E_WARNING</span> ^ <span style="color: #009900; font-weight: bold;">E_USER_NOTICE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$module</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'module'</span><span style="color: #009900;">&#93;</span>?<span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'module'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">:</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'module'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">switch</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$module</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * Login form
	 * 
	 * 
	 */</span>	
	<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">:</span>
	<span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;h1&gt;Login with Google Apps&lt;/h1&gt;
	&lt;form method=&quot;POST&quot;&gt;
	&lt;input type=&quot;hidden&quot; name=&quot;module&quot; value=&quot;login&quot;&gt;
	Your Google Apps domain:
	&lt;input type=&quot;text&quot; name=&quot;domain&quot; value=&quot;&quot;&gt;
	&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Login&quot;&gt;
	&lt;/form&gt;	
&nbsp;
	&lt;h1&gt;Login with Google&lt;/h1&gt;
	&lt;form method=&quot;POST&quot;&gt;
	&lt;input type=&quot;hidden&quot; name=&quot;module&quot; value=&quot;login&quot;&gt;
	&lt;input type=&quot;hidden&quot; name=&quot;domain&quot; value=&quot;https://www.google.com/accounts/o8/id&quot;&gt;
	&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Login&quot;&gt;
	&lt;/form&gt;
&nbsp;
	&lt;h1&gt;Login with Yahoo&lt;/h1&gt;
	&lt;form method=&quot;POST&quot;&gt;
	&lt;input type=&quot;hidden&quot; name=&quot;module&quot; value=&quot;login&quot;&gt;
	&lt;input type=&quot;hidden&quot; name=&quot;domain&quot; value=&quot;http://me.yahoo.com&quot;&gt;
	&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Login&quot;&gt;
	&lt;/form&gt;
		<span style="color: #000000; font-weight: bold;">&lt;?</span>	
	<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>	
&nbsp;
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * Process login 
	 */</span>
	<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'login'</span><span style="color: #339933;">:</span>
		<span style="color: #000088;">$store</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Auth_OpenID_FileStore<span style="color: #009900;">&#40;</span><span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tmp_path'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$consumer</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Auth_OpenID_Consumer<span style="color: #009900;">&#40;</span><span style="color: #000088;">$store</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">new</span> GApps_OpenID_Discovery<span style="color: #009900;">&#40;</span><span style="color: #000088;">$consumer</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cache'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		try <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$auth_request</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$consumer</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">begin</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'domain'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">is_object</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$auth_request</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Auth request object error. Try again'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span> catch <span style="color: #009900;">&#40;</span>Exception <span style="color: #000088;">$error</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$error</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/// Request additional parameters</span>
		<span style="color: #000088;">$ax</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Auth_OpenID_AX_FetchRequest<span style="color: #339933;">;</span>
		<span style="color: #000088;">$ax</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span> Auth_OpenID_AX_AttrInfo<span style="color: #339933;">::</span><span style="color: #004000;">make</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://axschema.org/contact/email'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'email'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$ax</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span> Auth_OpenID_AX_AttrInfo<span style="color: #339933;">::</span><span style="color: #004000;">make</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://axschema.org/namePerson/first'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'firstname'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$ax</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span> Auth_OpenID_AX_AttrInfo<span style="color: #339933;">::</span><span style="color: #004000;">make</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://axschema.org/namePerson/last'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'lastname'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$ax</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span> Auth_OpenID_AX_AttrInfo<span style="color: #339933;">::</span><span style="color: #004000;">make</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://axschema.org/namePerson/friendly'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'friendly'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$ax</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span> Auth_OpenID_AX_AttrInfo<span style="color: #339933;">::</span><span style="color: #004000;">make</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://axschema.org/namePerson'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'fullname'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$ax</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span> Auth_OpenID_AX_AttrInfo<span style="color: #339933;">::</span><span style="color: #004000;">make</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://axschema.org/birthDate'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'dob'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$ax</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span> Auth_OpenID_AX_AttrInfo<span style="color: #339933;">::</span><span style="color: #004000;">make</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://axschema.org/person/gender'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'gender'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$ax</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span> Auth_OpenID_AX_AttrInfo<span style="color: #339933;">::</span><span style="color: #004000;">make</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://axschema.org/contact/postalCode/home'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'postcode'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$ax</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span> Auth_OpenID_AX_AttrInfo<span style="color: #339933;">::</span><span style="color: #004000;">make</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://axschema.org/contact/country/home'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'country'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$ax</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span> Auth_OpenID_AX_AttrInfo<span style="color: #339933;">::</span><span style="color: #004000;">make</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://axschema.org/pref/language'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'language'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$ax</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span> Auth_OpenID_AX_AttrInfo<span style="color: #339933;">::</span><span style="color: #004000;">make</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://axschema.org/pref/timezone'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'timezone'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$auth_request</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addExtension</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ax</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Request URL for auth dialog url </span>
		<span style="color: #000088;">$redirect_url</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$auth_request</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">redirectURL</span><span style="color: #009900;">&#40;</span>
			<span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'return_server'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
			<span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'return_url'</span><span style="color: #009900;">&#93;</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>Auth_OpenID<span style="color: #339933;">::</span><span style="color: #004000;">isFailure</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$redirect_url</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Could not redirect to server: '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$redirect_url</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">message</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Location: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$redirect_url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>	
	<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * Return URL, google redirects here after login
	 */</span>
	<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'return'</span><span style="color: #339933;">:</span>
		<span style="color: #000088;">$store</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Auth_OpenID_FileStore<span style="color: #009900;">&#40;</span><span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tmp_path'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$consumer</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Auth_OpenID_Consumer<span style="color: #009900;">&#40;</span><span style="color: #000088;">$store</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">new</span> GApps_OpenID_Discovery<span style="color: #009900;">&#40;</span><span style="color: #000088;">$consumer</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cache'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$response</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$consumer</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">complete</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'return_url'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Check the response status.</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$response</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">status</span> <span style="color: #339933;">==</span> Auth_OpenID_CANCEL<span style="color: #009900;">&#41;</span> <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Verification cancelled.'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$response</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">status</span> <span style="color: #339933;">==</span> Auth_OpenID_FAILURE<span style="color: #009900;">&#41;</span> <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;OpenID authentication failed: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$response</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">message</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$response</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">status</span> <span style="color: #339933;">!=</span> Auth_OpenID_SUCCESS<span style="color: #009900;">&#41;</span> <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Other error'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Successful login</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Extract returned information</span>
		<span style="color: #000088;">$openid</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$response</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getDisplayIdentifier</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$ax</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Auth_OpenID_AX_FetchResponse<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$ax</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$ax</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ax</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fromSuccessResponse</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$response</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$sreg</span> <span style="color: #339933;">=</span> Auth_OpenID_SRegResponse<span style="color: #339933;">::</span><span style="color: #004000;">fromSuccessResponse</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$response</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$sreg</span> <span style="color: #009900;">&#41;</span> <span style="color: #000088;">$sreg</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$sreg</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">contents</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;"># print response
</span>		<span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;h1&gt;OK&lt;/h1&gt;
		You have successfully verified &lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$openid</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$openid</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt; as your identity.&lt;br/&gt;&lt;br/&gt;
		&lt;p&gt;The following AX response received:&lt;/p&gt;
		&lt;pre&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #990000;">nl2br</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ax</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/pre&gt;
&nbsp;
		&lt;p&gt;The following sreg response received:&lt;/p&gt;
		&lt;pre&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #990000;">nl2br</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sreg</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/pre&gt;
		<span style="color: #000000; font-weight: bold;">&lt;?</span>
	<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>	
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> FileCache <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$cache_file</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #000088;">$tmp_path</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">cache_file</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$tmp_path</span><span style="color: #339933;">.</span><span style="color: #009900; font-weight: bold;">DIRECTORY_SEPARATOR</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;google.tmp&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> get<span style="color: #009900;">&#40;</span><span style="color: #000088;">$name</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$cache</span> <span style="color: #339933;">=</span> <span style="color: #990000;">unserialize</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">cache_file</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$cache</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$name</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> set<span style="color: #009900;">&#40;</span><span style="color: #000088;">$name</span><span style="color: #339933;">,</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$cache</span> <span style="color: #339933;">=</span> <span style="color: #990000;">unserialize</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">cache_file</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$cache</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$name</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$value</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">file_put_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">cache_file</span><span style="color: #339933;">,</span> <span style="color: #990000;">serialize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cache</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;</pre></div></div>


				<div class="mr_social_sharing_wrapper">
				<!-- Social Sharing Toolkit v2.0.8 | http://www.active-bits.nl/support/social-sharing-toolkit/ --><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fa32.me%2F2011%2F03%2Fgoogle-apps-as-single-authentication-point-for-your-corporate-applications%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-url="http://a32.me/2011/03/google-apps-as-single-authentication-point-for-your-corporate-applications/" data-text="Google Apps as single authentication point for your corporate applications">Tweet</a></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://a32.me/2011/03/google-apps-as-single-authentication-point-for-your-corporate-applications/"></script></span><span class="mr_social_sharing"><a href="mailto:?subject=Google Apps as single authentication point for your corporate applications&amp;body=http://a32.me/2011/03/google-apps-as-single-authentication-point-for-your-corporate-applications/"><img src="http://a32.me/wp-content/plugins/social-sharing-toolkit/images/buttons/email.png" alt="Share via email" title="Share via email"/></a></span></div>]]></content:encoded>
			<wfw:commentRss>http://a32.me/2011/03/google-apps-as-single-authentication-point-for-your-corporate-applications/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Database isolation levels and their effects on performance</title>
		<link>http://a32.me/2011/02/database-isolation-levels-and-their-effects-on-performance/</link>
		<comments>http://a32.me/2011/02/database-isolation-levels-and-their-effects-on-performance/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 10:52:02 +0000</pubDate>
		<dc:creator>Constantin Bosneaga</dc:creator>
				<category><![CDATA[I|T]]></category>

		<guid isPermaLink="false">http://a32.me/?p=734</guid>
		<description><![CDATA[Some of us are not aware of the tremendous job databases perform, particularly their efforts to maintain the Isolation aspect of ACID. For example, some people believe that transactions are only related to data manipulation and not to queries, which is an incorrect assumption. Transaction Isolation is all about queries, and the consistency and completeness [...]]]></description>
			<content:encoded><![CDATA[<p>Some of us are not aware of the tremendous job databases perform, particularly their efforts to maintain the Isolation aspect of ACID. For example, some people believe that transactions are only related to data manipulation and not to queries, which is an incorrect assumption. Transaction Isolation is all about queries, and the consistency and completeness of the data retrieved by queries. This is how it works:</p>
<p><span id="more-734"></span></p>
<p>Isolation gives the querying user the feeling that he owns the database. It does not matter that hundreds or thousands of concurrent users work with the same database and the same schema (or even the same data). These other uses can generate new data, modify existing data or perform any other action. The querying user must be able to get a complete, consistent picture of the data, unaffected by other users’ actions.</p>
<p>Let’s take the following scenario, which is based on an Orders table that has 1,000,000 rows, with a disk size of 20 GB:</p>
<ol>
<li>8:00: UserA started a query “SELECT * FROM orders”, which queries all the rows of the table. In our scenario, this query usually takes approximately five minutes to complete, as the database must fully scan the table’s blocks from start to end and extract the rows. This is called a FULL TABLE SCAN query, and is not recommended from a performance perspective.</li>
<li>8:01: UserB updates the last row in the in the Orders table, and commits the change.</li>
<li>8:04: UserA’s query process arrives at the row modified by UserB. <strong>What will happen?</strong></li>
</ol>
<p>Any guess? Will UserA get the original row value or the new row value? The new row value is legitimate and committed, but it was updated after UserA’s query started.</p>
<p>The answer is not clear cut, and depends on the isolation level of the transaction. There are four isolation levels, as follows (see more information at: <a href="http://en.wikipedia.org/wiki/Isolation_(database_systems)">http://en.wikipedia.org/wiki/Isolation_(database_systems)</a>:</p>
<ol>
<li>READ UNCOMMITTED: <strong>UserA will see the change made by UserB.</strong> This isolation level is called <em>dirty reads</em>, which means that read data is not consistent with other parts of the table or the query, and may not yet have been committed. This isolation level ensures the quickest performance, as data is read directly from the table’s blocks with no further processing, verifications or any other validation. The process is quick and the data is as<em>dirty</em> as it can get.</li>
<li>READ COMMITTED: <strong>UserA will not see the change made by UserB.</strong> This is because in the READ COMMITTED isolation level, the rows returned by a query are the rows that were committed when the <strong>query</strong> was started. The change made by UserB was not present when the <strong>query</strong> started, and therefore will not be included in the query result.</li>
<li>REPEATABLE READ: <strong>UserA will not see the change made by UserB.</strong> This is because in the REPEATABLE READ isolation level, the rows returned by a query are the rows that were committed when the <strong>transaction</strong> was started. The change made by UserB was not present when the <strong>transaction</strong> was started, and therefore will not be included in the query result.This means that “<strong>All consistent reads within the same transaction read the snapshot established by the first read</strong>” (from MySQL documentation. See <a href="http://dev.mysql.com/doc/refman/5.1/en/innodb-consistent-read.html">http://dev.mysql.com/doc/refman/5.1/en/innodb-consistent-read.html</a>).</li>
<li>SERIALIZABLE: This isolation level specifies that all transactions occur in a completely isolated fashion, meaning as if all transactions in the system were executed serially, one after the other. The DBMS can execute two or more transactions at the same time only if the illusion of serial execution can be maintained.In practice, SERIALIZABLE is similar to REPEATABLE READ, but uses a different implementation for each database engine. In Oracle, the REPEATABLE READ level is not supported and SERIALIZABLE provides the highest isolation level. This level is similar to REPEATABLE READ, but InnoDB implicitly converts all plain SELECT statements to “SELECT … LOCK IN SHARE MODE.</li>
</ol>
<p>The default isolation level in MySQL’s InnoDB is REPEATABLE READ, which provides a rather high isolation. Consider again this key sentence for the REPEATABLE READ isolation level: “<strong>All consistent reads within the same transaction read the snapshot established by the first read</strong>”.</p>
<p>Since old values of row data are required for current queries, databases use a special segment to store old row values and snapshots. MySQL calls this segment a Rollback Segment. Oracle once called it this as well, but now calls it an Undo Segment. The premise is the same.</p>
<p>During query execution, each row is examined and if it is found to be <em>too new</em>, an older version of this row is extracted from the rollback segment to comprise the query result. This <em>examination‑lookup‑comprise</em> action chain takes time to complete, resulting in a performance penalty. It also produces a snowball effect. Updates occur during a query, which makes that query slower so that it takes more time. During the time it takes to process the query, more updates come in, making query execution time even longer!</p>
<p>This is why a query that executes in 10 seconds in our testing environment may take a full 10 minutes to execute in a much stronger production environment.</p>
<p>Author: Liran Zelkha</p>
<p>Source: http://highscalability.com/blog/2011/2/10/database-isolation-levels-and-their-effects-on-performance-a.html</p>
<p>You can read the entire post here</p>
<p>http://www.scalebase.com/isolation-levels-in-relational-databases/</p>

				<div class="mr_social_sharing_wrapper">
				<!-- Social Sharing Toolkit v2.0.8 | http://www.active-bits.nl/support/social-sharing-toolkit/ --><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fa32.me%2F2011%2F02%2Fdatabase-isolation-levels-and-their-effects-on-performance%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-url="http://a32.me/2011/02/database-isolation-levels-and-their-effects-on-performance/" data-text="Database isolation levels and their effects on performance">Tweet</a></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://a32.me/2011/02/database-isolation-levels-and-their-effects-on-performance/"></script></span><span class="mr_social_sharing"><a href="mailto:?subject=Database isolation levels and their effects on performance&amp;body=http://a32.me/2011/02/database-isolation-levels-and-their-effects-on-performance/"><img src="http://a32.me/wp-content/plugins/social-sharing-toolkit/images/buttons/email.png" alt="Share via email" title="Share via email"/></a></span></div>]]></content:encoded>
			<wfw:commentRss>http://a32.me/2011/02/database-isolation-levels-and-their-effects-on-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip how to manage files on mobile device</title>
		<link>http://a32.me/2010/12/tip-how-to-manage-files-on-mobile-device/</link>
		<comments>http://a32.me/2010/12/tip-how-to-manage-files-on-mobile-device/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 07:04:09 +0000</pubDate>
		<dc:creator>Constantin Bosneaga</dc:creator>
				<category><![CDATA[I|T]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://a32.me/?p=379</guid>
		<description><![CDATA[Ooops, do I have a backup of my files? Question is usually asked when it is too late (: Does anybody have a backup of files stored on mobile phone? What was the problem? I do not have any other copy of files stored on my mobile phone or PDA, I do not like this. [...]]]></description>
			<content:encoded><![CDATA[<p>Ooops, do I have a backup of my files? Question is usually asked when it is too late (: Does anybody have a backup of files stored on mobile phone?</p>
<p><span id="more-379"></span></p>
<h2>What was the problem?</h2>
<p>I do not have any other copy of files stored on my mobile phone or PDA, I do not like this. Mobile devices are tended to be lost, sink, squash, etc (: I hate to lose my music or book collection.</p>
<p>Second, each time I want to upload something useful to the device, I must find cable-which-is-always-not-here, connect it, etc..  Vice versa when file from mobile device are needed on the computer.</p>
<h2>The solution</h2>
<p>Bi-directional file sync. How it works? Easy</p>
<p>I have a local folder on my hard drive named after my device</p>
<pre><strong>d:\device\htc_tattoo</strong></pre>
<p>this folder contains exact copy of all file structure of mobile device. Since most devices allows them to be mounted like a USB flash drive it is easy to maintain.</p>
<p>File sync software compares this local folder with mounted mobile device and propagates any file or directory changed from left-to-right and from right-to-left, including new files, modified files and deleted files. It simple keeps my device and local folder locations in identical sync.</p>
<p>This way I can upload new files to the local folder and on the next sync they will be transferred to the mobile device, all at once. I can defer sync as much as I want if this is not urgent or do it immediately.</p>
<h2>Usage scenarios</h2>
<h3>Backup</h3>
<p>First, I have a backup copy of all my files. In case something happens to device I can upload all info once again to the new one.</p>
<h3>Podcasts</h3>
<p>I like listening podcasts. Unfortunately mine Nokia 3110 does not support RSS <img src='http://a32.me/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  with media attachments. Usually while browsing podcast RSS in Google Reader I save interesting podcasts to the local folder and it gets synced with mobile device. Even more, when I am done with podcast I delete it from mobile device and this deletion is propagated back to local folder on the PC.</p>
<h3>Music</h3>
<p>I fill up my music collection on the desktop, by downloading, converting, etc... On the next sync it is going to be on the device.</p>
<h3>Audio-books</h3>
<p>Usual source of these books is internet, and it is much more convenient to look for them on the desktop.</p>
<h3>Books</h3>
<p>I always get something interesting in FB2 on the Internet. Just drop into local folder.</p>
<h3>Photos</h3>
<p>All photos and videos taken by device camera are on my HD for browsing because of two way syncing.</p>
<h3 style="font-size: 1.17em;">Cleaning</h3>
<p>Remove old files, sort files and check space usage it much-much easier on the desktop computer.</p>
<p><strong>The Software</strong></p>
<p>I use GoodSync, it has nice GUI and very easy to use. It handles conflicts well, when file was modified on both ends. It creates additional _gsdata_ folder to help with more precise sync. It was free some time ago and I still old use v.7-2-9-5, Built: Jul 11 2008  17:06:18 which seems to be portable and survived several OS changes  :)</p>
<p>You may download newest version of official site <a href="http://www.goodsync.com/">http://www.goodsync.com/</a> it is only $30</p>
<div id="_mcePaste">You may also try <strong>unison</strong> open source command line sync.</div>
<div>Any other alternatives ? I am eager to hear something more modern, like Dropbox over 3g (:</div>

				<div class="mr_social_sharing_wrapper">
				<!-- Social Sharing Toolkit v2.0.8 | http://www.active-bits.nl/support/social-sharing-toolkit/ --><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fa32.me%2F2010%2F12%2Ftip-how-to-manage-files-on-mobile-device%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-url="http://a32.me/2010/12/tip-how-to-manage-files-on-mobile-device/" data-text="Tip how to manage files on mobile device">Tweet</a></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://a32.me/2010/12/tip-how-to-manage-files-on-mobile-device/"></script></span><span class="mr_social_sharing"><a href="mailto:?subject=Tip how to manage files on mobile device&amp;body=http://a32.me/2010/12/tip-how-to-manage-files-on-mobile-device/"><img src="http://a32.me/wp-content/plugins/social-sharing-toolkit/images/buttons/email.png" alt="Share via email" title="Share via email"/></a></span></div>]]></content:encoded>
			<wfw:commentRss>http://a32.me/2010/12/tip-how-to-manage-files-on-mobile-device/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Login simultaneously: incognito mode</title>
		<link>http://a32.me/2010/12/login-simultaneously-incognito-mode/</link>
		<comments>http://a32.me/2010/12/login-simultaneously-incognito-mode/#comments</comments>
		<pubDate>Mon, 06 Dec 2010 16:10:58 +0000</pubDate>
		<dc:creator>Constantin Bosneaga</dc:creator>
				<category><![CDATA[I|T]]></category>

		<guid isPermaLink="false">http://a32.me/?p=551</guid>
		<description><![CDATA[You may have heard about "incognito mode" in Google Chrome or "private-browsing" in Mozilla Firefox. In these modes browsers do not save anything to the hard drive, cache, cookies, etc. After exiting this mode all activity is cleaned up.  One interesting bonus you get of these features is login into different accounts at once. Personally [...]]]></description>
			<content:encoded><![CDATA[<p>You may have heard about "incognito mode" in Google Chrome or "private-browsing" in Mozilla Firefox. In these modes browsers do not save anything to the hard drive, cache, cookies, etc. After exiting this mode all activity is cleaned up.  One interesting bonus you get of these features is login into different accounts at once.</p>
<p><span id="more-551"></span>Personally I like Chrome behavior better, comparing to FF.  It just opens the new window allowing other tabs be active. My tip is more Chrome related.</p>
<div>In case you are already logged in into some account like Gmail, Dropbox, etc.. and want temporary to check other account on the same service, just open "Incognito window" do all stuff and close it again. Because cookies are separated you will be allowed to do so without logging out of current account.</div>
<p>This also is useful when needed to login into same web program as two users simultaneously (user and admin) while debugging or so.</p>
<p>With FireFox it is possible by create second account, see <a href="http://a32.me/2009/10/mozilla-firefox-user-profile/" target="_self">user profile</a></p>

				<div class="mr_social_sharing_wrapper">
				<!-- Social Sharing Toolkit v2.0.8 | http://www.active-bits.nl/support/social-sharing-toolkit/ --><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fa32.me%2F2010%2F12%2Flogin-simultaneously-incognito-mode%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-url="http://a32.me/2010/12/login-simultaneously-incognito-mode/" data-text="Login simultaneously: incognito mode">Tweet</a></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://a32.me/2010/12/login-simultaneously-incognito-mode/"></script></span><span class="mr_social_sharing"><a href="mailto:?subject=Login simultaneously: incognito mode&amp;body=http://a32.me/2010/12/login-simultaneously-incognito-mode/"><img src="http://a32.me/wp-content/plugins/social-sharing-toolkit/images/buttons/email.png" alt="Share via email" title="Share via email"/></a></span></div>]]></content:encoded>
			<wfw:commentRss>http://a32.me/2010/12/login-simultaneously-incognito-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Skype history: easy access, backup and search.</title>
		<link>http://a32.me/2010/09/skype-history-easy-access-backup-and-search/</link>
		<comments>http://a32.me/2010/09/skype-history-easy-access-backup-and-search/#comments</comments>
		<pubDate>Thu, 30 Sep 2010 17:00:15 +0000</pubDate>
		<dc:creator>Constantin Bosneaga</dc:creator>
				<category><![CDATA[I|T]]></category>

		<guid isPermaLink="false">http://a32.me/?p=589</guid>
		<description><![CDATA[People who use Skype store important information in Skype chat history, that is true, unfortunatly. How often you realise that important url,contact,login info, etc left on your work computer or even was formatted with last OS reinstall ?  There is a perfect solution to overcome this: and this solution is...Store important information outside Skype But, thats [...]]]></description>
			<content:encoded><![CDATA[<p>People who use Skype store important information in Skype chat history, that is true, unfortunatly. How often you realise that important url,contact,login info, etc left on your work computer or even was formatted with last OS reinstall ?  There is a perfect solution to overcome this:</p>
<p><span id="more-589"></span>and this solution is...Store important information outside Skype <img src='http://a32.me/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  But, thats not what I am talking about.</p>
<p>Some of Skype call recording software support <strong>brilliant feature</strong> to store call recording and <strong>chat session</strong> in GMail account! Thus make it possible to search through them using powerful Gmail search.</p>
<p>The winner is:</p>
<h2><strong>G-recorder</strong></h2>
<p style="text-align: left;"><strong> </strong>14-day trial for free, $25 for personal and $40 for corporate.<br />
Supports GMail and Google Apps. Upload chats and call records.<br />
<a href="http://www.g-recorder.com/usage.htm">http://www.g-recorder.com/usage.htm</a> for more info.</p>
<h2>Other related software</h2>
<p><strong>Piston. </strong>Saves chat messages too, never tried. $25. Visit <a href="http://www.pistonsoft.com/skype-recorder-russian.html">http://www.pistonsoft.com/skype-recorder.html</a></p>
<p><strong>Free call recording. </strong>Never tried, but seems to be free.<strong> </strong>Visit <a href="http://voipcallrecording.com/" target="_blank">http://voipcallrecording.com/</a></p>
<p><strong>Linux skype call recorder.</strong> Seems to work. Visit: <a href="http://atdot.ch/scr/download/">http://atdot.ch/scr/download/</a></p>

				<div class="mr_social_sharing_wrapper">
				<!-- Social Sharing Toolkit v2.0.8 | http://www.active-bits.nl/support/social-sharing-toolkit/ --><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fa32.me%2F2010%2F09%2Fskype-history-easy-access-backup-and-search%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-url="http://a32.me/2010/09/skype-history-easy-access-backup-and-search/" data-text="Skype history: easy access, backup and search.">Tweet</a></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://a32.me/2010/09/skype-history-easy-access-backup-and-search/"></script></span><span class="mr_social_sharing"><a href="mailto:?subject=Skype history: easy access, backup and search.&amp;body=http://a32.me/2010/09/skype-history-easy-access-backup-and-search/"><img src="http://a32.me/wp-content/plugins/social-sharing-toolkit/images/buttons/email.png" alt="Share via email" title="Share via email"/></a></span></div>]]></content:encoded>
			<wfw:commentRss>http://a32.me/2010/09/skype-history-easy-access-backup-and-search/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automated differential backup using 7zip for linux/windows</title>
		<link>http://a32.me/2010/08/7zip-differential-backup-linux-windows/</link>
		<comments>http://a32.me/2010/08/7zip-differential-backup-linux-windows/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 09:54:17 +0000</pubDate>
		<dc:creator>Constantin Bosneaga</dc:creator>
				<category><![CDATA[I|T]]></category>

		<guid isPermaLink="false">http://a32.me/?p=512</guid>
		<description><![CDATA[There are a lot of ways of doing differential backups, tons of software, freeware of shareware. I want to share one I didn't know about which I liked very much. It is unfair so little information can be found the Net about 7-zip archival tool, which can handle differential backups with ease.  Article is for [...]]]></description>
			<content:encoded><![CDATA[<p>There are a lot of ways of doing differential backups, tons of software, freeware of shareware. I want to share one I didn't know about which I liked very much. It is unfair so little information can be found the Net about <strong>7-zip</strong> archival tool, which can handle differential backups with ease.  Article is for CLI geeks, who understands where to push these commands )</p>
<p><span id="more-512"></span></p>
<h2>What are Differential and Incremental backups?</h2>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4139588230521520";
/* Intest */
google_ad_slot = "1267310946";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<h3>Incremental backup</h3>
<p>is a backup method in which multiple backups are kept (not just the last one). These backups will be incremental if each original piece of backed up information is stored only once, and then successive backups contain only the information that changed since a previous backup.</p>
<h3>Differential backup</h3>
<p>is a cumulative backup of <em>all</em> changes made since the last <em>full or normal</em> backup, i.e., the <em>differences</em> since the last full backup</p>
<p>I am talking about <strong> </strong><strong>Differential backup, </strong>which contains one FULL archive and several DIFFERENTIAL archives on different date each.</p>
<h2><strong>Using 7zip for automated backup</strong></h2>
<p>Is really great tool for archiving files. Linux and win32 platform support, crossplaform archiving, multi threading support.</p>
<h3>7zip installation</h3>
<ol>
<li>Windows, <a href="http://www.7-zip.org/download.html" target="_blank">download </a></li>
<li>Ubuntu: aptitude install p7zip</li>
</ol>
<h2><strong>7zip commands to create a backup of files</strong></h2>
<p>First step is to create<strong> full backup</strong> which is fairly easy:</p>
<blockquote>
<pre>7za a c:\archive.7z  c:\folder_to_archive</pre>
</blockquote>
<p>Next is to create <strong>differential backup</strong> with name diff1.7z</p>
<blockquote>
<pre>7za u c:\archive.7z  c:\folder_to_archive  -ms=off -mx=9 -t7z -u- -up0q3r2x2y2z0w2!c:\diff1.7z</pre>
</blockquote>
<ul>
<li>Where command switches stand for:</li>
<li>-mx=9 - best compression</li>
<li>-t7z - 7z archive type</li>
</ul>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4139588230521520";
/* Intest */
google_ad_slot = "1267310946";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<p><span class="Apple-style-span" style="font-size: 20px; font-weight: bold;"><strong>Wtf "-up0q3r2x2y2z0w2!c:\diff1.7z" is ?</strong></span></p>
<p><strong>Actions mask to </strong>determinite 7z behavior</p>
<blockquote>
<pre>p - File exists in archive, but is not matched with wildcard.</pre>
<pre>q - File exists in archive, but doesn't exist on disk.</pre>
<pre>r - File doesn't exist in archive, but exists on disk.</pre>
<pre>x - File in archive is newer than the file on disk.</pre>
<pre>y - File in archive is older than the file on disk.</pre>
<pre>z - File in archive is same as the file on disk</pre>
<pre>w - Can not be detected what file is newer (times are the same, sizes are different)</pre>
</blockquote>
<p>Number means action:</p>
<blockquote>
<pre>0	Ignore file (don't create item in new archive for this file)

1	Copy file (copy from old archive to new)

2	Compress (compress file from disk to new archive)

3	Create Anti-item (item that will delete file or directory during extracting). This feature is supported only in 7z format</pre>
</blockquote>
<p>More detailes on this switch here:</p>
<p><a href="http://www.bugaco.com/7zip/MANUAL/switches/update.htm">http://www.bugaco.com/7zip/MANUAL/switches/update.htm</a></p>
<h2>How to extract files from 7zip differential backup</h2>
<p>First step is to extract full backup  archive:</p>
<blockquote>
<pre>7za.exe x c:\archive.7z -oc:\recovery_path\</pre>
</blockquote>
<p>Next,  to extract needed differential  backup on top to the same folder</p>
<blockquote>
<pre>7za.exe x c:\archive.7z -aoa -y -oc:\recovery_path\</pre>
</blockquote>
<p>-aoa Overwrite All existing files without prompt.</p>
<p>-y (assume Yes on all queries) switch</p>
<p>After extraction destination folder will contain exact structure and files on date of backup!</p>
<h2>What is 7zip anti-item</h2>
<p>When creating differential archive 7zip matches files that have been deleted and creates <strong>anti-file entry</strong> which tells <strong>7zip</strong> extractor actually do delete file when overriding master archive. Thats why resulting recovery folder will look the same as on archiving stage.</p>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4139588230521520";
/* Intest */
google_ad_slot = "1267310946";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<h2>7zip backup limitations</h2>
<p>DO NOT USE the 7-zip format on Linux/Unix  for system backup purposes, because of <strong>7zip does not store the owner/group</strong> of the file.</p>
<p>On Linux/Unix, in order to backup directories you should use tar</p>
<p>to backup a directory</p>
<blockquote>
<pre>tar cf – directory | 7za a -si directory.tar.7z</pre>
</blockquote>
<p>to restore your backup :</p>
<blockquote>
<pre>7za x -so directory.tar.7z | tar</pre>
</blockquote>
<p>&nbsp;</p>

				<div class="mr_social_sharing_wrapper">
				<!-- Social Sharing Toolkit v2.0.8 | http://www.active-bits.nl/support/social-sharing-toolkit/ --><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fa32.me%2F2010%2F08%2F7zip-differential-backup-linux-windows%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-url="http://a32.me/2010/08/7zip-differential-backup-linux-windows/" data-text="Automated differential backup using 7zip for linux/windows">Tweet</a></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://a32.me/2010/08/7zip-differential-backup-linux-windows/"></script></span><span class="mr_social_sharing"><a href="mailto:?subject=Automated differential backup using 7zip for linux/windows&amp;body=http://a32.me/2010/08/7zip-differential-backup-linux-windows/"><img src="http://a32.me/wp-content/plugins/social-sharing-toolkit/images/buttons/email.png" alt="Share via email" title="Share via email"/></a></span></div>]]></content:encoded>
			<wfw:commentRss>http://a32.me/2010/08/7zip-differential-backup-linux-windows/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Catsone gmail integration plugin</title>
		<link>http://a32.me/2010/07/catsone-gmail-integration-plugin/</link>
		<comments>http://a32.me/2010/07/catsone-gmail-integration-plugin/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 13:47:12 +0000</pubDate>
		<dc:creator>Constantin Bosneaga</dc:creator>
				<category><![CDATA[I|T]]></category>

		<guid isPermaLink="false">http://a32.me/?p=491</guid>
		<description><![CDATA[http://catsone.com/ is great SaaS recruiting tool used by many companies. One of the HR manager operation is sorting emails received from candidates. To ensure smoothness of the process this emails should be added to CATS system, so other managers can see full candidate history. There is an outlook plugin for this purpose. Assuming outlook is [...]]]></description>
			<content:encoded><![CDATA[<p>http://catsone.com/ is great SaaS recruiting tool used by many companies. One of the HR manager operation is sorting emails received from candidates. To ensure smoothness of the process this emails should be added to CATS system, so other managers can see full candidate history.  There is an outlook plugin for this purpose. Assuming outlook is not in favor in our work place, I wrote GMail integration plugin.</p>
<p><span id="more-491"></span>It uses<a href="http://a32.me/2009/11/greasemonkey/" target="_self"> Greasmonkey </a> as an easy way to writing browser extenstions.</p>
<h2>Installation instruction</h2>
<p>1. Install Greasmonkey <a href="https://addons.mozilla.org/en-US/firefox/addon/748/" target="_blank">here</a> (FireFox restart is needed)</p>
<p>2. Install plugin <a href="http://userscripts.org/scripts/source/82047.user.js" target="_self">here</a></p>
<h3>Transation ID</h3>
<p>CATS uses transaction id for identifying users. Plugin will ask for it for the first time making API call to CATS. To change it later, use Greasemonkey menu:</p>
<p>1. Right mouse click on GM menu <a href="http://a32.me/wp-content/uploads/2010/07/cats01.jpg"><img title="cats01" src="http://a32.me/wp-content/uploads/2010/07/cats01.jpg" alt="" width="24" height="21" /></a></p>
<p>2. Select UserMenu</p>
<p><a href="http://a32.me/wp-content/uploads/2010/07/cats02.jpg"><img class="alignnone size-medium wp-image-502" title="cats02" src="http://a32.me/wp-content/uploads/2010/07/cats02-300x137.jpg" alt="" width="300" height="137" /></a></p>
<p>3. Enter new ID. Be sure to trim any spaces on the end.</p>
<p><a href="http://a32.me/wp-content/uploads/2010/07/cats03.jpg"><img class="alignnone size-medium wp-image-503" title="cats03" src="http://a32.me/wp-content/uploads/2010/07/cats03-300x125.jpg" alt="" width="300" height="125" /></a></p>
<h2>How does it look like ?</h2>
<p>While viewing any message, plugin embedds "Add to CATS" button. By pressing this button selected text or entire message will be opened for pre-editing and posting in new form.</p>
<p><a href="http://a32.me/wp-content/uploads/2010/07/cats041.jpg"><img class="alignnone size-full wp-image-508" title="cats04" src="http://a32.me/wp-content/uploads/2010/07/cats041.jpg" alt="" width="475" height="224" /></a></p>
<p>On the left there is a searching text box to look for candidate to add this email to. Once search is done, candidates are listed below search box, select one by clicking.</p>
<p>On the right form handles editing of email text for submitting.</p>
<p><a href="http://a32.me/wp-content/uploads/2010/07/cats05.jpg"><img class="alignnone size-full wp-image-509" title="cats05" src="http://a32.me/wp-content/uploads/2010/07/cats05.jpg" alt="" width="536" height="316" /></a></p>
<p>Plugin will ask for TransactionID if it was not entered before.</p>
<p>Links</p>
<ul>
<li><a title="http://userscripts.org/scripts/show/82047" href="http://userscripts.org/scripts/show/82047">http://userscripts.org/scripts/show/82047</a></li>
</ul>

				<div class="mr_social_sharing_wrapper">
				<!-- Social Sharing Toolkit v2.0.8 | http://www.active-bits.nl/support/social-sharing-toolkit/ --><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fa32.me%2F2010%2F07%2Fcatsone-gmail-integration-plugin%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-url="http://a32.me/2010/07/catsone-gmail-integration-plugin/" data-text="Catsone gmail integration plugin">Tweet</a></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://a32.me/2010/07/catsone-gmail-integration-plugin/"></script></span><span class="mr_social_sharing"><a href="mailto:?subject=Catsone gmail integration plugin&amp;body=http://a32.me/2010/07/catsone-gmail-integration-plugin/"><img src="http://a32.me/wp-content/plugins/social-sharing-toolkit/images/buttons/email.png" alt="Share via email" title="Share via email"/></a></span></div>]]></content:encoded>
			<wfw:commentRss>http://a32.me/2010/07/catsone-gmail-integration-plugin/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Google Apps Premier federated login with PHP</title>
		<link>http://a32.me/2010/02/google-apps-premier-federated-login-with-php/</link>
		<comments>http://a32.me/2010/02/google-apps-premier-federated-login-with-php/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 17:46:30 +0000</pubDate>
		<dc:creator>Constantin Bosneaga</dc:creator>
				<category><![CDATA[I|T]]></category>

		<guid isPermaLink="false">http://a32.me/?p=382</guid>
		<description><![CDATA[Google supports OpenID authentication or behaves as openid identity provider, using Google Apps accounts. Basically it means, user can use GA credentials to sign in into different services. This is especially useful for companies to unite other internal services with Google Apps single sign-in point. This is related to Standard edition as well. I have [...]]]></description>
			<content:encoded><![CDATA[<p>Google supports OpenID authentication or behaves as openid identity provider, using Google Apps accounts. Basically it means, user can use GA credentials to sign in into different services. This is especially useful for companies to unite other internal services with Google Apps single sign-in point. This is related to Standard edition as well.</p>
<p>I have got it working for PHP. Here is the story.</p>
<p><span id="more-382"></span>Having spent about 3 hours to get it work, I do not consider OpenID simple protocol that will conquer the Net soon. Why it shouldn't be as simple as adding Paypal payment to a site ?</p>
<p>Nevertheless, I make working sample. I used <a href="http://openidenabled.com/php-openid/" target="_blank">php-openid-2.1.3.zip</a> quite standard OpenId library and <a href="http://code.google.com/p/php-openid-apps-discovery/" target="_blank">php-openid-apps-discover.tar.gz</a> helper for Google Apps.</p>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4139588230521520";
/* Intest */
google_ad_slot = "1267310946";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<p>It does not need any installation, just make "tmp" directory writable. Do not test it using local apache, upload somewhere to the web.</p>
<p style="text-align: left;"><strong>Note: </strong>The Federated Login Service is disabled by default for Google Apps Premier and Education Editions. The domain admin can enable it from the Control Panel at http://www.google.com/a/cpanel/&lt;your-domain&gt;/SetupIdp.</p>
<p><a href="http://a32.me/other/ga-open-id/" target="_blank">Test here</a></p>
<p><a href="http://a32.me/other/ga-open-id.tar.gz" target="_self">Download library</a></p>
<p><strong>UPDATE!! Please look a <a href="http://a32.me/2011/03/google-apps-as-single-authentication-point-for-your-corporate-applications/" target="_self">this post</a> for an updated libraries and example code</strong></p>
<p><strong><span style="color: #ffffff;">.</span></strong></p>

				<div class="mr_social_sharing_wrapper">
				<!-- Social Sharing Toolkit v2.0.8 | http://www.active-bits.nl/support/social-sharing-toolkit/ --><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fa32.me%2F2010%2F02%2Fgoogle-apps-premier-federated-login-with-php%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-url="http://a32.me/2010/02/google-apps-premier-federated-login-with-php/" data-text="Google Apps Premier federated login with PHP">Tweet</a></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://a32.me/2010/02/google-apps-premier-federated-login-with-php/"></script></span><span class="mr_social_sharing"><a href="mailto:?subject=Google Apps Premier federated login with PHP&amp;body=http://a32.me/2010/02/google-apps-premier-federated-login-with-php/"><img src="http://a32.me/wp-content/plugins/social-sharing-toolkit/images/buttons/email.png" alt="Share via email" title="Share via email"/></a></span></div>]]></content:encoded>
			<wfw:commentRss>http://a32.me/2010/02/google-apps-premier-federated-login-with-php/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>SOCKS proxy server with SSH</title>
		<link>http://a32.me/2009/11/ssh-dynamic-port-forwarding-proxy/</link>
		<comments>http://a32.me/2009/11/ssh-dynamic-port-forwarding-proxy/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 18:07:16 +0000</pubDate>
		<dc:creator>Constantin Bosneaga</dc:creator>
				<category><![CDATA[I|T]]></category>

		<guid isPermaLink="false">http://a32.me/?p=274</guid>
		<description><![CDATA[SSH protocol and openssh are full of features. It is not just remote terminal program. You probably know about static port forwarding, local and remote. It allows to map local port to any host via SSH gateway or map incoming port on SSH gateway to local one. It is very useful in some situations. But [...]]]></description>
			<content:encoded><![CDATA[<p>SSH protocol and openssh are full of features. It is not just remote terminal program.</p>
<p>You probably know about static port forwarding, local and remote. It allows to map local port to any host via SSH gateway or map incoming port on SSH gateway to local one. It is very useful in some situations. But what is dynamic port forwarding ?</p>
<p><span id="more-274"></span>Dynamic port forwarding allows you to initiate connections on Behalf-Of SSH gateway, using any port.</p>
<p>This is done through emulating SOCKS proxy server on local side. See the picture:</p>
<p><a href="http://a32.me/wp-content/uploads/2009/11/ssh_socks.jpg"><img class="alignnone size-full wp-image-277" title="ssh_socks" src="http://a32.me/wp-content/uploads/2009/11/ssh_socks.jpg" alt="ssh_socks" width="295" height="175" /></a></p>
<p>SSH client(putty) opens local port and starts SOCKS proxy server on it.</p>
<p>Putty configuarion</p>
<p><a href="http://a32.me/wp-content/uploads/2009/11/ssh_socks3.jpg"><img class="alignnone size-full wp-image-280" title="ssh_socks3" src="http://a32.me/wp-content/uploads/2009/11/ssh_socks3.jpg" alt="ssh_socks3" width="456" height="436" /></a></p>
<p>–</p>
<p>After every application that supports socks proxy can use it. Just configure your browser to use local SOCKS proxy and voila.</p>
<p><a href="http://a32.me/wp-content/uploads/2009/11/ssh_socks2.jpg"><img class="alignnone size-full wp-image-279" title="ssh_socks2" src="http://a32.me/wp-content/uploads/2009/11/ssh_socks2.jpg" alt="ssh_socks2" width="451" height="452" /></a></p>
<p>Possible usages:</p>
<ul>
<li>Access to intranet sites from internet via ssh gateway</li>
<li>Temporary changing of your IP to visit sites</li>
<li>Access to server localhost services like apache status</li>
</ul>

				<div class="mr_social_sharing_wrapper">
				<!-- Social Sharing Toolkit v2.0.8 | http://www.active-bits.nl/support/social-sharing-toolkit/ --><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fa32.me%2F2009%2F11%2Fssh-dynamic-port-forwarding-proxy%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-url="http://a32.me/2009/11/ssh-dynamic-port-forwarding-proxy/" data-text="SOCKS proxy server with SSH">Tweet</a></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://a32.me/2009/11/ssh-dynamic-port-forwarding-proxy/"></script></span><span class="mr_social_sharing"><a href="mailto:?subject=SOCKS proxy server with SSH&amp;body=http://a32.me/2009/11/ssh-dynamic-port-forwarding-proxy/"><img src="http://a32.me/wp-content/plugins/social-sharing-toolkit/images/buttons/email.png" alt="Share via email" title="Share via email"/></a></span></div>]]></content:encoded>
			<wfw:commentRss>http://a32.me/2009/11/ssh-dynamic-port-forwarding-proxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SPDY &#8211; new revolution from Google ?</title>
		<link>http://a32.me/2009/11/spdy-new-revolution-from-google/</link>
		<comments>http://a32.me/2009/11/spdy-new-revolution-from-google/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 16:46:14 +0000</pubDate>
		<dc:creator>Constantin Bosneaga</dc:creator>
				<category><![CDATA[I|T]]></category>

		<guid isPermaLink="false">http://a32.me/?p=199</guid>
		<description><![CDATA[Recently, everybody heard the latest news from Google about new protocol which can speedup and make more comfortable internet surfing. If not, better to read official white paper.  It is called "SPDY", another endless attempt to fix this world. But will Google make something that won't have big chances to succeed ? I did not [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, everybody heard the latest news from Google about new protocol which can speedup and make more comfortable internet surfing.</p>
<p>If not, better to read <a href="http://sites.google.com/a/chromium.org/dev/spdy/spdy-whitepaper" target="_blank">official white paper</a>.  It is called "SPDY", another endless attempt to fix this world.</p>
<p>But will Google make something that won't have big chances to succeed ? I did not think so.</p>
<p>This protocol affect server side(web server) and client side(browser). To deploy it well both parts need to be changed. That is almost impossible in Internet reality. Many improvements to Internet were developed recently, including ones to improve email, fighting spam, etc... Where are they ? Penetration is not more than 5-10%.</p>
<p>Think again about Google.</p>
<p>They have their own browser, which is not so poplar as other leaders, but it is well designed, stable, fast and gained his part or market. For sure Google will add support of this protocol for their Google Chrome browser. It is matter of several months.</p>
<p>Do not forget, Google is biggest content/service provider on the net, that means - all web servers are under their control. Sure they will add support of SPDY to web server part.</p>
<p>Very soon, users who use Google Chrome and Google Mail|Docs|Wave services will experience much better performance of these apps. Even now I prefer Chrome for Gmail and Docs. This will lead to increased popularity of Chrome.</p>
<p>Will Mozilla stay aside ? I don't think so. Will Apache stay aside ? I don't think so.</p>
<p>Google+Mozilla+Apache and revolution is almost over.</p>
<p>Links</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/SPDY" target="_blank">http://en.wikipedia.org/wiki/SPDY</a></li>
</ul>

				<div class="mr_social_sharing_wrapper">
				<!-- Social Sharing Toolkit v2.0.8 | http://www.active-bits.nl/support/social-sharing-toolkit/ --><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fa32.me%2F2009%2F11%2Fspdy-new-revolution-from-google%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-url="http://a32.me/2009/11/spdy-new-revolution-from-google/" data-text="SPDY – new revolution from Google ?">Tweet</a></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://a32.me/2009/11/spdy-new-revolution-from-google/"></script></span><span class="mr_social_sharing"><a href="mailto:?subject=SPDY – new revolution from Google ?&amp;body=http://a32.me/2009/11/spdy-new-revolution-from-google/"><img src="http://a32.me/wp-content/plugins/social-sharing-toolkit/images/buttons/email.png" alt="Share via email" title="Share via email"/></a></span></div>]]></content:encoded>
			<wfw:commentRss>http://a32.me/2009/11/spdy-new-revolution-from-google/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

