<?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"
	>

<channel>
	<title>musc@> $daniele.rant &#124; Out-Blog &#187; Coding</title>
	<atom:link href="http://www.muscetta.com/category/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.muscetta.com</link>
	<description>Superior Dedication - Specialization is bullshit.</description>
	<pubDate>Tue, 26 Aug 2008 16:55:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Backup or Store stuff to GMail via IMAP in Ruby</title>
		<link>http://www.muscetta.com/2008/06/10/backup-or-store-stuff-to-gmail-via-imap-in-ruby/</link>
		<comments>http://www.muscetta.com/2008/06/10/backup-or-store-stuff-to-gmail-via-imap-in-ruby/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 18:49:44 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Post]]></category>

		<category><![CDATA[GMail]]></category>

		<category><![CDATA[Google]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[Ruby]]></category>

		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/?p=279</guid>
		<description><![CDATA[Once upon a time, I used to store some automated small backups into GMail just by having the scheduled backup send an email to my GMail account. At one stage they blocked me from doing so, marking those repeated email as SPAM.
After that, I took a different approach: I kept sending the mail on the [...]]]></description>
			<content:encoded><![CDATA[<p>Once upon a time, I used to store some automated <b>small</b> backups into GMail just by having the scheduled backup send an email to my GMail account. <a href="http://www.muscetta.com/2006/10/07/google-has-pissed-me-off-this-week/">At one stage they blocked me from doing so, marking those repeated email as SPAM</a>.</p>
<p>After that, I took a different approach: I kept sending the mail on the SAME server as the backup, and using IMAP I could DRAG-and-DROP the backup attachment from the mailbox on one server to the mailbox on another server (=GMail). They did not mark me as a spammer that way, of course.<br />
So that worked for a while, but then I got tired of doing this manually.</p>
<p>So the following ruby script is the way I automated the &#034;move offsite&#034; part of that backup.<br />
For completeness, I will give the due credits about who set me on the right track: I started off by <a href="http://wonko.com/post/ruby_script_to_sync_email_from_any_imap_server_to_gmail">this example by Ryan</a>.</p>
<pre><span class="comment">#!/usr/bin/env ruby</span>
<span class="ident">begin_</span> <span class="punct">=</span> <span class="constant">Time</span><span class="punct">.</span><span class="ident">now</span>

<span class="comment">#includes</span>
<span class="ident">require</span> <span class="punct">'</span><span class="string">net/imap</span><span class="punct">'</span>

<span class="comment">##Source Info</span>
<span class="global">$SRCSERVER</span><span class="punct">="</span><span class="string">mail.muscetta.com</span><span class="punct">"</span>
<span class="global">$SRCPORT</span><span class="punct">=</span><span class="number">143</span>
<span class="global">$SRCSSL</span><span class="punct">=</span><span class="constant">false</span>
<span class="global">$SRCUSERNAME</span><span class="punct">="</span><span class="string">daniele</span><span class="punct">"</span>
<span class="global">$SRCPASSWORD</span><span class="punct">="</span><span class="punct">"</span>
<span class="global">$SRCFOLDER</span><span class="punct">="</span><span class="string">INBOX.Backups</span><span class="punct">"</span>

<span class="comment">##Destination Info</span>
<span class="global">$DSTSERVER</span><span class="punct">="</span><span class="string">imap.gmail.com</span><span class="punct">"</span>
<span class="global">$DSTPORT</span><span class="punct">=</span><span class="number">993</span>
<span class="global">$DSTSSL</span><span class="punct">=</span><span class="constant">true</span>
<span class="global">$DSTUSERNAME</span><span class="punct">="</span><span class="string">muscetta@gmail.com</span><span class="punct">"</span>
<span class="global">$DSTPASSWORD</span><span class="punct">="</span><span class="punct">"</span>
<span class="global">$DSTFOLDER</span><span class="punct">="</span><span class="string">Backup</span><span class="punct">"</span>

<span class="comment">#connect to source</span>
<span class="ident">puts</span> <span class="punct">"</span><span class="string">connecting to source server <span class="expr">#{$SRCSERVER}</span>... <span class="escape">\n\n</span></span><span class="punct">"</span>
<span class="ident">srcimap</span> <span class="punct">=</span> <span class="constant">Net</span><span class="punct">::</span><span class="constant">IMAP</span><span class="punct">.</span><span class="ident">new</span><span class="punct">(</span><span class="global">$SRCSERVER</span><span class="punct">,</span><span class="global">$SRCPORT</span><span class="punct">,</span><span class="global">$SRCSSL</span><span class="punct">)</span>
<span class="ident">srcimap</span><span class="punct">.</span><span class="ident">login</span><span class="punct">(</span><span class="global">$SRCUSERNAME</span><span class="punct">,</span> <span class="global">$SRCPASSWORD</span><span class="punct">)</span>
<span class="ident">srcimap</span><span class="punct">.</span><span class="ident">select</span><span class="punct">(</span><span class="global">$SRCFOLDER</span><span class="punct">)</span>

<span class="comment">#connect to destination</span>
<span class="ident">puts</span> <span class="punct">"</span><span class="string">connecting to destination server <span class="expr">#{$DSTSERVER}</span>... <span class="escape">\n\n</span></span><span class="punct">"</span>
<span class="ident">dstimap</span> <span class="punct">=</span> <span class="constant">Net</span><span class="punct">::</span><span class="constant">IMAP</span><span class="punct">.</span><span class="ident">new</span><span class="punct">(</span><span class="global">$DSTSERVER</span><span class="punct">,</span><span class="global">$DSTPORT</span><span class="punct">,</span><span class="global">$DSTSSL</span><span class="punct">)</span>
<span class="ident">dstimap</span><span class="punct">.</span><span class="ident">login</span><span class="punct">(</span><span class="global">$DSTUSERNAME</span><span class="punct">,</span> <span class="global">$DSTPASSWORD</span><span class="punct">)</span>
<span class="ident">dstimap</span><span class="punct">.</span><span class="ident">select</span><span class="punct">(</span><span class="global">$DSTFOLDER</span><span class="punct">)</span>

<span class="comment"># Loop through all messages in the source folder.</span>
<span class="ident">uids</span> <span class="punct">=</span> <span class="ident">srcimap</span><span class="punct">.</span><span class="ident">uid_search</span><span class="punct">(['</span><span class="string">ALL</span><span class="punct">'])</span>
<span class="keyword">if</span> <span class="ident">uids</span><span class="punct">.</span><span class="ident">length</span> <span class="punct">&gt;</span> <span class="number">0</span>
	<span class="global">$count</span> <span class="punct">=</span> <span class="ident">uids</span><span class="punct">.</span><span class="ident">length</span>
	<span class="ident">puts</span> <span class="punct">"</span><span class="string">found <span class="expr">#{$count}</span> messages to move... <span class="escape">\n\n</span></span><span class="punct">"</span>

	<span class="ident">srcimap</span><span class="punct">.</span><span class="ident">uid_fetch</span><span class="punct">(</span><span class="ident">uids</span><span class="punct">,</span> <span class="punct">['</span><span class="string">ENVELOPE</span><span class="punct">']).</span><span class="ident">each</span> <span class="keyword">do</span> <span class="punct">|</span><span class="ident">data</span><span class="punct">|</span>
		<span class="ident">mid</span> <span class="punct">=</span> <span class="ident">data</span><span class="punct">.</span><span class="ident">attr</span><span class="punct">['</span><span class="string">ENVELOPE</span><span class="punct">'].</span><span class="ident">message_id</span>

		<span class="comment"># Download the full message body from the source folder.</span>
		<span class="ident">puts</span> <span class="punct">"</span><span class="string">reading message... <span class="expr">#{mid}</span></span><span class="punct">"</span>
		<span class="ident">msg</span> <span class="punct">=</span> <span class="ident">srcimap</span><span class="punct">.</span><span class="ident">uid_fetch</span><span class="punct">(</span><span class="ident">data</span><span class="punct">.</span><span class="ident">attr</span><span class="punct">['</span><span class="string">UID</span><span class="punct">'],</span> <span class="punct">['</span><span class="string">RFC822</span><span class="punct">',</span> <span class="punct">'</span><span class="string">FLAGS</span><span class="punct">',</span> <span class="punct">'</span><span class="string">INTERNALDATE</span><span class="punct">']).</span><span class="ident">first</span>

		<span class="comment"># Append the message to the destination folder, preserving flags and internal timestamp.</span>
		<span class="ident">puts</span> <span class="punct">"</span><span class="string">copying message <span class="expr">#{mid}</span> to destination...</span><span class="punct">"</span>
		<span class="ident">dstimap</span><span class="punct">.</span><span class="ident">append</span><span class="punct">(</span><span class="global">$DSTFOLDER</span><span class="punct">,</span> <span class="ident">msg</span><span class="punct">.</span><span class="ident">attr</span><span class="punct">['</span><span class="string">RFC822</span><span class="punct">'],</span> <span class="ident">msg</span><span class="punct">.</span><span class="ident">attr</span><span class="punct">['</span><span class="string">FLAGS</span><span class="punct">'],</span> <span class="ident">msg</span><span class="punct">.</span><span class="ident">attr</span><span class="punct">['</span><span class="string">INTERNALDATE</span><span class="punct">'])</span>

		<span class="comment">#delete the msg</span>
		<span class="ident">puts</span> <span class="punct">"</span><span class="string">deleting messsage <span class="expr">#{mid}</span>...</span><span class="punct">"</span>
		<span class="ident">srcimap</span><span class="punct">.</span><span class="ident">uid_store</span><span class="punct">(</span><span class="ident">data</span><span class="punct">.</span><span class="ident">attr</span><span class="punct">['</span><span class="string">UID</span><span class="punct">'],</span> <span class="punct">'</span><span class="string">+FLAGS</span><span class="punct">',</span> <span class="punct">[</span><span class="symbol">:Deleted</span><span class="punct">])</span>
		<span class="ident">srcimap</span><span class="punct">.</span><span class="ident">expunge</span>

	<span class="keyword">end</span>

	<span class="comment">#disconnect</span>
	<span class="ident">dstimap</span><span class="punct">.</span><span class="ident">close</span>
	<span class="ident">srcimap</span><span class="punct">.</span><span class="ident">close</span>
<span class="keyword">end</span>

<span class="ident">total_time</span> <span class="punct">=</span> <span class="constant">Time</span><span class="punct">.</span><span class="ident">now</span> <span class="punct">-</span> <span class="ident">begin_</span>
<span class="ident">puts</span> <span class="punct">"</span><span class="string">Done. RunTime: <span class="expr">#{total_time}</span> sec. <span class="escape">\n\n</span></span><span class="punct">"</span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2008/06/10/backup-or-store-stuff-to-gmail-via-imap-in-ruby/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CentOS 5 Management Pack for OpsMgr SCX</title>
		<link>http://www.muscetta.com/2008/05/13/centos-5-management-pack-for-opsmgr-scx/</link>
		<comments>http://www.muscetta.com/2008/05/13/centos-5-management-pack-for-opsmgr-scx/#comments</comments>
		<pubDate>Tue, 13 May 2008 09:43:07 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[MOM]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[OpsMgr2007]]></category>

		<category><![CDATA[System Center Operations Manager 2007]]></category>

		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/?p=277</guid>
		<description><![CDATA[As I mentioned here, I have been testing the SCX beta.
Not having one of the &#034;supported&#034; platforms pushed me into playing with the provided Management Packs, and in turn I managed to use the MP for Red Hat Enterprise Linux 5 as a base, and replaced a couple of strings in the discoveries in order [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.muscetta.com/2008/05/04/testing-system-center-cross-plaform-extentions">As I mentioned here</a>, I have been testing the <a href="http://blogs.msdn.com/scxplat/">SCX</a> beta.</p>
<p>Not having one of the &#034;supported&#034; platforms pushed me into playing with the provided Management Packs, and in turn I managed to use the MP for Red Hat Enterprise Linux 5 as a base, and replaced a couple of strings in the discoveries in order to get a working <a href="http://www.centos.org">CentOS</a> 5 Management Pack.</p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" src="http://www.muscetta.com/wp-content/uploads/centos-healthexplorer01-new.jpg" border="0" alt="CentOS_HealthExplorer01_NEW" width="997" height="681" /></p>
<p>I still have not looked into the &#034;hardware&#034; monitors and health model / service model, so those are not currently monitored. But it is a start.</p>
<p>A lot of people have asked me a lot of information and would like to get the file - both in the blog&#039;s comment, on the newsgroup, or via mail. I am sorry, but I cannot provide you with the file, because it has not been throughly tested and might render your systems unstable, and also because there might be licensing and copyright issues that I have not checked within Microsoft.</p>
<p>Keep also in mind that using CentOS as a monitored platform <strong>is NOT a SUPPORTED scenario/platform for SCX</strong>. I only used it because I did not have a Suse or Redhat handy that day, and because I wanted to understand how the Management Packs using WS-Man worked.</p>
<p>This said, should you wish to try to do the same &#034;MP Hacking&#034; I did,  <a href="http://www.muscetta.com/2008/05/04/testing-system-center-cross-plaform-extentions/">I pretty much explained all you need to know in my previous post and its comments</a>, so that should not be that difficult.</p>
<p>Actually, I still think that the best way to figure out how things are done is by looking at the actual implementation, so I encourage you to look at the management packs and figure out how those work. There are a few mature tools out there that will help you author/edit Management Packs if you don&#039;t want to edit the XML directly: the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=6c8911c3-c495-4a03-96df-9731c37aa6d7&amp;DisplayLang=en">Authoring Console</a>, and <a href="http://www.silect.com/solutions/opsmgr_Sol/opsmgr_Sol_studio2007_Lite.html">Silect MP Studio Lite</a>, for example. If you want to delve in the XML details, instead, then I suggest you read the <a href="http://download.microsoft.com/download/7/4/d/74deff5e-449f-4a6b-91dd-ffbc117869a2/OM2007_AuthGuide.doc">Authoring Guide</a> and peek at <a href="http://www.authormps.com/">Steve Wilson&#039;s AuthorMPs.com site</a>.</p>
<p><strong>Disclaimer<br />
</strong>The information in this weblog is provided &#034;AS IS&#034; with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my own personal opinion. All code samples are provided &#034;AS IS&#034; without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.<br />
THIS WORK IS NOT ENDORSED AND NOT EVEN CHECKED, AUTHORIZED, SCRUTINIZED NOR APPROVED BY MY EMPLOYER, AND IT ONLY REPRESENT SOMETHING WHICH I&#039;VE DONE IN MY FREE TIME. NO GUARANTEE WHATSOEVER IS GIVEN ON THIS. THE AUTHOR SHALL NOT BE MADE RESPONSIBLE FOR ANY DAMAGE YOU MIGHT INCUR WHEN USING THIS PROGRAM.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2008/05/13/centos-5-management-pack-for-opsmgr-scx/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Popfly Virtual Earth Mashup on Moonlight</title>
		<link>http://www.muscetta.com/2008/04/12/popfly-virtual-earth-mashup-on-moonlight/</link>
		<comments>http://www.muscetta.com/2008/04/12/popfly-virtual-earth-mashup-on-moonlight/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 08:44:02 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[Cross Post]]></category>

		<category><![CDATA[Integration]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[Links]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[dotNet]]></category>

		<category><![CDATA[popfly]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2008/04/12/popfly-virtual-earth-mashup-on-moonlight/</guid>
		<description><![CDATA[


Installed moonlight on Ubuntu from source by following these instructions (there are some typo&#039;s but they are understandable and correctable).
All in all, even being still under heavy development, what Miguel de Icaza has achieved (with moonlight, just like with mono) is amazing.
After I posted the above picture on Flickr, John Montgomery was amazed to see [...]]]></description>
			<content:encoded><![CDATA[<div class="flickr-frame"><a title="photo sharing" href="http://www.flickr.com/photos/dani3l3/2401024181/"><img class="flickr-photo" src="http://farm3.static.flickr.com/2215/2401024181_d9b74faf81.jpg" alt="Popfly Virtual Earth Mashup on Moonlight" /></a></p>
<p><span class="flickr-caption"><a href="http://www.flickr.com/photos/dani3l3/2401024181/"></a></span></p>
</div>
<p class="flickr-yourcomment">Installed <a href="http://go-mono.org/moonlight">moonlight</a> on Ubuntu from source by following <a href="http://www.nino-net.org/2008/02/29/moon-use-silverlight-plugin-in-ubuntu-710">these instructions</a> (there are some typo&#039;s but they are understandable and correctable).</p>
<p>All in all, even being still under heavy development, what Miguel de Icaza has achieved (with moonlight, just like with <a href="http://go-mono.org">mono</a>) is amazing.</p>
<p>After I posted the above picture on Flickr, John Montgomery was amazed to see <a href="http://www.popfly.com/">PopFly</a> (his creature) working on moonlight, and <a href="http://blogs.msdn.com/johnmont/archive/2008/04/11/popfly-on-moonlight.aspx">he linked to me from his blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2008/04/12/popfly-virtual-earth-mashup-on-moonlight/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Looking at OpsMgr2007 Alert trend with Command Shell</title>
		<link>http://www.muscetta.com/2008/01/25/looking-at-opsmgr2007-alert-trend-with-command-shell/</link>
		<comments>http://www.muscetta.com/2008/01/25/looking-at-opsmgr2007-alert-trend-with-command-shell/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 20:01:02 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Coding]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[MOM]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[OpsMgr2007]]></category>

		<category><![CDATA[PowerShell]]></category>

		<category><![CDATA[System Center Operations Manager 2007]]></category>

		<category><![CDATA[Tools]]></category>

		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2008/01/25/looking-at-opsmgr2007-alert-trend-with-command-shell/</guid>
		<description><![CDATA[It&#039;s friday night, I am quite tired and I can&#039;t be asked of writing a long post. But I have not written much all week, not even updated my Twitter, and now I want to finish the week with at least some goodies. So this is the turn of a couple of Powershell commands/snippets/scripts that [...]]]></description>
			<content:encoded><![CDATA[<p>It&#039;s friday night, I am quite tired and I can&#039;t be asked of writing a long post. But I have not written much all week, not even updated my Twitter, and now I want to finish the week with at least some goodies. So this is the turn of a couple of <a href="http://www.microsoft.com/powershell">Powershell</a> commands/snippets/scripts that will count alerts and events generated each day: this information could help you understand the trends of events and alerts over time in a Management Group. It is nothing fancy at all, but they can still be useful to someone out there. In the past (MOM 2005) I used to gather this kind of information with SQL Queries against the operations database. But now, with Powershell, everything is exposed as objects and it is much easier to get information without really getting your hands dirty with the database <img src='http://www.muscetta.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>#Number of Alerts per day</strong></p>
<p><em>$alerttimes = Get-Alert | Select-Object TimeRaised<br />
$array=@() </em></p>
<p><em>foreach ($datetime in $alerttimes){<br />
$array += $datetime.timeraised.date<br />
} </em></p>
<p><em>$array | Group-Object Date</em></p>
<p><strong>#Number of Events per day</strong></p>
<p><em>$eventtimes = Get-Event | Select-Object TimeGenerated<br />
$array=@() </em></p>
<p><em>foreach ($datetime in $eventtimes){<br />
$array += $datetime.timegenerated.date<br />
} </em></p>
<p><em>$array | Group-Object Date</em></p>
<p>Beware that these &#034;queries&#034; might take a long time to execute (especially the events one) depending on the amount of data and your retention policy.</p>
<p>This is of course just scratching the surface of the amount of amazing things you can do with Powershell in Operations Manager 2007. For this kind of information you might want to keep an eye on the official &#034;System Center Operations Manager Command Shell&#034; blog: <a href="http://blogs.msdn.com/scshell/" title="http://blogs.msdn.com/scshell/">http://blogs.msdn.com/scshell/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2008/01/25/looking-at-opsmgr2007-alert-trend-with-command-shell/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Get-FlickrPhotos</title>
		<link>http://www.muscetta.com/2008/01/14/get-flickrphotos/</link>
		<comments>http://www.muscetta.com/2008/01/14/get-flickrphotos/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 21:46:50 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Post]]></category>

		<category><![CDATA[Flickr]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[PowerShell]]></category>

		<category><![CDATA[Tools]]></category>

		<category><![CDATA[dotNet]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2008/01/14/get-flickrphotos/</guid>
		<description><![CDATA[A while ago, talking to some friends, I was mentioning how cool it was that Flickr provides APIs, so that you can always get your data out of it, if you want to. There are several downloader applications that I found on the Internet, but I have not yet chosen one that I completey like [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago, talking to some friends, I was mentioning how cool it was that <a href="http://www.flickr.com/services/api">Flickr provides APIs</a>, so that you can always get your data out of it, if you want to. There are several downloader applications that I found on the Internet, but I have not yet chosen one that I completey like among the few that I&#039;ve tried. So, inspired by <a href="http://kosso.wordpress.com/2007/01/31/free-php5-script-to-grab-your-flickr-photos/">Kosso&#039;s PHP script for enumerating your photos on Flickr</a>, I thought I&#039;d port it to <a href="http://www.microsoft.com/powershell">Powershell</a> and make my own version of it. Just for the fun of it. My Powershell script does not do everything that Kosso&#039;s one does: I don&#039;t build a web page showing description and comments. I suppose this is because the original script was made with PHP, which you usually run on a web server and outputting as HTML is the standard thing you would do in PHP. I just concentrated on the &#034;download&#034; thing, since mine it is a console script. You can think of mine as a &#034;full backup&#034; script. Full&#8230; well, at least of all your photos, if not of all the metadata. It should be trivial to extend anyway, also considering Powershell XML type accelerator really makes it extremely easy to parse the output of a <a href="http://www.flickr.com/services/api/request.rest.html">REST API such as Flickr&#039;s</a> (I would say even easier and more readable that PHP&#039;simplexml). There is a ton of things that could be extended/improved in the script&#8230; including supporting proxy servers, accepting more parameters for things that are now hardcoded&#8230; and with a million other things. Even this way, though, I think that the script can be useful to show a number of techniques in Powershell. Or just to download your photos <img src='http://www.muscetta.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> So you can download the script from here: <a href="http://www.muscetta.org/Get-FlickrPhotos.ps1.txt">Get-FlickrPhotos.ps1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2008/01/14/get-flickrphotos/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Welcome www.powershell.it!</title>
		<link>http://www.muscetta.com/2008/01/04/welcome-wwwpowershellit/</link>
		<comments>http://www.muscetta.com/2008/01/04/welcome-wwwpowershellit/#comments</comments>
		<pubDate>Fri, 04 Jan 2008 21:35:50 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Post]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[Integration]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[Links]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[PowerShell]]></category>

		<category><![CDATA[Tools]]></category>

		<category><![CDATA[Windows]]></category>

		<category><![CDATA[dotNet]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2008/01/04/welcome-wwwpowershellit/</guid>
		<description><![CDATA[I just read from Jeffrey Snover about this newly born Italian PowerShell community site.
I just created an account for myself on the site&#8230; as you know I like PowerShell, so even if I usually prefer writing stuff in english, I will try to hang out there and see how can I contribute to it.
After all, [...]]]></description>
			<content:encoded><![CDATA[<p>I <a href="http://blogs.msdn.com/powershell/archive/2008/01/04/www-powershell-it-italian-powershell-community-website.aspx">just read from Jeffrey Snover</a> about this newly born <a href="http://www.powershell.it/">Italian PowerShell community site</a>.</p>
<p>I just created an account for myself on the site&#8230; as you know <a href="http://www.muscetta.com/category/powershell/">I like PowerShell</a>, so even if I usually prefer writing stuff in english, I will try to hang out there and see how can I contribute to it.</p>
<p>After all, I am italian&#8230; <img src='http://www.muscetta.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2008/01/04/welcome-wwwpowershellit/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Simply Works</title>
		<link>http://www.muscetta.com/2007/12/27/simply-works/</link>
		<comments>http://www.muscetta.com/2007/12/27/simply-works/#comments</comments>
		<pubDate>Thu, 27 Dec 2007 18:24:27 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Energy]]></category>

		<category><![CDATA[Facebook]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[MOM]]></category>

		<category><![CDATA[MOM2005]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[OpsMgr2007]]></category>

		<category><![CDATA[Personal]]></category>

		<category><![CDATA[Photos]]></category>

		<category><![CDATA[PowerShell]]></category>

		<category><![CDATA[Rant]]></category>

		<category><![CDATA[Risk]]></category>

		<category><![CDATA[System Center Operations Manager 2007]]></category>

		<category><![CDATA[Tools]]></category>

		<category><![CDATA[lifestream]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/12/27/simply-works/</guid>
		<description><![CDATA[
Simply Works, uploaded by Daniele Muscetta on Flickr.
I don&#039;t know about other people, but I do get a lot to think when the end of the year approaches: all that I&#039;ve done, what I have not yet done, what I would like to do, and so on&#8230;
And it is a period when memories surface.
I found [...]]]></description>
			<content:encoded><![CDATA[<p class="flickr-frame"><a title="photo sharing" href="http://www.flickr.com/photos/dani3l3/2141526220/"><img src="http://farm3.static.flickr.com/2222/2141526220_7754fa3134.jpg" alt="Simply Works" class="flickr-photo" /></a></p>
<p><span class="flickr-caption"><a href="http://www.flickr.com/photos/dani3l3/2141526220/">Simply Works</a>, uploaded by <a href="http://www.flickr.com/people/dani3l3/">Daniele Muscetta</a> on Flickr.</span></p>
<p class="flickr-yourcomment">I don&#039;t know about other people, but I do get a lot to think when the end of the year approaches: all that I&#039;ve done, what I have not yet done, what I would like to do, and so on&#8230;</p>
<p>And it is a period when memories surface.</p>
<p>I found the two old CD-ROMs you can see in the picture. And those are memories.<br />
missioncritical software was the company that invented a lot of stuff that became Microsoft&#039;s products: for example <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=6f86937b-533a-466d-a8e8-aff85ad3d212&amp;displaylang=en">ADMT</a> and <a href="http://www.microsoft.com/systemcenter/opsmgr/default.mspx">Operations Manager</a>.</p>
<p>The black CD contains SeNTry, the &#034;enterprise event manager&#034;, what later became Operations Manager.<br />
On the back of the CD, the company motto at the time: &#034;software that works simply and simply works&#034;.<br />
So true. I might digress on this concept, but I won&#039;t do that right now.</p>
<p>I have already explained in my other blog <a href="http://blogs.msdn.com/dmuscett/archive/2005/09/02/459914.aspx">what I do for work</a>. Well, that was a couple of years ago anyway. Several things have changed, and we are moving towards offering services that are more measurable and professional. So, since it happens that in a certain job you need to be an &#034;expert&#034; and &#034;specialize&#034; in order to be &#034;seen&#034; or &#034;noticed&#034;.<br />
You know <a href="http://www.muscetta.com/2006/05/29/specialization-is-bullshit/">I don&#039;t really believe in specialization</a>. I have written it <a href="http://www.muscetta.com/2006/11/05/more-on-specialization/">all over the place</a>. But you need to make other people happy as well and let them believe what they want, so when you &#034;specialize&#034; they are happier. No, really, it might make a difference in your carrer <img src='http://www.muscetta.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>In this regard, I did also mention my <a href="http://blogs.msdn.com/dmuscett/archive/2004/11/18/263280.aspx">&#034;meeting again&#034; with Operations Manager</a>.<br />
That&#039;s where Operations manager helped me: it let me &#034;specialize&#034; in systems and applications management&#8230; a field where you need to know a bit of everything anyway: infrastructure, security, logging, scripting, databases, and so on&#8230; <img src='http://www.muscetta.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
This way, everyone wins.</p>
<p>Don&#039;t misunderstand me, this does not mean I want to know everything. One cannot possibly know everything, and the more I learn the more I believe I know nothing at all, to be honest. I don&#039;t know everything, <a href="http://thedailywtf.com/Articles/Classic-WTF-Lock-In-Key-Security.aspx">so please don&#039;t ask me everything - I work with mainframes</a> <img src='http://www.muscetta.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
While that can be a great excuse to avoid neighbours and relatives annoyances with their PCs though, on the serious side I still believe that any intelligent individual cannot be locked into doing a narrow thing and know only that one bit just because it is common thought that you have to act that way.</p>
<p>If I would <a href="http://twitter.com/gapingvoid/statuses/535752142">stop where I have to stop</a> I would be the standard &#034;IT Pro&#034;. I would be fine, sure, but I would get bored soon. I would not learn anything. <a href="http://www.muscetta.com/2007/09/11/itpro-vs-dev-there-is-no-such-a-thing/">But I don&#039;t feel I am the standard &#034;IT Pro&#034;</a>. In fact, funnily enough, <a href="http://www.google.com/search?hl=en&amp;q=link:www.muscetta.com&amp;btnG=Search">on some other blogs out there I have been referenced as a &#034;Dev&#034;</a> (find it on your own, look at their blogrolls :-)). But I am not a Dev either then&#8230; I don&#039;t write code for work. I would love to, but I rarely actually do, other than some scripts. Anyway, I tend to escape the definition of the usual &#034;expert&#034; on something&#8230; mostly because I want to escape it. I don&#039;t see myself represented by those generalization.</p>
<p>As <a href="http://haacked.com/archive/2007/12/21/faceoff-haack-vs-hanselman-it-gets-real.aspx">Phil puts it</a>, when asked &#034;Are software developers - engineers or artists?&#034;:</p>
<blockquote><p>&#034;[...] Don’t take this as a copout, but a little of both. I see it more as craftsmanship. Engineering relies on a lot of science. Much of it is demonstrably empirical and constrained by the laws of physics. Software is less constrained by physics as it is by the limits of the mind. [...]&#034;</p></blockquote>
<p>Craftmanship. Not science.<br />
And stop calling me an &#034;engineer&#034;. I am not an engineer. I was even crap in math, in school!</p>
<p>Anyway, what does this all mean? In practical terms, it means that in the end, wether I want it or not, I do get considered an &#034;expert&#034; on MOM and OpsMgr&#8230; and that I will mostly work on those products for the next year too. But that is not bad, because, as I said, working on that product means working on many more things too. Also, I can point to different audiences: those believing in &#034;experts&#034; and those going beyond schemes. It also means that I will have to continue teaching a couple of scripting classes (both VBScript and PowerShell) that nobody else seems to be willing to do (because they are all *expert* in something narrow), and that I will still be hacking together my other stuff (my facebook apps, my wordpress theme and plugins, my server, etc) and even continue to have strong opinions in those other fields that I find interesting and where I am not considered an *expert* <img src='http://www.muscetta.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Well, I suppose I&#039;ve been ranting enough for today&#8230;and for this year <img src='http://www.muscetta.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
I really want to wish everybody again a great beginning of 2008!!! What are you going to be busy with, in 2008 ?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/12/27/simply-works/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using Live ID to authenticate to WordPress</title>
		<link>http://www.muscetta.com/2007/11/02/using-live-id-to-authenticate-to-wordpress/</link>
		<comments>http://www.muscetta.com/2007/11/02/using-live-id-to-authenticate-to-wordpress/#comments</comments>
		<pubDate>Fri, 02 Nov 2007 21:39:23 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[Integration]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[LiveID]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Passport]]></category>

		<category><![CDATA[Personal]]></category>

		<category><![CDATA[Plugin]]></category>

		<category><![CDATA[WebSite]]></category>

		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/11/02/using-live-id-to-authenticate-to-wordpress/</guid>
		<description><![CDATA[Yesterday I&#039;ve been hacking a bit with the Windows Live ID SDK and I wrote a very small and simple plugin for WordPress that enables you to login in to WordPress with your passport Live ID.
I had read in various places that such a plugin would be welcome&#8230; I looked around and found none yet [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I&#039;ve been hacking a bit with the <a href="http://msdn2.microsoft.com/en-us/library/bb676633.aspx">Windows Live ID SDK</a> and I wrote a very small and simple plugin for <a href="http://www.wordpress.org/">WordPress</a> that enables you to login in to WordPress with your <span style="text-decoration: line-through;">passport</span> Live ID.<br />
I had read <a href="http://wordpress.org/extend/ideas/topic.php?id=689">in various</a> <a href="http://microsoft.blognewschannel.com/archives/2007/08/17/windows-live-id-cardspace-info-cards-available-for-websites">places</a> that such a plugin would be welcome&#8230; I looked around and found none yet (if anyone has instead already written something like this and I missed it I will happily waste the simple stuff I did  for something more advanced/well written&#8230; just let me know :-)).<br />
I took a look at <a href="http://mvolo.com/blogs/serverside/archive/2007/08/12/IIS-Authentication-plugin-for-the-Wordpress-PHP-blogging-engine.aspx">a similar experiment</a>, and eventually even found that there is <a href="http://verselogic.net/projects/wordpress/wordpress-openid-plugin">some conceptually similar plugin written to work with OpenID</a>. The wordpress openid plugin is much more complex and much more advanced than what I did, tough. It will let you log in with just ANY OpenID user, it will automatically create a user for you on that wordpress installation and associate it with your ID, even just for the purpose of commenting, etc.</p>
<p>But in my blog I don&#039;t require or need people to actually log in to do anything. I actually like anonymous/free comment. A CAPTCHA takes care of spammers and I am fine with it so far. Probably for a big site with a lot of users it might make sense, but for my blog so far it doesn&#039;t. But there&#039;s one thing for which this is instead useful: I have always been worried, when logging in through HTTP (thus, without SSL) to my blog from networks I don&#039;t manage or completely trust, that my password could be sniffed over the wire and stolen. Live ID solves my problem by letting Microsoft validate my identity: I have associated my Live ID to the blog&#039;s main user account(=myself), the one writing this post. So the plugin in its current form <a href="http://www.muscetta.com/wp-content/plugins/liveauth/auth.php">is used as a replacement of the login form</a> (the <a href="http://www.muscetta.com/wp-login.php">standard wp-login.php wordpress form</a> CAN still be used if you like, of course, you just don&#039;t HAVE to. Also the use of xmlrpc will still require local user/pwd combination.). Anyway, this new form will authenticate you thorugh Live ID and then check if your Live ID is associated to any local user. If it is, it will log you on to wordpress with that account. Otherwise it will inform you that you are successfully logged on to passport Live, but unfortunately there is no corresponding local account for you, and that it would need to be set up. Setting it up is as difficult as adding a line to the database&#8230; probably adding a form or a property page would be nice, but in my case I just did it with a query:</p>
<p>INSERT INTO `wordpress`.`wp-usermeta` (<br />
`umeta_id` ,<br />
`user_id` ,<br />
`meta_key` ,<br />
`meta_value`<br />
)<br />
VALUES (<br />
NULL , &#039;1&#039;, &#039;LiveID&#039;, &#039;f11fa1d3e82c68776f94a3a5c459b70b&#039;<br />
);</p>
<p>which adds an extra &#034;property&#034; for the first user (admin) called &#039;LiveID&#039; which contains your Live ID (the one above is not my real one, in case you were wondering). When you are authenticated by LiveID and you get back this value, the plugin checks in this table which WordPress userid in the database has been associated with this Live ID and - if it finds one - it authenticates you as that user. Of course you should not have duplicates.</p>
<p>My code is mostly based on <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=8BA187E5-3630-437D-AFDF-59AB699A483D&amp;displaylang=en">the SDK PHP Sample</a>, with some modification to integrate it in WordPress as a plugin. Of course I removed the file that is used as &#034;user database&#034; and used wordpress DB instead.</p>
<p>There&#039;s a ton of things that could be improved. I just did not put any more effort and time in it. As you might know if you read this blog, I am not a full time developer. Actually I shouldn&#039;t write code at all for work and I am mainly considered an &#034;infrastructure&#034; guy. Anyway, I would like to code more and even if I am not supposed to, I always try to find stimulating situations that require a bit of integration, thinking out of the box, some scripting, etc&#8230;</p>
<p><strong>[updated: november 3rd 2007]</strong> You can download the sample plugin &#034;AS-IS&#034; here: <strong><a href="http://www.muscetta.com/wp-content/uploads/liveauth.zip">liveauth.zip</a></strong> . This has only been tested and only works with Wordpress 2.3.x serie (but should also work with earlier versions - not tested) <a href="http://www.muscetta.com/wp-content/uploads/liveauth.zip"><br />
</a><br />
<strong>[updated: march 30th 2008]</strong> <a href="http://wordpress.org/development/2008/03/wordpress-25-brecker/">Wordpress 2.5</a> has changed the way the authentication cookie is generated, therefore here is an updated version of the plugin that works with the new secure cookies: <strong><a href="http://www.muscetta.com/wp-content/uploads/liveauth02.zip">liveauth02.zip</a></strong><br />
I should really invest some more time in this and clear up the code. I should also make an interface to make the configuration easier, and maybe make a version that works on both 2.3 and 2.5 branches. I am not sure when I will have time for that, though&#8230;</p>
<p><strong>[updated: april 20th 2008]</strong> I have released version 0.3c of the plugin which now finally includes a simple configuration page, and should work on both WordPress 2.3 (and older) and on the 2.5 brach. Please visit the new Windows <strong><a href="http://www.muscetta.com/live-id-wordpress-plugin/">Live ID Authentication WordPress Plugin Page</a></strong>.<a href="http://www.muscetta.com/wp-content/uploads/liveauth.zip"><br />
</a></p>
<p><strong>Disclaimer:</strong><br />
The information in this weblog is provided &#034;AS IS&#034; with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my own personal opinion. All code samples are provided &#034;AS IS&#034; without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.<br />
THIS WORK IS NOT ENDORSED AND NOT EVEN CHECKED, AUTHORIZED, SCRUTINIZED NOR APPROVED BY MY EMPLOYER, AND IT ONLY REPRESENT SOMETHING WHICH I&#039;VE DONE IN MY FREE TIME. NO GUARANTEE WHATSOEVER IS GIVEN ON THIS. THE AUTHOR SHALL NOT BE MADE RESPONSIBLE FOR ANY DAMAGE YOU MIGHT INCUR WHEN USING THIS PROGRAM.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/11/02/using-live-id-to-authenticate-to-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Facebook implemented a user.setStatus API!</title>
		<link>http://www.muscetta.com/2007/10/01/facebook-implemented-a-usersetstatus-api/</link>
		<comments>http://www.muscetta.com/2007/10/01/facebook-implemented-a-usersetstatus-api/#comments</comments>
		<pubDate>Mon, 01 Oct 2007 08:55:20 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[Cross Post]]></category>

		<category><![CDATA[Facebook]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[Integration]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/10/01/facebook-implemented-a-usersetstatus-api/</guid>
		<description><![CDATA[Finally, you CAN change your Facebook status programmatically in a way that is supported!
Some months ago Christian discovered a hack to change your Facebook status. Some other people also used it and extended it. I also ported it to C# and made a winform using its unofficial method.
Suddenly after, Facebook asked us to take down [...]]]></description>
			<content:encoded><![CDATA[<p>Finally, <a href="http://developers.facebook.com/documentation.php?v=1.0&amp;doc=extperms">you CAN change your Facebook status programmatically in a way that is supported</a>!</p>
<p>Some months ago <a href="http://nexdot.net/blog/2007/04/20/updating-facebook-status-using-php">Christian discovered a hack to change your Facebook status</a>. <a href="http://blakebrannon.com/2007/08/18/how-to-sync-facebook-status-with-twitter">Some other people also used it and extended it</a>. <a href="http://www.muscetta.com/2007/08/03/facebook-statetray">I also ported it to C# and made a winform using its unofficial method</a>.<br />
Suddenly after, <a href="http://www.muscetta.com/2007/09/03/its-nice-to-see-things-called-by-their-real-name">Facebook asked us to take down the code</a>, as it violated their terms of service.</p>
<p><a href="http://www.muscetta.com/2007/09/06/facebook-status-change-is-not-a-crime">It has taken a while</a>, <a href="http://www.techcrunch.com/2007/09/06/facebook-opening-up-but-on-its-own-terms/">some struggles</a>, but now they finally recognized the need for <a href="http://adrianspender.com/blog/2007/05/21/federated-status">federated status</a>, and implemented a <strong>user.setStatus</strong> API.</p>
<p><a href="http://www.twitter.com/">Twitter</a> is the first to pick it up, so now <a href="http://twittersweet.com/2007/9/30/integration-between-twitter-and-facebook-status">you can update twitter and have your status propagate in Facebook</a>!</p>
<p>Well done, guys!</p>
<p>When I&#039;ll have some time I might think of rewriting my app using the SUPPORTED method, maybe finally writing that <a href="http://www.25hoursaday.com/weblog/CommentView.aspx?guid=51b24ec1-ec28-4526-b7fe-9d1e6c7fc802">Live Messenger plugin</a>&#8230; it would be nice <img src='http://www.muscetta.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
When I&#039;ll have time&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/10/01/facebook-implemented-a-usersetstatus-api/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Test from WordPress 2.3</title>
		<link>http://www.muscetta.com/2007/09/26/test-wp-23/</link>
		<comments>http://www.muscetta.com/2007/09/26/test-wp-23/#comments</comments>
		<pubDate>Wed, 26 Sep 2007 19:11:55 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Tools]]></category>

		<category><![CDATA[WebSite]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/09/26/test-wp-23/</guid>
		<description><![CDATA[Blog works, all the plugin work too. I will *only* have to re-write a whole bunch on SQL queries for my .Net frontend that is now broken. I&#039;ll do that at one stage, now I can&#039;t be asked.
]]></description>
			<content:encoded><![CDATA[<p>Blog works, all the plugin work too. I will *only* have to re-write a whole bunch on SQL queries for <a href="http://www.muscetta.com/2007/05/30/this-blog-in-c/">my .Net frontend</a> that is now broken. I&#039;ll do that at one stage, now I can&#039;t be asked.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/09/26/test-wp-23/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ITPro vs. Dev: there is no such a thing.</title>
		<link>http://www.muscetta.com/2007/09/11/itpro-vs-dev-there-is-no-such-a-thing/</link>
		<comments>http://www.muscetta.com/2007/09/11/itpro-vs-dev-there-is-no-such-a-thing/#comments</comments>
		<pubDate>Tue, 11 Sep 2007 19:05:49 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[Integration]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Personal]]></category>

		<category><![CDATA[PowerShell]]></category>

		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/09/11/itpro-vs-dev-there-is-no-such-a-thing/</guid>
		<description><![CDATA[Dave Winer wisely writes:
[...] I&#039;ve been pushing the idea that every app should be a platform for a long time, that in addition to a user interface, every app should have a programmatic interface. For me the idea came from growing up using Unix in the 70s, where every app is a toolkit and the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.scripting.com/stories/2007/09/10/shouldEveryAppBeAPlatform.html">Dave Winer wisely writes</a>:</p>
<blockquote><p><em>[...] I&#039;ve been pushing the idea that every app should be a platform for a long time, that in addition to a user interface, every app should have a programmatic interface. For me the idea came from growing up <strong>using Unix</strong> in the 70s, <strong>where every app is a toolkit and the operating system is a scripting language</strong>. Wiring things together is an integral part of being a Unix user. It&#039;s why programmers like Unix so much [...]</em></p></blockquote>
<p>It is entirely true. The limits are blurry, IMHO. In the Unix world it is common to find full-fledged &#034;applications&#034; which have been written by the ground up by people that were doing SysAdmin tasks, and those &#034;applications&#034; are usually just&#8230; scripts. Simple shell scripts, or something more evolved (PERL, PHP, Python) it does not really matter.</p>
<p>I am so tired of the division traditionally made in the Microsoft world between &#034;Developers&#034; and &#034;IT Professionals&#034;. We even have separate sites for the two audiences: <a href="http://msdn.microsoft.com">MSDN</a> and <a href="http://technet.microsoft.com">Technet</a>. There are separate &#034;TechED&#034; events: for&#034;<a href="http://www.mseventseurope.com/teched/07/developers/Content/Pages/Default.aspx">Devs</a>&#034; and for &#034;<a href="http://www.mseventseurope.com/teched/07/itforum/Content/Pages/Default.aspx">IT Pros</a>&#034;. There are blogs that are divided among the two &#034;audiences&#034;&#8230;</p>
<p>There aren&#039;t two different audiences, really. There are people, with various degrees of expertise. There is no such a thing as a &#034;developer&#034; if he doesn&#039;t know a bit how the underlying system works. His code is gonna suck. And there is not such a thing such a &#034;IT Pro&#034; that builds and integrates and manages systems if he does not have the palest idea of how things work &#034;behind the GUI&#034;. He&#039;s gonna screw things up regardless of how many step-by-step (click-by-click ?) procedures you spoon feed him.</p>
<p>That&#039;s why automation and integration are best done by people who know how to write a bit code.</p>
<p>The <a href="http://www.microsoft.com/powershell">PowerShell</a> <a href="http://blogs.msdn.com/PowerShell/">folk</a> GET IT.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/09/11/itpro-vs-dev-there-is-no-such-a-thing/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Facebook status change is not a crime</title>
		<link>http://www.muscetta.com/2007/09/06/facebook-status-change-is-not-a-crime/</link>
		<comments>http://www.muscetta.com/2007/09/06/facebook-status-change-is-not-a-crime/#comments</comments>
		<pubDate>Thu, 06 Sep 2007 21:34:19 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blackhat]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[Cross Post]]></category>

		<category><![CDATA[Facebook]]></category>

		<category><![CDATA[Integration]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[TechCrunch]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/09/06/facebook-status-change-is-not-a-crime/</guid>
		<description><![CDATA[TechCrunch has been speaking to Christian about his PHP code that he had to pull down, my C# code I had to pull down (about which I also posted a comment this week), and the others who did. you can read what they wrote about it at http://www.techcrunch.com/2007/09/06/facebook-opening-up-but-on-its-own-terms/
]]></description>
			<content:encoded><![CDATA[<p>TechCrunch has been speaking to Christian about <a href="http://www.nexdot.net/blog/2007/04/20/updating-facebook-status-using-php/">his PHP code that he had to pull down</a>, <a href="http://www.muscetta.com/2007/08/03/facebook-statetray/">my C# code I had to pull down</a> (about which <a href="http://www.muscetta.com/2007/09/03/its-nice-to-see-things-called-by-their-real-name/">I also posted a comment this week</a>), and <a href="http://blakebrannon.com/2007/08/18/how-to-sync-facebook-status-with-twitter/">the others who did</a>. you can read what they wrote about it at <a href="http://www.techcrunch.com/2007/09/06/facebook-opening-up-but-on-its-own-terms/">http://www.techcrunch.com/2007/09/06/facebook-opening-up-but-on-its-own-terms/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/09/06/facebook-status-change-is-not-a-crime/feed/</wfw:commentRss>
		</item>
		<item>
		<title>It&#8217;s nice to see things called by their real name</title>
		<link>http://www.muscetta.com/2007/09/03/its-nice-to-see-things-called-by-their-real-name/</link>
		<comments>http://www.muscetta.com/2007/09/03/its-nice-to-see-things-called-by-their-real-name/#comments</comments>
		<pubDate>Mon, 03 Sep 2007 10:45:18 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blackhat]]></category>

		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[Cross Post]]></category>

		<category><![CDATA[Facebook]]></category>

		<category><![CDATA[Integration]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[Personal]]></category>

		<category><![CDATA[Rant]]></category>

		<category><![CDATA[Risk]]></category>

		<category><![CDATA[Security]]></category>

		<category><![CDATA[Social Networking]]></category>

		<category><![CDATA[Tools]]></category>

		<category><![CDATA[WebSite]]></category>

		<category><![CDATA[lifestream]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/09/03/its-nice-to-see-things-called-by-their-real-name/</guid>
		<description><![CDATA[Facebook Terms of Service state that it is forbidden to &#034;[...] use automated scripts to collect information from or otherwise interact with the Service or the Site [...]&#034;
For this reason, I had to pull down the code of the small application I had previously released, which was &#034;logging&#034; into the mobile web application &#034;pretending&#034; to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.facebook.com/terms.php">Facebook Terms of Service</a> state that it is forbidden to <em>&#034;[...] use automated scripts to collect information from or otherwise interact with the Service or the Site [...]&#034;</em></p>
<p>For this reason, <a href="http://www.muscetta.com/2007/08/03/facebook-statetray">I had to pull down the code of the small application I had previously released</a>, which was &#034;logging&#034; into the mobile web application &#034;pretending&#034; to be a mobile browser and change your status. Big deal!!!</p>
<p>I am quite sure there are a lot of people writing &#034;official&#034; applications (that is using the &#034;platform API&#034; and so on) that are collecting A LOT of information about users who install their applications. They are being sent the info about the visitors by facebook, they are storing them, they might do whatever they please with (study it, sell it to spammers, to marketers, to making-money-assholes) and nobody will ever notice because it is on their servers and nobody can check that.</p>
<p>But a script that changes your status from remote - since this is not a functionality they CHOSE to expose in their API - then THAT is a big issue. Doh!<br />
It&#039;s just plain ridiculous, but that&#039;s it.</p>
<p>Sure, the <a href="http://www.facebook.com/developers/tos.php">terms of service for app developers</a> say a bit more in this regard:</p>
<blockquote><p><em>[...]<br />
4) Except as provided in Section 2.A.6 below, <strong>you may not continue to use, and must immediately remove from any Facebook Platform Application and any Data Repository in your possession or under your control, any Facebook Properties not explicitly identified as being storable indefinitely in the Facebook Platform Documentation within 24 hours after the time at which you obtained the data, or such other time as Facebook may specify to you from time to time</strong>;</em></p>
<p><em>5) You may store and use indefinitely any Facebook Properties that are explicitly identified as being storable indefinitely in the Facebook Platform Documentation; provided, however, that except as provided in Section 2.A.6 below, you may not continue to use, and must immediately remove from any Facebook Platform Application and any Data Repository in your possession or under your control, any such Facebook Properties: (a) if Facebook ceases to explicitly identify the same as being storable indefinitely in the Facebook Platform Documentation; (b) upon notice from Facebook (including if we notify you that a particular Facebook User has requested that their information be made inaccessible to that Facebook Platform Application); or (c) upon any termination of this Agreement or of your use of or participation in Facebook Platform;<br />
[...]<br />
You will not directly or indirectly sell, export, re-export, transfer, divert, or otherwise dispose of any Facebook Properties to any country (or national thereof) without obtaining any required prior authorizations from the appropriate government authorities;<br />
[...]</em></p></blockquote>
<p>Are we sure everybody is playing by these rules, when every facebook &#034;application&#034; really runs on the developer&#039;server ? How do you know that they are really storing only what you want them to store, and deleting what you want them to delete ? Everybody knows how difficult it is to really &#034;delete&#034; digital content once it has come into existance&#8230; who knows how many copies of this database/social graph are floating around ?</p>
<p>Of course that is not an issue because people don&#039;t talk about it enough. But a script that changes your status - now, THAT is a very terrible thing.</p>
<p>I just don&#039;t get this &#034;politically correctness&#034;. It must be me.</p>
<p>Oh, no&#8230; look! It&#039;s not only me!<br />
I had read <a href="http://www.25hoursaday.com/weblog/2007/08/21/FacebookTheSocialGraphRoachMotel.aspx">this post of Dare</a>, but I problably had overlooked the last bit of it&#8230;. because he did point out this Hypocrisy going on:</p>
<blockquote><p><em>[...]<br />
Or (5) the information returned by FQL about a user contains no contact information (no email address, no IM screen names, no telephone numbers, no street address) so it is pretty useless as a way to utilize one’s friends list <strong>with applications besides Facebook</strong> since there is no way to cross-reference your friends using any personally identifiable association that would exist in another service. </em></p>
<p><em>When it comes to contact lists (i.e. the social graph), Facebook is a roach motel. Lots of information about user relationships goes in but there’s no way for users or applications to get it out easily. Whenever an application like FacebookSync comes along which helps users do this, it is </em><em><a href="http://fsbsoftware.com/">quickly shut down for violating their Terms of Use</a>. Hypocrisy? Indeed.<br />
[...]</em></p></blockquote>
<p>He then insists <a href="http://www.25hoursaday.com/weblog/2007/09/02/PutTheUserInControlOtherwiseThingsFallApart.aspx">in a more recent post in calling things by their </a><a href="http://www.25hoursaday.com/weblog/2007/09/02/PutTheUserInControlOtherwiseThingsFallApart.aspx">name</a>:</p>
<blockquote><p><em>[...]<br />
I will point out that 9 times out of 10 when you hear geeks talking about social network portability or similar buzzwords they are really talking about sending people spam because someone they know joined some social networking site. I also wonder how many people realize that these fly-by-night social networking sites that they happily hand over their log-in credentials to so they can spam their friends also share the list of email addresses thus obtained with services that resell to spammers?<br />
[...]<br />
how do you prevent badly behaved applications like Quechup from taking control away from your users? At the end of the day your users might end up thinking you sold their email addresses to spammers when in truth it was the insecure practices of the people who they’d shared their email addresses with that got them in that mess. This is one of the few reasons I can understand why Facebook takes such a hypocritical approach. <img src='http://www.muscetta.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
[...]</em></p></blockquote>
<p>Thanks, Dare, for mentioning Hypocrisy. Thanks for calling things by their name. I do <em><strong>understand</strong></em> their approach, I just <em><strong>don&#039;t agree</strong> </em>with it.</p>
<p>I did pull my small application off the Internet because I have a family to mantain and I don&#039;t want to have legal troubles with Facebook. Sorry to all those that found it handy. No, I cannot even give that to you per email. It&#039;s gone. I am sorry. For the freedom of speech, especially, I am sorry.</p>
<p>I will change my status more often on <a href="http://twitter.com/dani3l3">Twitter</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/09/03/its-nice-to-see-things-called-by-their-real-name/feed/</wfw:commentRss>
		</item>
		<item>
		<title>43things Facebook app</title>
		<link>http://www.muscetta.com/2007/08/28/43things-facebook-app/</link>
		<comments>http://www.muscetta.com/2007/08/28/43things-facebook-app/#comments</comments>
		<pubDate>Tue, 28 Aug 2007 08:36:51 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[43places]]></category>

		<category><![CDATA[43things]]></category>

		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Post]]></category>

		<category><![CDATA[Facebook]]></category>

		<category><![CDATA[Integration]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[Personal]]></category>

		<category><![CDATA[Places]]></category>

		<category><![CDATA[Rant]]></category>

		<category><![CDATA[Social Networking]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/08/28/43things-facebook-app/</guid>
		<description><![CDATA[WOW I already have 13 (thirteen) users for my Facebook application showing your goals pulled from 43things!
Sure, gapingvoid has got 700+ users in 3 days, I know. But hey, he&#039;s famous, and I don&#039;t see the point of cluttering my already busy Facebook profile with a cartoon. I do read him and generally like his cartoons, and [...]]]></description>
			<content:encoded><![CDATA[<p>WOW I already have 13 (thirteen) users for <a href="http://www.facebook.com/apps/application.php?api_key=481ca08c0cea9f311c9ad5a11b0e925b">my Facebook application showing your goals pulled from 43things</a>!</p>
<p>Sure, <a href="http://www.facebook.com/apps/application.php?api_key=129a817243db8922622abd53b2c3732b">gapingvoid has got 700+ users in 3 days</a>, I know. But hey, he&#039;s famous, and I don&#039;t see the point of cluttering my already busy Facebook profile with a cartoon. I do read him and generally like his cartoons, and I am in the <a href="http://www.facebook.com/group.php?gid=2455150406">&#034;friends of the blue monster&#034; group</a> (so to say I like him).</p>
<p>But I prefer reading him in my &#034;normal&#034; aggregator.</p>
<p>I think Facebook apps should rather &#034;inject social objects&#034; (where did I read this definition? sorry I cant recall it or I would appropiately link to you&#8230; I swear).</p>
<p>There are of course other similar applications that just pull comics in your profile (like <a href="http://www.facebook.com/apps/application.php?id=11397560696&amp;b">Dilbert</a>, <a href="http://www.facebook.com/apps/application.php?id=2412082262&amp;b">Garfield</a>, <a href="http://www.facebook.com/apps/index.php?q=comic">etc</a>) but again - I think this is all stuff that YOU are interested in, and thus should just go into your aggregator - so YOU can read it; on the opposite your profile in Facebook should talk about YOU and things YOU are doing, for example. Occasionally they can be YOUR posts or they can even be someone else&#039;s posts that you read and want to share/let other people see (that&#039;s why I pull in my <a href="http://www.facebook.com/apps/application.php?api_key=e0e7bb035cf823292dcbba9586adb3d9">Google Reader&#039;s shared items</a> for example - things I read and want you too to see). If this includes importing other social objects/information from other social networks, like <a href="http://www.facebook.com/apps/application.php?api_key=024f4b8ab5f232414153957e8c5fabc0">the music you are listening to on last.FM</a>, or <a href="http://www.facebook.com/apps/application.php?api_key=8d7e87cc9f11c6d0311cb7b50252548b">the photos you published on Flickr</a>, then it is fine. That&#039;s why I wrote <a href="http://www.facebook.com/apps/application.php?api_key=481ca08c0cea9f311c9ad5a11b0e925b">an app that shows the things you want to do</a>, pulled in from <a href="http://www.43things.com">43things.com</a> and one that shows <a href="http://www.facebook.com/apps/application.php?api_key=36bb682b64617bdea356ccf400c0d6d4">the places you want to visit</a> pulled in from <a href="http://www.43places.com">43places.com</a>. Because I felt those social objects from another network were missing. In fact a user commented &#034;<em>[...] Glad someone finally took a step forward to create this, though <img src='http://www.muscetta.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> [...]</em>&#034;.</p>
<p>But of course what I wrote about which kind of applications you should or shouldn&#039;t have in your profile, remember that this is just my <strike>personal opinion</strike> rant, and everybody is free to put whatever stuff he/she likes onto his/her profile, in the end :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/08/28/43things-facebook-app/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New Photo Category Visualization</title>
		<link>http://www.muscetta.com/2007/08/26/new-photo-category-visualization/</link>
		<comments>http://www.muscetta.com/2007/08/26/new-photo-category-visualization/#comments</comments>
		<pubDate>Sun, 26 Aug 2007 15:28:34 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Post]]></category>

		<category><![CDATA[Flickr]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Personal]]></category>

		<category><![CDATA[Places]]></category>

		<category><![CDATA[WebSite]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/08/26/new-photo-category-visualization/</guid>
		<description><![CDATA[
Copying the advice by Small Potato, I made a different page for the &#039;Photos&#039; category/tag on this blog. It has been a bit trickier than I first thought, because he keeps his picture uploaded into wordpress itself, while I had to write a small plugin using a regular expression to extract the &#034;IMG SRC&#034; portion of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/dani3l3/1240463115/" title="Photo Sharing"><img width="500" src="http://farm2.static.flickr.com/1192/1240463115_8df8a01334.jpg" alt="New Photo Category Page" height="432" /></a></p>
<p>Copying <a href="http://www.wpdesigner.com/2007/08/04/how-to-manipulate-category-templates/">the advice by Small Potato</a>, I made <a href="http://www.muscetta.com/category/photos/">a different page for the &#039;Photos&#039; category/tag</a> on this blog. It has been a bit trickier than I first thought, because he keeps his picture uploaded into wordpress itself, while I had to write a small plugin using a regular expression to extract the &#034;IMG SRC&#034; portion of the post content. This way I also experimented with WordPress templates, plugins and structure a bit more than I had done before&#8230; and I am even more convinced than before that it can easily be used as a CMS rather than *just* a bloging software.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/08/26/new-photo-category-visualization/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My lost Facebook Appz! doh!</title>
		<link>http://www.muscetta.com/2007/08/25/my-lost-facebook-appz-doh/</link>
		<comments>http://www.muscetta.com/2007/08/25/my-lost-facebook-appz-doh/#comments</comments>
		<pubDate>Sat, 25 Aug 2007 18:58:44 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[43places]]></category>

		<category><![CDATA[43things]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[Cross Post]]></category>

		<category><![CDATA[Facebook]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Personal]]></category>

		<category><![CDATA[Social Networking]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/08/25/my-lost-facebook-appz-doh/</guid>
		<description><![CDATA[I am just figuring out that on this post of the 26th of July I mentioned I was trying to write a simple facebook application. I am not realizing I never wrote anything about it anymore. I did not spend a lot of time figuring out all the possibilities, and indeed I have not looked [...]]]></description>
			<content:encoded><![CDATA[<p>I am just figuring out that <a href="http://www.muscetta.com/2007/07/26/facebook-development/">on this post of the 26th of July I mentioned I was trying to write a simple facebook application</a>. I am not realizing I never wrote anything about it anymore. I did not spend a lot of time figuring out all the possibilities, and indeed I have not looked into it anymore since then, but that very night I did write something. Not just one application, but TWO (copycat) very simple applications: <a href="http://www.facebook.com/apps/application.php?id=2911759627">my43places</a> and <a href="http://www.facebook.com/apps/application.php?id=2849529788">my43things</a>, that pull into your profile the data about the things you want to do you entered in <a href="http://www.43things.com">43things.com</a> and the places you want to visit you entered in <a href="http://www.43places.com">43places.com</a>, respectively.</p>
<p>They are very simple: you enter your user name and they connect to their <a href="http://www.43things.com/about/view/web_service_api">REST web service</a>, extract the information about your places and/or goals, and show them as a list in a box in your profile.</p>
<p>I don&#039;t know why I did not blog about them before&#8230; maybe I thought they were too simple ? Well, they are, but, seriously: who cares? <img src='http://www.muscetta.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/08/25/my-lost-facebook-appz-doh/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Open Source Projects and Microsoft</title>
		<link>http://www.muscetta.com/2007/08/24/open-source-projects-and-microsoft/</link>
		<comments>http://www.muscetta.com/2007/08/24/open-source-projects-and-microsoft/#comments</comments>
		<pubDate>Fri, 24 Aug 2007 12:16:50 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[Cross Post]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[Integration]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Places]]></category>

		<category><![CDATA[Tools]]></category>

		<category><![CDATA[dotNet]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/08/24/open-source-projects-and-microsoft/</guid>
		<description><![CDATA[This CNet article about CodePlex has some VERY interesting points:
[...] Bayarsaikhan has posted the top 25 most active open-source projects on Microsoft&#039;s Codeplex site. Looking at the list, it looks like Microsoft developers spend their time doing much the same as the rest of the Java/other world: play games and make the Web world pretty with [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://news.com.com/8301-10784_3-9761998-7.html">This CNet article about CodePlex</a> has some VERY interesting points:</p>
<blockquote><p><em>[...] Bayarsaikhan </em><a href="http://www.plentyofcode.com/2007/08/most-active-open-source-projects-in.html" class="external-link"><font color="#0048c0"><em>has posted</em></font></a><em> the top 25 most active open-source projects on </em><a href="http://www.codeplex.com/"><font color="#20328e"><em>Microsoft&#039;s Codeplex</em></font></a><em> site. Looking at the list, it looks like Microsoft developers spend their time doing much the same as the rest of the Java/other world: play games and make the Web world pretty with AJAX. You can see the top project interests below in the Codeplex tag cloud.</em></p>
<p><em>Codeplex is interesting to me for several reasons, but primarily because it demonstrates something that I&#039;ve argued for many years now: </em><a href="http://asay.blogspot.com/2005/06/windows-as-open-source-platform.html" class="external-link"><font color="#0048c0"><em>open source on the Windows platform is a huge opportunity for Microsoft</em></font></a><em>. It is something for the company to embrace, not despise.</em></p>
<p><em>And it does several things well (better than Sourceforge, in my opinion) [...]</em></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/08/24/open-source-projects-and-microsoft/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Facebook Mobile is not working for Italy</title>
		<link>http://www.muscetta.com/2007/08/21/facebook-mobile-is-not-working-for-italy/</link>
		<comments>http://www.muscetta.com/2007/08/21/facebook-mobile-is-not-working-for-italy/#comments</comments>
		<pubDate>Tue, 21 Aug 2007 09:04:01 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[Facebook]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[Integration]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[Personal]]></category>

		<category><![CDATA[Rant]]></category>

		<category><![CDATA[Social Networking]]></category>

		<category><![CDATA[dotNet]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/08/21/facebook-mobile-is-not-working-for-italy/</guid>
		<description><![CDATA[    .flickr-photo { border: solid 2px #000000; }  .flickr-yourcomment { }  .flickr-frame { text-align: left; padding: 3px; }  .flickr-caption { font-size: 0.8em; margin-top: 0px; }

Facebook mobile is not working from mobile operators not in the US, I suppose.
I can&#039;t even log on to m.facebook.com with my WIndows Mobile SmartPhone.
I [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css">    .flickr-photo { border: solid 2px #000000; }  .flickr-yourcomment { }  .flickr-frame { text-align: left; padding: 3px; }  .flickr-caption { font-size: 0.8em; margin-top: 0px; }</style>
<p class="flickr-frame"><a href="http://www.flickr.com/photos/dani3l3/1192155232/" title="photo sharing"><img src="http://farm2.static.flickr.com/1341/1192155232_2852c73935.jpg" alt="Facebook Mobile is not working for Italy" class="flickr-photo" /></a></p>
<p>Facebook mobile is not working from mobile operators not in the US, I suppose.<br />
I can&#039;t even log on to m.facebook.com with my WIndows Mobile SmartPhone.<br />
I can&#039;t send status updates through SMS.</p>
<p>I can&#039;t even send them by mail, or I get the following back:</p>
<p><a href="http://www.flickr.com/photos/dani3l3/1191285337/"><img width="416" src="http://farm2.static.flickr.com/1047/1191285337_ba494d53ef_o.jpg" alt="Facebook Mobile is not working for Italy" height="447" /></a></p>
<p>So, now, I am updating <a href="http://twitter.com/dani3l3">Twitter</a>.<br />
Twitter can be updated with an SMS even from Europe. Or it can be updated with a bot running GTalk. Very easy, can do it from everywhere.</p>
<p>I then wrote a small command line application (<a href="http://www.muscetta.com/2007/08/03/facebook-statetray/">based on the same &#034;hack&#034; as the one described before</a>) that runs every five minutes from the scheduler on my server and keeps the two in sync.</p>
<p>I wrote it in C# as a Console application because that&#039;s usually what I do when I want it to run it both on my windows machines and/or on my Linux server (with <a href="http://www.mono-project.com/">MONO</a>). I already used this approach in the past and I found it to be successful. As long as you keep the application simple enough and check out <a href="http://www.go-mono.com/docs">the documentation for the implemented classes on mono</a>, it runs without modification both on windows on the &#034;real&#034; .Net framework and on Mono on Linux. i just copy the executable and I am ready to go.<br />
Not this time, though.<br />
I am hitting what seems to be a bug in mono. I might be able to find a workaround, but I haven&#039;t had the time to dig in the issue yet.<br />
I posted some <a href="http://www.gotmono.com/cgi-bin/yabb/YaBB.pl?board=news;action=display;num=1180633385">info about this on this forum</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/08/21/facebook-mobile-is-not-working-for-italy/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Windows Live ID Web Authentication 1.0 SDK !</title>
		<link>http://www.muscetta.com/2007/08/16/windows-live-id-web-authentication-10-sdk/</link>
		<comments>http://www.muscetta.com/2007/08/16/windows-live-id-web-authentication-10-sdk/#comments</comments>
		<pubDate>Thu, 16 Aug 2007 14:28:50 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[Cross Post]]></category>

		<category><![CDATA[Hotmail]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[Integration]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[Links]]></category>

		<category><![CDATA[LiveID]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Passport]]></category>

		<category><![CDATA[Python]]></category>

		<category><![CDATA[Ruby]]></category>

		<category><![CDATA[Tools]]></category>

		<category><![CDATA[WebSite]]></category>

		<category><![CDATA[dotNet]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/08/16/windows-live-id-web-authentication-10-sdk/</guid>
		<description><![CDATA[Check this out:
Windows Live ID Team has published on the web the SDK that lets you liveID (or &#034;passport&#034;)-enable your applications!
http://msdn2.microsoft.com/en-us/library/bb676633.aspx
There are even code samples in six different languages: C#, Java, PHP, Python, Ruby e Perl! You can download them from http://go.microsoft.com/fwlink/?LinkId=91761
Wow! Having time, it would be cool to write a Wordpress plugin using Passport [...]]]></description>
			<content:encoded><![CDATA[<p>Check this out:</p>
<p>Windows Live ID Team has published on the web the SDK that lets you liveID (or &#034;passport&#034;)-enable your applications!</p>
<p><a href="http://msdn2.microsoft.com/en-us/library/bb676633.aspx">http://msdn2.microsoft.com/en-us/library/bb676633.aspx</a></p>
<p>There are even code samples in six different languages: C#, Java, PHP, Python, Ruby e Perl! You can download them from <a href="http://go.microsoft.com/fwlink/?LinkId=91761">http://go.microsoft.com/fwlink/?LinkId=91761</a></p>
<p>Wow! Having time, it would be cool to write a Wordpress plugin using Passport authentication to authenticate/identify users that want to comment&#8230; mumble mumble&#8230;.. <img src='http://www.muscetta.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Interoperability. Wow.</p>
<p>More info at the Live ID starting Page: <a href="http://dev.live.com/blogs/liveid/archive/2006/05/18/8.aspx">http://dev.live.com/blogs/liveid/archive/2006/05/18/8.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/08/16/windows-live-id-web-authentication-10-sdk/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Why do developers tend to forget about people behind proxy servers ?</title>
		<link>http://www.muscetta.com/2007/08/13/why-do-developers-tend-to-forget-about-people-behind-proxy-servers/</link>
		<comments>http://www.muscetta.com/2007/08/13/why-do-developers-tend-to-forget-about-people-behind-proxy-servers/#comments</comments>
		<pubDate>Mon, 13 Aug 2007 11:38:49 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[Cross Post]]></category>

		<category><![CDATA[Facebook]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[Integration]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[Networking]]></category>

		<category><![CDATA[Proxy]]></category>

		<category><![CDATA[Rant]]></category>

		<category><![CDATA[Security]]></category>

		<category><![CDATA[dotNet]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/08/13/why-do-developers-tend-to-forget-about-people-behind-proxy-servers/</guid>
		<description><![CDATA[I know this is a very common issue.
I keep finding way too many software that claim to interact with Web 2.0 sites or services, and connect here or there&#8230;. still forgetting one basic simple rule, that is: letting people use a proxy.
Most programmers for some reasons just assume that since they are directly connected to [...]]]></description>
			<content:encoded><![CDATA[<p>I know this is a very common issue.</p>
<p>I keep finding way too many software that claim to interact with Web 2.0 sites or services, and connect here or there&#8230;. still forgetting one basic simple rule, that is: letting people use a proxy.</p>
<p>Most programmers for some reasons just assume that since they are directly connected to the internet, everybody is. Which isn&#039;t always the case. Most companies have proxies and will only let you out to port 80 - by using their proxy.</p>
<p>&#8230;which in turn is one of the reasons why most applications now &#034;talk&#034; and tunnel whatever application protocol on top of HTTP&#8230; still a lot of softwares simply &#034;forget&#034; or don&#039;t care proving a simple checkbox &#034;use proxy&#034;, which will translate in two or three extra lines of code&#8230; three lines which I personally usually include in my projects, when I am not even a *developer*!! (but that might explain why I *think* of it&#8230; I come from a security and networking background :-))</p>
<p>I thought of writing this post after having read <a href="http://geekswithblogs.net/technetbytes/archive/2007/08/11/114573.aspx">this post by Saqib Ullah</a>.</p>
<p>Anyway. I keep finding this thing over and over again. Both in simple, hobbyist, sample and/or in complex, big, expensive enterprise software. Last time I got pissed off about a piece of code missing this feature was some days ago when testing <a href="http://www.codeplex.com/FacebookToolkit">http://www.codeplex.com/FacebookToolkit</a>. The previous time was during Windows Vista beta-testing (I had found a similar issue in beta2, and had it fixed for RC1.)</p>
<p>Actually, I am being polite saying it is &#034;missing a feature&#034;. To be honest I think missing this &#034;feature&#034; would have to be considered a bug: every piece of software using HTTP *should* include the possibility to pass thorugh proxy (also, don&#039;t forget about  AUTHENTICATED proxies), or the purpose of using HTTP in the first place is defeated!!</p>
<p>Developers!!! You have to remember people ARE behind proxies !!!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/08/13/why-do-developers-tend-to-forget-about-people-behind-proxy-servers/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Powershell and RegExp: a &#8220;match&#8221; made my day.</title>
		<link>http://www.muscetta.com/2007/08/09/powershell-and-regexp-a-match-made-my-day/</link>
		<comments>http://www.muscetta.com/2007/08/09/powershell-and-regexp-a-match-made-my-day/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 18:45:31 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Exchange]]></category>

		<category><![CDATA[ISA]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[PowerShell]]></category>

		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/08/09/powershell-and-regexp-a-match-made-my-day/</guid>
		<description><![CDATA[Today I was working with a customer and friend (Claudio Latini, who I thank for the permission to post this, which is also work of his brain - especially the regular expression you&#039;ll see reading on!).
We are running several projects and activities together and, among several other things, he&#039;s in the process of migrating his users from Exchange [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was working with a customer and friend (Claudio Latini, who I thank for the permission to post this, which is also work of his brain - especially the regular expression you&#039;ll see reading on!).</p>
<p>We are running several projects and activities together and, among several other things, he&#039;s in the process of migrating his users from Exchange 2003 to Exchange 2007. In this infrastructure, he has some ISA Server that publish both the Exchange2003 and the Exchange2007 frontends.</p>
<p>Now he wanted to know HOW MANY and WHICH ONES of his users actually have a PocketPC or other WIndows Mobile device and were actively connecting to the old FrontEnd. You give out mobile devices to people but those things are usually less &#034;managed&#034; - when compared to corporate PCs, at least. So you loose a bit control of the thing&#8230; usually people with mobile devices using ActiveSync in companies are managers, and especially since some of them might be on holiday at the moment, it was important to know WHO were the people that had to be told to reconfigure their device to point to the new name/server BEFORE he would start complaining about ActiveSync not working anymore&#8230;</p>
<p>So how do you figure out who&#039;s connecting ?</p>
<p>I am NO Exchange expert whatsoever&#8230; but a thing that came in handy was the thing that an ISA Server was reverse-publishing the frontend server. I know ISA (and firewalls/proxies in general) much better than Exchange, so I can help on that side. In the log files, ActiveSync Connections looked like the following URL, passing most parameters in the POST request: <a title="http://www.company.com/exchange?User=Mario&amp;DeviceID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla" href="http://www.muscetta.org/Admin">http://www.company.com/exchange?User=Mario&amp;DeviceID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla</a> (and on an unrelated note: yes, if you try to crawl this link, you are a bot :-))</p>
<p>So we exported ISA logs (there are several tools for this, including &#034;<a href="http://www.isatools.org/tools/ISA_Extract_Logs_v1.8.zip">Extract logs</a>&#034;, but we did not use a script, we just used a filter for the correct publishing rule in the &#034;Monitoring - Logging&#034; tag in ISA Server Console and then copied and pasted those log lines) and tried to see if <a href="http://www.microsoft.com/powershell">PowerShell</a> could help tackle the issue.</p>
<p>Here we load our sample log (in a real log you would have much more information - each single line wrapping several console rows; I cut it short to the URL to make it more readable.</p>
<pre style="color: #eeedf0; background-color: #012456"><span style="background-color: #012456; color: #00ff00;">PS&gt;</span> get-content log.txt    

http://www.company.com/exchange?User=Mario&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Gino&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Antonio&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Antonio&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Gino&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Antonio&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Antonio&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Mario&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Mario&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Mario&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Mario&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Antonio&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Antonio&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Mario&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Antonio&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Antonio&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Mario&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Antonio&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Antonio&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Mario&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Antonio&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Antonio&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla
http://www.company.com/exchange?User=Mario&amp;DevideID=186hkjw6gjw76463uh2g5gi2j3h&amp;Bla=bla</pre>
<p>We know Get-Content does not just display the file, it loads the file into a string array.</p>
<p>So we can cycle through the file and try to extract (using a regexp) the string after &#034;User=&#034; and before the first ampersand (&#034;&amp;&#034;), which translates in the following regular expression:</p>
<p><strong>&#034;User=(?&lt;nome&gt;.*?)&amp;&#034;</strong></p>
<p>(the regexp has been the most difficult thing to figure out, but it is very worth the hassle once you&#039;ve done it&#8230;)</p>
<pre style="color: #eeedf0; background-color: #012456"><span style="background-color: #012456; color: #00ff00;">PS&gt;</span> get-content log.txt | foreach {$_ -match "User=(?<span>&lt;</span>nome&gt;.*?)&amp;" | out-null; $matches}
Name                           Value
----                           -----
nome                           Mario
0                              User=Mario&amp; nome                           Gino
0                              User=Gino&amp;
nome                           Antonio
0                              User=Antonio&amp;
nome                           Antonio
0                              User=Antonio&amp;
nome                           Gino
0                              User=Gino&amp;
nome                           Antonio
0                              User=Antonio&amp;
nome                           Antonio
0                              User=Antonio&amp;
nome                           Mario
0                              User=Mario&amp;
nome                           Mario
0                              User=Mario&amp;
nome                           Mario
0                              User=Mario&amp;
nome                           Mario
0                              User=Mario&amp;
nome                           Antonio
0                              User=Antonio&amp;
nome                           Antonio
0                              User=Antonio&amp;
nome                           Mario
0                              User=Mario&amp;
nome                           Antonio
0                              User=Antonio&amp;
nome                           Antonio
0                              User=Antonio&amp;
nome                           Mario
0                              User=Mario&amp;
nome                           Antonio
0                              User=Antonio&amp;
nome                           Antonio
0                              User=Antonio&amp;
nome                           Mario
0                              User=Mario&amp;
nome                           Antonio
0                              User=Antonio&amp;
nome                           Antonio
0                              User=Antonio&amp;
nome                           Mario
0                              User=Mario&amp;
nome                           Mario
0                              User=Mario&amp;</pre>
<p>This seems to work. Now we only have to get the Named Captures called &#034;nome&#034; (containing the user name):</p>
<pre style="color: #eeedf0; background-color: #012456"><span style="background-color: #012456; color: #00ff00;">PS&gt;</span> <strong>get-content log.txt | foreach {$_ -match "User=(?<span>&lt;</span>name&gt;.*?)&amp;" | out-null; $matches["name"]}
</strong>Mario
Gino
Antonio Antonio
Gino
Antonio
Antonio
Mario
Mario
Mario
Mario
Antonio
Antonio
Mario
Antonio
Antonio
Mario
Antonio
Antonio
Mario
Antonio
Antonio
Mario
Mario</pre>
<p>Awesome. Now sort them and remove duplicates. Which is one more command in our pipeline:</p>
<p><strong>get-content log.txt | foreach {$_ -match &#034;User=(?&lt;nome&gt;.*?)&amp;&#034; | out-null; $matches["nome"]} | sort-object -uniq</strong></p>
<pre style="color: #eeedf0; background-color: #012456"><span style="background-color: #012456; color: #00ff00;">P&gt;</span> get-content log.txt | foreach {$_ -match "User=(?<span>&lt;</span>name&gt;.*?)&amp;" | out-null; $matches["name"]} | sort-object -uniq
Antonio
Gino
Mario     

<span style="background-color: #012456; color: #00ff00;">PS&gt;</span>
<span style="background-color: #012456; color: #00ff00;">PS&gt;</span></pre>
<p>Now you can call those three users and tell them to modify their ActiveSync configuration <img src='http://www.muscetta.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/08/09/powershell-and-regexp-a-match-made-my-day/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Facebook StateTray</title>
		<link>http://www.muscetta.com/2007/08/03/facebook-statetray/</link>
		<comments>http://www.muscetta.com/2007/08/03/facebook-statetray/#comments</comments>
		<pubDate>Fri, 03 Aug 2007 21:44:23 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Post]]></category>

		<category><![CDATA[Facebook]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[Integration]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[Personal]]></category>

		<category><![CDATA[Social Networking]]></category>

		<category><![CDATA[Tools]]></category>

		<category><![CDATA[dotNet]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/08/03/facebook-statetray/</guid>
		<description><![CDATA[       .flickr-photo { border: solid 2px #000000; } .flickr-yourcomment { } .flickr-frame { text-align: left; padding: 3px; } .flickr-caption { font-size: 0.8em; margin-top: 0px; } 

Facebook StateTray, uploaded by Daniele Muscetta on Flickr.
This is a Screenshot of the small application I first described in my previous blog post.
It is [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css">       .flickr-photo { border: solid 2px #000000; } .flickr-yourcomment { } .flickr-frame { text-align: left; padding: 3px; } .flickr-caption { font-size: 0.8em; margin-top: 0px; } </style>
<p class="flickr-frame"><a href="http://www.flickr.com/photos/dani3l3/986527032/" title="photo sharing"><img src="http://farm2.static.flickr.com/1050/986527032_6dd64a6f5a.jpg" alt="Facebook StateTray" class="flickr-photo" /></a></p>
<p><span class="flickr-caption"><a href="http://www.flickr.com/photos/dani3l3/986527032/">Facebook StateTray</a>, uploaded by <a href="http://www.flickr.com/people/dani3l3/">Daniele Muscetta</a> on Flickr.</span></p>
<p class="flickr-yourcomment">This is a Screenshot of the small application I first described in <a href="http://www.muscetta.com/2007/08/02/facebook-api-and-winform-experiment/">my previous blog post</a>.</p>
<p>It is a simple Windows Form that lets you change your status on Facebook without having to browse to the site. It does not rely on <a href="http://developers.facebook.com/documentation.php">Facebook&#039;s API</a> (as they won&#039;t let you change your status, at least to date) but is really uses a hack on the <a href="http://m.facebook.com">Facebook mobile pages</a>. It is based on <a href="http://www.nexdot.net/blog/2007/04/20/updating-facebook-status-using-php/">PHP code posted by Christian Flickinger</a>, ported to C# (.Net 2.0) by me.</p>
<p>When you pull down the form you get to see the settings:</p>
<p><a href="http://www.flickr.com/photos/dani3l3/999229925/"><img width="459" src="http://farm2.static.flickr.com/1396/999229925_8020fb6938.jpg" alt="Facebook State Tray" height="500" /></a></p>
<p>Those can be stored in an XML file, that gets loaded automatically every time the program starts.<br />
Beware that password ARE displayed and stored in clear text.</p>
<p>The idea so far is that you run it on your PC and you just keep it resized so it does not show the &#034;dangerous&#034; bits.<br />
You can keep it minimized on the tray in windows, pop it up when you need to update your status, write your new status and click &#034;change&#034; - it will freeze for a couple of seconds while updates your status, since it uses synchronous calls - then you can minimize it again.</p>
<p><strong><em>UPDATED -  September 1st 2007: I have been asked by Facebook to pull down the source code from the Net, as it violates their <a href="http://www.facebook.com/terms.php">terms of service</a> (I had not realized that). Apologies to all.</em></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/08/03/facebook-statetray/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Facebook API and WinForm experiment</title>
		<link>http://www.muscetta.com/2007/08/02/facebook-api-and-winform-experiment/</link>
		<comments>http://www.muscetta.com/2007/08/02/facebook-api-and-winform-experiment/#comments</comments>
		<pubDate>Thu, 02 Aug 2007 14:24:26 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[Cross Post]]></category>

		<category><![CDATA[Facebook]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[Integration]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Social Networking]]></category>

		<category><![CDATA[dotNet]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/08/02/facebook-api-and-winform-experiment/</guid>
		<description><![CDATA[While testing with the Facebook API, I started creating a WinForm using the Facebook Toolkit.
What I had in mind was a simple program that would run on my PC, maybe minimized in the system tray, that would let me update my status in a click, thorugh the day, without having to log on to the [...]]]></description>
			<content:encoded><![CDATA[<p>While testing with the <a href="http://developers.facebook.com/documentation.php">Facebook API</a>, I started creating a WinForm using the <a href="http://www.codeplex.com/FacebookToolkit">Facebook Toolkit</a>.</p>
<p>What I had in mind was a simple program that would run on my PC, maybe minimized in the system tray, that would let me <a href="http://www.facebook.com/statusupdates/?ref=tn">update my status</a> in a click, thorugh the day, without having to log on to the website. Most of the day I am busy working, and I don&#039;t really have time to go surf and check Facebook&#8230; but I like the possibility for people to hear how I am doing. Changing the status would keep them up to date, and would keep my profile current.</p>
<p>As I figured out afterwards, their API does not yet let you change your status yet.</p>
<p><a href="http://www.25hoursaday.com/weblog/CommentView.aspx?guid=51b24ec1-ec28-4526-b7fe-9d1e6c7fc802">There are other people asking for this possibility</a>&#8230; but then I went further searching on the Internet, and I found this blog: <a href="http://www.nexdot.net/blog/2007/04/20/updating-facebook-status-using-php/">http://www.nexdot.net/blog/2007/04/20/updating-facebook-status-using-php/</a>. </p>
<p>I just hacked together a small WinForm written in C# that reimplements this idea.</p>
<p><a href="http://www.flickr.com/photos/dani3l3/986527032/" title="Photo Sharing"><img width="500" src="http://farm2.static.flickr.com/1050/986527032_6dd64a6f5a.jpg" alt="Facebook StateTray" height="66" /></a></p>
<p>I indeed would like to thank Christian for the idea, and my friend and colleague Pierluigi for his precious help with the regular expressions <img src='http://www.muscetta.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>At the moment it has terrible things such as hardcoded passwords in it, but as soon as I will have time to polish the code a bit, I will post it.</p>
<p>One more thing I would like to do with it is turning it from a standalone application into a <a href="http://msdn2.microsoft.com/en-us/library/aa905655.aspx">Live Messenger Add-In</a>, so that it synchronizes my messenger status with the one of Facebook. When I will have time for that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/08/02/facebook-api-and-winform-experiment/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Facebook development</title>
		<link>http://www.muscetta.com/2007/07/26/facebook-development/</link>
		<comments>http://www.muscetta.com/2007/07/26/facebook-development/#comments</comments>
		<pubDate>Thu, 26 Jul 2007 13:30:56 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[Cross Post]]></category>

		<category><![CDATA[Facebook]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[Integration]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[Links]]></category>

		<category><![CDATA[Places]]></category>

		<category><![CDATA[Rant]]></category>

		<category><![CDATA[Risk]]></category>

		<category><![CDATA[Security]]></category>

		<category><![CDATA[Social Networking]]></category>

		<category><![CDATA[Tools]]></category>

		<category><![CDATA[WebSite]]></category>

		<category><![CDATA[popfly]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/07/26/facebook-development/</guid>
		<description><![CDATA[I have been quite hooked into Facebook for the last couple of days, figuring out what it can and cannot do. It can do a lot. The possibility to inject code and brand new application into it is absolutely awesome.
PopFly lets you create mashups and even custom blocks, and I liked that too. But you [...]]]></description>
			<content:encoded><![CDATA[<p>I have been quite hooked into <a href="http://www.facebook.com">Facebook</a> for the last couple of days, figuring out what it can and cannot do. It can do a lot. The possibility to inject code and brand new application into it is absolutely awesome.</p>
<p><a href="http://www.popfly.ms">PopFly</a> lets you create mashups and even custom blocks, and I liked that too. But you have to use fancy-shiny <a href="http://silverlight.net/">Silverlight</a> (which is very cool indeed, but probably not *always* necesary) and you can only create blocks using Javascript. Sure, as someone as already written, <a href="http://www.paulgraham.com/web20.html">the meaning of AJAX is &#034;javascript now works&#034;.</a> I can understand (even if I don&#039;t know them for sure) the reasons behind certain choices. But I find it limiting. Maybe it is because I don&#039;t like Javascript. It must be it. </p>
<p>Facebook, instead, empowers you to inject code into their social networking framework. Any code. In whatever language you like. They started it in PHP, but you can plug-in whatever you like: Java, Ruby, Perl&#8230;. you can even have your application running on your own server, still providing a seamless experience inside of facebook. This opens up to millions of possibilities, and I got fascinated by that.</p>
<p>At the same time, the paranoid part of myself has been thinking to the security implications of it. This open platform is cool, but it also sounds like a framework for cross-site-scripting (XSS) attacks. Sure, you can &#034;report&#034; an application made by a third party that does something weird&#8230; but who will really notice if all that happens under the hood is that your cookies get stolen (and someone accesses your bank account) ? Will you figure it out it has happenend because <a href="http://en.wikipedia.org/wiki/Dancing_pigs">you wanted to see the &#034;dancing pigs&#034;</a> loaded in your profile ? Or will you figure it out at all ?</p>
<p>This said, I set aside my fear for a while and I delved into coding. What I did learn in the last couple of years, having slowly moved away from security engagements, is to relax. When I was working costantly with security I was a lot more paranoid. Now I case much less, and I live a lot more.</p>
<p>So I developed a couple of quick and simple apps running from this very server into Facebook, and I started using thePHP5 library they provide, so to be able to follow the examples first and figure out how it was working.</p>
<p>Now I also want to take a look at the <a href="http://www.nikhilk.net/FacebookNET.aspx">.NET library for facebook </a>when I have time. It sounds cool.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/07/26/facebook-development/feed/</wfw:commentRss>
		</item>
		<item>
		<title>IronPython and Visual Studio Shell</title>
		<link>http://www.muscetta.com/2007/06/08/ironpython-and-visual-studio-shell/</link>
		<comments>http://www.muscetta.com/2007/06/08/ironpython-and-visual-studio-shell/#comments</comments>
		<pubDate>Fri, 08 Jun 2007 17:47:03 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[Integration]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[IronPython]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Python]]></category>

		<category><![CDATA[dotNet]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/06/08/ironpython-and-visual-studio-shell/</guid>
		<description><![CDATA[I read on the IronPython Mailing List about this cool integration with Visual Studio Shell! Also, further in the same thread, you can find out that the current CTP of ASP.NET (ASP.NET Futures) also includes ironPython integration. Look at this:

]]></description>
			<content:encoded><![CDATA[<p><a href="http://lists.ironpython.com/pipermail/users-ironpython.com/2007-June/005045.html">I read on the IronPython Mailing List about this cool integration with Visual Studio Shell</a>! Also, further in the same thread, you can find out that <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=9323777E-FE78-430C-AD92-D5BE5B5EAD98&amp;displaylang=en">the current CTP of ASP.NET (ASP.NET Futures) also includes ironPython integration</a>. Look at this:</p>
<p><a href="http://msdn2.microsoft.com/en-us/vstudio/bb510103.vss_IronPython_large.jpg" title="IronPython running in VS Shell"><img src="http://farm2.static.flickr.com/1213/536136720_869f05cb29.jpg" alt="IronPython running in VS Shell" height="389" width="500" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/06/08/ironpython-and-visual-studio-shell/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Where did I leave that old JavaScript book ?</title>
		<link>http://www.muscetta.com/2007/06/05/where-did-i-leave-that-old-javascript-book/</link>
		<comments>http://www.muscetta.com/2007/06/05/where-did-i-leave-that-old-javascript-book/#comments</comments>
		<pubDate>Tue, 05 Jun 2007 19:51:13 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[Cross Post]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[WebSite]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/06/05/where-did-i-leave-that-old-javascript-book/</guid>
		<description><![CDATA[When testing out PopFly, I figured out I *really* need to know JavaScript better than I do, in order to build &#034;blocks&#034;. And I don&#039;t just need it for PopFly, of course, but in general -&#160;because these days it is ubiquitous, and it is being used so much on the Web. One more thing on&#160;my [...]]]></description>
			<content:encoded><![CDATA[<p>When testing out <a href="http://www.popfly.ms/">PopFly</a>, I figured out I *really* need to know JavaScript better than I do, in order to build &#034;blocks&#034;. And I don&#039;t just need it for PopFly, of course, but in general -&nbsp;because these days it is ubiquitous, and it is being used so much on the Web. One more thing on&nbsp;my to-do list. <a href="http://www.codinghorror.com/blog/archives/000857.html">Jeff seems to agree</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/06/05/where-did-i-leave-that-old-javascript-book/feed/</wfw:commentRss>
		</item>
		<item>
		<title>This blog in C#</title>
		<link>http://www.muscetta.com/2007/05/30/this-blog-in-c/</link>
		<comments>http://www.muscetta.com/2007/05/30/this-blog-in-c/#comments</comments>
		<pubDate>Wed, 30 May 2007 10:18:21 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[Integration]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[WebSite]]></category>

		<category><![CDATA[dotNet]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/05/30/this-blog-in-c/</guid>
		<description><![CDATA[I have been busy trying to write a new frontend for this blog that uses .Net. I already blogged about it here. In the last couple of weeks I have been adding stuff - permalinks using mod_rewrite, I finally show the comments properly, I have added categories and category archives (as in http://www.muscetta.net/dotnet/tag/coding). There is [...]]]></description>
			<content:encoded><![CDATA[<p>I have been busy trying to write <a href="http://www.muscetta.net/dotnet/Blog.aspx">a new frontend for this blog that uses .Net</a>. I already blogged about it <a href="http://www.muscetta.com/2007/05/01/wordpressnet/">here</a>. In the last couple of weeks I have been adding stuff - permalinks using mod_rewrite, I finally show the comments properly, I have added categories and category archives (as in <a href="http://www.muscetta.net/dotnet/tag/coding">http://www.muscetta.net/dotnet/tag/coding</a>). There is even an <a href="http://www.muscetta.net/dotnet/Feed.aspx">RSS Feed</a>.</p>
<p>The layout is still crap, but I sort of like it being so light weight, so that is not on my priority list so far. Moreover, I am a crap designer.</p>
<p>Before that, tough, I still have to add important functionalities like the possibility to POST comments (which needs a new CAPTCHA, etc, so it will take me a while), and I am having issues with text encoding (it does not show the accented characters properly, yet).</p>
<p>But I am having fun doing it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/05/30/this-blog-in-c/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Death by right-click -&gt; Delete ? Nope. PowerShell.</title>
		<link>http://www.muscetta.com/2007/05/30/death-by-right-click-delete-nope-powershell/</link>
		<comments>http://www.muscetta.com/2007/05/30/death-by-right-click-delete-nope-powershell/#comments</comments>
		<pubDate>Wed, 30 May 2007 09:55:42 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[PowerShell]]></category>

		<category><![CDATA[RSS]]></category>

		<category><![CDATA[Tools]]></category>

		<category><![CDATA[dotNet]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/05/30/death-by-right-click-delete-nope-powershell/</guid>
		<description><![CDATA[So at one stage I was testing the RSS reader capabilities of Outlook 2007, and I imported an OPML file with roughly 500 feeds! Of course I was NOT interested in reading ALL of them, and it was causing quite a bit of work to do on my machine to fetch them all and sync [...]]]></description>
			<content:encoded><![CDATA[<p>So at one stage I was testing the RSS reader capabilities of Outlook 2007, and I imported an OPML file with roughly 500 feeds! Of course I was NOT interested in reading ALL of them, and it was causing quite a bit of work to do on my machine to fetch them all and sync the content in my mailbox&#8230;</p>
<p>So I figured out it was possible to remove the subscription (from the Tools menu -&gt; Account Settings -&gt; RSS Feeds) but the folders were left there. Now, I didn&#039;t want to have those 500 folders in my mailbox, and I did not even want to die by right-clicking, pressing &#034;delete&#034;, confirming&#8230;. all of this 500 times! No way.</p>
<p>So I wrote this little PowerShell script, I guess it *might* be helpful to someone at one stage, who knows ?</p>
<p>[System.Reflection.Assembly]::LoadWithPartialName(&#039;Microsoft.Office.Interop.Outlook&#039;)<br />
$oApp = New-Object -COM &#039;Outlook.Application&#039;<br />
$rss = $oApp.GetNamespace(&#034;MAPI&#034;).GetDefaultFolder(&#034;olFolderRssFeeds&#034;)<br />
forach ($folder in $rss.Folders)<br />
{<br />
$folder.Delete()<br />
}</p>
<p>Please note that if you don&#039;t have the Office Interop Assemblies installed on your machine, you can&#039;t use the first line. As a result, you will have to change the third line hardcoding the number that represents the RSSFeeds folder, so it would become:</p>
<p>$rss = $oApp.GetNamespace(&#034;MAPI&#034;).GetDefaultFolder(25)</p>
<p>Note: I found out (later, of course) that there is a much more general post on this subject (that is, automating Outlook through PowerShell): <a href="http://www.leeholmes.com/blog/GettingThingsDoneOutlookTaskAutomationWithPowerShell.aspx">http://www.leeholmes.com/blog/GettingThingsDoneOutlookTaskAutomationWithPowerShell.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/05/30/death-by-right-click-delete-nope-powershell/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Microsoft Popfly</title>
		<link>http://www.muscetta.com/2007/05/19/microsoft-popfly/</link>
		<comments>http://www.muscetta.com/2007/05/19/microsoft-popfly/#comments</comments>
		<pubDate>Sat, 19 May 2007 07:26:24 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[Integration]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Places]]></category>

		<category><![CDATA[Social Networking]]></category>

		<category><![CDATA[WebSite]]></category>

		<category><![CDATA[popfly]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/05/19/microsoft-popfly/</guid>
		<description><![CDATA[
You can build complex web-mashups in minutes.
Read on an interesting review at programmableweb.com and, obviously, more info at the official site http://www.popfly.ms
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.popfly.ms" title="Microsoft Popfly"><img src="http://farm1.static.flickr.com/204/504146344_4b0ad07f51.jpg" alt="Microsoft Popfly" height="375" width="500" /></a></p>
<p>You can build complex web-mashups in minutes.</p>
<p>Read on <a href="http://blog.programmableweb.com/2007/05/19/microsoft-popfly/">an interesting review at programmableweb.com</a> and, obviously, more info at the <a href="http://www.popfly.ms">official site http://www.popfly.ms</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2007/05/19/microsoft-popfly/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Create a Script-Based Unit Monitor in OpsMgr2007 via the GUI</title>
		<link>http://www.muscetta.com/2007/05/10/create-a-script-based-unit-monitor-in-opsmgr2007-via-the-gui/</link>
		<comments>http://www.muscetta.com/2007/05/10/create-a-script-based-unit-monitor-in-opsmgr2007-via-the-gui/#comments</comments>
		<pubDate>Thu, 10 May 2007 20:31:40 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Coding]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[MOM]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[OpsMgr2007]]></category>

		<category><![CDATA[Personal]]></category>

		<category><![CDATA[System Center Operations Manager 2007]]></category>

		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/2007/05/10/create-a-script-based-unit-monitor-in-opsmgr2007-via-the-gui/</guid>
		<description><![CDATA[ .flickr-photo { border: solid 2px #000000; } .flickr-yourcomment { } .flickr-frame { text-align: left; padding: 3px; } .flickr-caption { font-size: 0.8em; margin-top: 0px; } 

There is not a lot of documentation for System Center Operations Manager 2007 yet.
It is coming, but there&#039;s a lot of things that changed since the previous release and I [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css"> .flickr-photo { border: solid 2px #000000; } .flickr-yourcomment { } .flickr-frame { text-align: left; padding: 3px; } .flickr-caption { font-size: 0.8em; margin-top: 0px; } </style>
<p class="flickr-frame"><a href="http://www.flickr.com/photos/dani3l3/492786198/" title="photo sharing"><img src="http://farm1.static.flickr.com/221/492786198_d85d81a5b4.jpg" class="flickr-photo" alt="Create a Script-Based Unit Monitor in OpsMgr2007 via the GUI" /></a><span class="flickr-caption"><a href="http://www.flickr.com/photos/dani3l3/492786198/"></a></span></p>
<p class="flickr-yourcomment">There is not a lot of documentation for System Center Operations Manager 2007 yet.<br />
It is coming, but there&#039;s a lot of things that changed since the previous release and I think some more would only help. Also, a lot of the content I am seeing is either too newbie-oriented or too developer-oriented, for some reason.</p>
<p>I have not yet seen a tutorial, webcast or anything that explains how to create a simple unit monitor that uses a VBS script using the GUI.</p>
<p>So this is how you do it:</p>
<p>Go to the <strong>&#034;Authoring&#034;</strong> space of OpsMgr 2007 Operations Console.<br />
Select the <strong>&#034;Management Pack objects&#034;</strong>, then <strong>&#034;Monitors&#034;</strong> node. Right click and choose <strong>&#034;Create a monitor&#034;</strong> -&gt; <strong>&#034;Unit Monitor&#034;</strong>.</p>
<p>You get the &#034;Create a monitor&#034; wizard open:<br />
<a href="http://www.flickr.com/photos/dani3l3/492786202/"><img src="http://farm1.static.flickr.com/202/492786202_861b4818fa.jpg" alt="wizard02" height="444" width="500" /></a></p>
<p>Choose to create a two-states unit monitor based on a script. Creating a three- state monitor would be pretty similar, but I&#039;ll show you the most simple one.<br />
Also, choose a Management pack that will contain your script and unit monitor, or create a new management pack.<br />
<a href="http://www.flickr.com/photos/dani3l3/492786204/"><img src="http://farm1.static.flickr.com/220/492786204_57fb878a47.jpg" alt="wizard03" height="444" width="500" /></a></p>
<p>Choose a &#034;monitor target&#034; (object classes or instances - see this webcast about targeting rules and monitors: <a href="http://www.microsoft.com/winme/0703/28666/Target_Monitoring_Edited.asx">www.microsoft.com/winme/0703/28666/Target_Monitoring_Edit&#8230;</a> ) and the aggregate rollup monitor you want to roll the state up to.</p>
<p>Choose a schedule, that is: how often would you like your script to run. For demonstration purposes I usually choose a very short interval such a two or three minutes. For production environments, tough, choose a longer time range.<br />
<a href="http://www.flickr.com/photos/dani3l3/492786208/"><img src="http://farm1.static.flickr.com/231/492786208_b48ef74259.jpg" alt="wizard04" height="444" width="500" /></a></p>
<p>Choose a name for your script, complete with a .VBS extension, and write the code of the script in the rich text box:<br />
<a href="http://www.flickr.com/photos/dani3l3/492786212/"><img src="http://farm1.static.flickr.com/196/492786212_60a675bdf5.jpg" alt="wizard05" height="444" width="500" /></a></p>
<p>As the sample code and comments suggest, you should use a script that checks for the stuff you want it to check, and returns a &#034;Property Bag&#034; that can be later interpreted by OpsMgr workflow to change the monitor&#039;s state.<br />
This is substantially different than scripting in MOM 2005, where you could only launch scripts as responses, loosing all control over their execution.</p>
<p>For demonstration purpose, use the following script code:<br />
<em> </em></p>
<p><em>On Error Resume Next<br />
Dim oAPI, oBag<br />
Set oAPI = CreateObject(&#034;MOM.ScriptAPI&#034;)<br />
Set oBag = oAPI.CreateTypedPropertyBag(StateDataType)<br />
Const FOR_APPENDING = 8<br />
strFileName = &#034;c:\testfolder\testfile.txt&#034;<br />
strContent  = &#034;test &#034;<br />
Set objFS = CreateObject(&#034;Scripting.FileSystemObject&#034;)<br />
Set objTS = objFS.OpenTextFile(strFileName,FOR_APPENDING)<br />
If Err.Number &lt;&gt; 0 Then<br />
Call oBag.AddValue(&#034;State&#034;,&#034;BAD&#034;)<br />
Else<br />
Call oBag.AddValue(&#034;State&#034;,&#034;GOOD&#034;)<br />
objTS.Write strContent<br />
End If<br />
Call oAPI.Return(oBag)</em><em><br />
</em></p>
<p>[edited on 29th of May as <a href="http://ianblythmanagement.wordpress.com/2007/05/27/scripting-in-2007/">pointed out by Ian</a>: if you cut and paste the example script you might need to change the apostrophes (“) as that causes the script to fail when run - it is an issue with the template of this blog.] [edited on 30th of May: I fixed the b