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

<channel>
	<title>Something by me</title>
	<atom:link href="http://www.creamdog.se/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.creamdog.se/blog</link>
	<description>Developer &#124; Dad &#124; Free radical &#124; Pipe</description>
	<lastBuildDate>Thu, 11 Aug 2011 15:15:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>purchase4charity.org</title>
		<link>http://www.creamdog.se/blog/2011/08/11/purchase4charity-org/</link>
		<comments>http://www.creamdog.se/blog/2011/08/11/purchase4charity-org/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 15:15:42 +0000</pubDate>
		<dc:creator>creamdog</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.creamdog.se/blog/?p=715</guid>
		<description><![CDATA[I have created a web charity fund raiser site over at http://purchase4charity.org/ How it works is that for every purchase made at Amazon by first clicking through on the link at purchase4charity.org will add 5% of the revenue to the fund &#8230;<p class="read-more"><a href="http://www.creamdog.se/blog/2011/08/11/purchase4charity-org/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>I have created a web charity fund raiser site over at <a href="http://purchase4charity.org/">http://purchase4charity.org/</a></p>
<p>How it works is that for every purchase made at Amazon by first clicking through on the link at purchase4charity.org will add 5% of the revenue to the fund that will be donated to charity by the end of each month.</p>
<p>So instead of buying that polo for $100 at amazon.com you can still buy it for $100 at amazon.com only that $5 of that $100 will be donated to charity!</p>
<p>So what are you waiting for?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdog.se/blog/2011/08/11/purchase4charity-org/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Essential Gear For Brogrammers</title>
		<link>http://www.creamdog.se/blog/2011/08/04/essential-gear-for-brogrammers/</link>
		<comments>http://www.creamdog.se/blog/2011/08/04/essential-gear-for-brogrammers/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 18:33:41 +0000</pubDate>
		<dc:creator>creamdog</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.creamdog.se/blog/?p=712</guid>
		<description><![CDATA[After I read &#8220;How does a programmer become a brogrammer?&#8221; I felt that something that was missing was somewhere to get all you Brogramming gear. So I whipped something up over at brogrammers.org All you brogrammers &#8220;and aspiring brogrammers&#8221;, keep it real &#8230;<p class="read-more"><a href="http://www.creamdog.se/blog/2011/08/04/essential-gear-for-brogrammers/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>After I read <a href="http://www.quora.com/How-does-a-programmer-become-a-brogrammer" target="_blank">&#8220;How does a programmer become a brogrammer?&#8221;</a> I felt that something that was missing was somewhere to get all you Brogramming gear.</p>
<p>So I whipped something up over at <a href="http://www.brogrammers.org/" target="_blank">brogrammers.org</a></p>
<p>All you brogrammers &#8220;and aspiring brogrammers&#8221;, keep it real or keep it HARD. peace out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdog.se/blog/2011/08/04/essential-gear-for-brogrammers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An imperfect world perfected</title>
		<link>http://www.creamdog.se/blog/2011/04/26/a-imperfect-world-perfected/</link>
		<comments>http://www.creamdog.se/blog/2011/04/26/a-imperfect-world-perfected/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 09:46:39 +0000</pubDate>
		<dc:creator>creamdog</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.creamdog.se/blog/?p=680</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<pre class="brush: jscript; title: ; notranslate">
// dyslexic compilation
// © 2011 christian westman

func AerSame()
{
   itn number = 0; // itn is a valid misspelling of int, so is tin or tni!
   fro i:=0;i&lt;number;i++ { // fro is a valid misspelling of for, I also accept rfo or orf!
    if nubmer == i { // misspellings of variable names in same scope are shadowed and corrected at compile time
      log.Pritnf(&quot;%s and %s are the saem!&quot;, i, nubmre) //variable names are corrected, strings are not
    }
   }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdog.se/blog/2011/04/26/a-imperfect-world-perfected/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accessing TeamCity trough IIS7 using Application Request Routing</title>
		<link>http://www.creamdog.se/blog/2011/04/05/accessing-teamcity-trough-iis7-using-application-request-routing/</link>
		<comments>http://www.creamdog.se/blog/2011/04/05/accessing-teamcity-trough-iis7-using-application-request-routing/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 08:31:32 +0000</pubDate>
		<dc:creator>creamdog</dc:creator>
				<category><![CDATA[IIS7]]></category>
		<category><![CDATA[teamcity]]></category>

		<guid isPermaLink="false">http://www.creamdog.se/blog/?p=633</guid>
		<description><![CDATA[This describes how to set up routing in IIS7 using Application Request Routing to access a TeamCity instance on the same machine. Why you want to do this is because you cannot run both IIS and TeamCity on port 80 &#8230;<p class="read-more"><a href="http://www.creamdog.se/blog/2011/04/05/accessing-teamcity-trough-iis7-using-application-request-routing/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>This describes how to set up routing in IIS7 using Application Request Routing to access a TeamCity instance on the same machine.</p>
<p>Why you want to do this is because you cannot run both IIS and TeamCity on port 80 but you would like to access TeamCity on port 80</p>
<h3>1. TeamCity</h3>
<p><a href="http://www.jetbrains.com/teamcity/">Download and install TeamCity</a>, set it to run at port 8080 and make sure it is up and running on http://localhost:8080</p>
<h3>2. Application Request Routing</h3>
<p>Download and install ARR from <a title="ARR" href="http://www.iis.net/download/applicationrequestrouting">http://www.iis.net/download/applicationrequestrouting</a></p>
<h3>3. Create a Server Farm</h3>
<p>There should be a new node in your IIS beneath &#8220;Sites&#8221; named &#8220;Server Farms&#8221;</p>
<p>- Right click on that node and choose &#8220;Create Server Farm&#8221;.</p>
<p><a href="http://www.creamdog.se/blog/wp-content/uploads/2011/04/create.png"><img class="alignnone size-full wp-image-649" title="create" src="http://www.creamdog.se/blog/wp-content/uploads/2011/04/create.png" alt="" width="900" /></a></p>
<p>- Choose a name for the farm (ex &#8220;TeamCity&#8221;) and click next.</p>
<p>- Enter &#8220;localhost&#8221; in the server address box.</p>
<p>- Click &#8220;Advanced settings&#8230;&#8221;, expand &#8220;applicationRequestRouting&#8221; and change the httpPort to 8080.</p>
<p><a href="http://www.creamdog.se/blog/wp-content/uploads/2011/04/host_port.png"><img class="size-full wp-image-637" title="host_port" src="http://www.creamdog.se/blog/wp-content/uploads/2011/04/host_port.png" alt="" width="586" height="448" /></a></p>
<p>- Click Finish.</p>
<h3>4. Configure Server Farm Routing</h3>
<p>- Expand &#8220;Server Farms&#8221; and select your newly created Farm node.</p>
<p><a href="http://www.creamdog.se/blog/wp-content/uploads/2011/04/options.png"><img class="alignnone size-full wp-image-647" title="options" src="http://www.creamdog.se/blog/wp-content/uploads/2011/04/options.png" alt="" width="900" /></a></p>
<p>- Double click on &#8220;Routing Rules&#8221;</p>
<p>- Click &#8220;URL Rewrite&#8230;&#8221; beneath &#8220;Advanced Routing&#8221; on the right.</p>
<p>- Double click on the single folder beneath Inbound rules.</p>
<p>- Set the top &#8220;Match URL&#8221; to Regular Expression and the Pattern to &#8220;.*&#8221;</p>
<p>- Expand &#8220;Conditions&#8221; and add &#8220;input={HTTP_HOST},Type=Matches the Pattern, Pattern=teamcity.internal-server.com&#8221;</p>
<p><a href="http://www.creamdog.se/blog/wp-content/uploads/2011/04/pattern.png"><img class="size-full wp-image-635" title="pattern" src="http://www.creamdog.se/blog/wp-content/uploads/2011/04/pattern.png" alt="" width="900" /></a></p>
<p>- Click &#8220;Apply&#8221;</p>
<h3>5. Done!</h3>
<p>You should now be able to access TeamCity trough IIS7 via the url ﻿http://teamcity.internal-server.com/login.html</p>
<p><a href="http://www.creamdog.se/blog/wp-content/uploads/2011/04/final.png"><img class="alignnone size-full wp-image-645" title="final" src="http://www.creamdog.se/blog/wp-content/uploads/2011/04/final.png" alt="" width="742" height="573" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdog.se/blog/2011/04/05/accessing-teamcity-trough-iis7-using-application-request-routing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>the world wide web : what is the matrix?</title>
		<link>http://www.creamdog.se/blog/2011/03/19/the-world-wide-web-what-is-the-matrix/</link>
		<comments>http://www.creamdog.se/blog/2011/03/19/the-world-wide-web-what-is-the-matrix/#comments</comments>
		<pubDate>Sat, 19 Mar 2011 15:04:51 +0000</pubDate>
		<dc:creator>creamdog</dc:creator>
				<category><![CDATA[decentralization]]></category>
		<category><![CDATA[ranting]]></category>

		<guid isPermaLink="false">http://www.creamdog.se/blog/?p=583</guid>
		<description><![CDATA[In the movie &#8220;The Matrix&#8221; humanity has created intelligent machines, soon after a war brakes out and the machines win. One of the strategies in the war against the machines was to scorch the skies as the machines where mainly &#8230;<p class="read-more"><a href="http://www.creamdog.se/blog/2011/03/19/the-world-wide-web-what-is-the-matrix/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.creamdog.se/blog/wp-content/uploads/2011/03/redblue_pill.jpg"><img class="alignleft size-full wp-image-586" style="margin: 0 15px 15px 0;" title="redblue_pill" src="http://www.creamdog.se/blog/wp-content/uploads/2011/03/redblue_pill.jpg" alt="" width="240" height="180" /></a> In the movie <a title="The Matrix on wikipedia" href="http://en.wikipedia.org/wiki/The_matrix" target="_blank">&#8220;The Matrix&#8221;</a> humanity has created intelligent machines, soon after a war brakes out and the machines win. One of the strategies in the war against the machines was to scorch the skies as the machines where mainly solar powered.  In order to sustain themselves the machines used humans as batteries connected to a computer system where they lived out their lives in a virtual reality, oblivious to how they where used and later disposed of when they eventually die.</p>
<p>In this movie there are people who have realized how they are controlled by the system and has broken free. They liberate others and offer them a choice, either take the blue pill and continue to live out their lives in ignorance or take the red pill, live in the real world and help change it into a better place.</p>
<p><br style="clear: both;" /></p>
<h2>IPV4/V6: says who we are</h2>
<p>Whenever you connect to the internet you connect trough a Internet Service Provider (ISP). As you do so you are assigned a unique IP address either randomly or static. If you have been assigned a IPV4 address it would look something like this: <em>209.85.148.106. </em></p>
<p><em> </em>This is not very readable for humans and a IPV6 (<em>2001:0db8:85a3:0000:0000:8a2e:0370:7334</em>) is even worse!</p>
<p>We could bypass ISP by building a decentralized network of WIFI nodes where each node is connected to one or more node in the network and each node may have zero or more users connected to it by WIFI. All users connected to this network would be able to communicate with eachother and if any node in the network would be connected to the internet, every one would have access to it.</p>
<p>A node in this network could be a dekstop, laptop or whatever computer with WIFI enabled and the right software. You could build one using a <a title="bifferos.bizhat.com" href="http://bifferos.bizhat.com/" target="_blank">£35 Bifferboard</a>, just add a WIFI dongle and some software.</p>
<h2>DNS: controls who we are</h2>
<p>The solution is to map a IP address to something more readable, instead of printing 209.85.148.106 on your business cards you can print www.google.com</p>
<p>So it is basically the same idea that your social security number is a unique identifier for you as a individual but your name is how you are known to others.</p>
<p>How this mapping is done today is via the DNS system, if you register www.something.com and point it to 127.0.0.1 this is registered in the root DNS system managed by <a title="iana.org" href="http://iana.org" target="_blank">IANA</a> and then replicated across other DNS nodes like the ones managed by your ISP.</p>
<p>This must mean that whoever is in a position to excerpt control over <a title="iana.org" href="http://iana.org" target="_blank">IANA</a> basically has the power to census the internet on a fundamental level.</p>
<p>Last I checked <a title="iana.org" href="http://IANA.ORG" target="_blank">IANA</a> is managed by<a title="icann.org" href="http://icann.org" target="_blank"> ICANN</a> that is based in the USA which means that the operate beneath said nations set of laws (and whatever state). This in turn means that control over all domains in the world rests with one nation and relies on their good will.</p>
<p>There are already ideas on how to leave DNS and instead use a decentralized system where there are no ownership of domains, instead you are who the majority agrees upon you are.</p>
<h2><span style="font-size: 20px; font-weight: bold;">Certificate Authority: provides basic security, for a price</span></h2>
<p>A SSL certificate basically provides you with two things.</p>
<ol>
<li>Authentication: wheres the certificate certifies to your visitor that you are who you claim to be.</li>
<li>Integrity: wheres the traffic between you and the client is encrypted</li>
</ol>
<p>A Certificate Authority is whoever sells you the certificate, browser maintains a list of CA&#8217;s so whenever you navigate to a website with https it verifies the website certificate against said list. If you want to secure your website with a certificate be prepared that you may pay a hefty price. Why it is so expensive is because they can.</p>
<p>There is no way to just enable encrypted traffic without registering with a CA (or make it difficult to use your service) which in turn means that our integrity was never a priority when they laid the foundation of the the internet. I like to think about how we time and time again fail to measure something like time, eventually we just give up, make odd/even numbers of days for each month and throw in leap years just to keep everything from falling apart. I feel the same way about the fundamentals of the world wide web.</p>
<p>DNS and CA is the glue of the world wide web and also the whip &amp; chain used to moderate it. In a decentralized name lookup system, certificates could be used to verify authenticity of the service if needed. A non profit CA could be established to ensure security and integrity for all.</p>
<p>In the movie &#8220;The Matrix&#8221; there are individuals that know all about how they are used by the machines but still they want to go back into the virtual world and forget. I believe this behavior is the same with internet users, why change something that works and why should we care as long as I can check Facebook every now and then?</p>
<p>What is the matrix you ask? you are looking at it right now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdog.se/blog/2011/03/19/the-world-wide-web-what-is-the-matrix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft SQL Server, version control and deployment using MSDeploy and Phantom</title>
		<link>http://www.creamdog.se/blog/2011/03/17/microsoft-sql-server-version-control-and-deployment-using-msdeploy-and-phantom/</link>
		<comments>http://www.creamdog.se/blog/2011/03/17/microsoft-sql-server-version-control-and-deployment-using-msdeploy-and-phantom/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 22:07:56 +0000</pubDate>
		<dc:creator>creamdog</dc:creator>
				<category><![CDATA[automation]]></category>
		<category><![CDATA[boo]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[phantom]]></category>
		<category><![CDATA[webdeploy]]></category>

		<guid isPermaLink="false">http://www.creamdog.se/blog/?p=512</guid>
		<description><![CDATA[Managing database schema&#8217;s and keeping stored procedures up to date can become quite complex during long term development. We have ways to version control source code but how do we version control the database schema and other stuff like stored procedures? How can &#8230;<p class="read-more"><a href="http://www.creamdog.se/blog/2011/03/17/microsoft-sql-server-version-control-and-deployment-using-msdeploy-and-phantom/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Managing database schema&#8217;s and keeping stored procedures up to date can become quite complex during long term development. We have ways to version control source code but how do we version control the database schema and other stuff like stored procedures?</p>
<p>How can we cover this in our automatic deployment setup?</p>
<p>The goal is to never use SQL Management Studio during development and instead rely on updating version controlled .sql files and let these make updates to the database during deployment.</p>
<p>This post covers how to export Microsoft SQL Server stored procedures, adding them to our solution, managing schema updates and deploying changes using <a href="https://github.com/creamdog/Phantom" target="_blank">Phantom with MSDeploy</a></p>
<h1>1. Add to version control</h1>
<p>First we needed to export all store procedures from our database and add them as .sql script files to our solution project. This way they can be version controlled together with our project and later be used to update any target database when we make a deploy.</p>
<p><a href="http://www.creamdog.se/blog/wp-content/uploads/2011/03/hermesDB3.png"><img class="alignleft size-medium wp-image-565" title="Database Example" src="http://www.creamdog.se/blog/wp-content/uploads/2011/03/hermesDB3-269x300.png" alt="" width="269" height="300" /></a></p>
<p><a href="http://www.creamdog.se/blog/wp-content/uploads/2011/03/hermesDB2.png"><img class="alignleft size-medium wp-image-525" style="margin-right: 40px;" title="Solution Example" src="http://www.creamdog.se/blog/wp-content/uploads/2011/03/hermesDB2-272x300.png" alt="" width="272" height="300" /></a></p>
<ol>
<li>Right click the database</li>
<li>Choose Tasks</li>
<li>Generate Scripts</li>
<li>Click Next</li>
<li>Select specific database objects</li>
<li>Select all stored procedures</li>
<li>Click Next</li>
<li>Select &#8220;Single file per object&#8221;</li>
<li>Advanced &gt; select &#8220;Include if NOT EXISTS&#8221;</li>
<li>Advanced &gt; select &#8220;Script DROP and CREATE&#8221;</li>
<li>Advanced &gt; deselect &#8220;Script USE DATABASE&#8221;</li>
<li>Choose where to dump the .sql files</li>
<li>Click Next</li>
<li>Click Next</li>
<li>Done!</li>
</ol>
<p><br style="clear: both;" /></p>
<p>Add the .sql files to your solution. The sync.sql is where we keep all the schema updates.</p>
<pre>-- Example sync.sql

-- 2011-05-03 : Added author to Article
--
if not exists (select 1 from INFORMATION_SCHEMA.columns where table_name = 'Articles' and column_name = 'Author')
	alter table [Articles] add [Author] [nvarchar](255) NULL

-- 2011-03-26 : Added Date to Source
--
if not exists (select 1 from INFORMATION_SCHEMA.columns where table_name = 'Sources' and column_name = 'Date')
begin
	alter table [Sources] add [Date] [datetime] NOT NULL
        alter table [Sources] add constraint [DF_Sources_Date]  DEFAULT (getdate()) for [Date]
end</pre>
<h1>2. Modify deploy procedure</h1>
<p>We need to add steps to our deploy process where these script files are executed towards our deploy targets. Since we are using Phantom I added something like the following to our build.boo script. The reason why I chose to combine all .sql files into one big one was because it takes a very long time to execute 50+ such files one by one using MSDeploy.</p>
<pre class="brush: jscript; title: ; notranslate">
//file: build.boo

import System.IO

solution_file = &quot;./example.sln&quot;
configuration = &quot;release&quot;
output_path = &quot;./output&quot;
sql_file_path = &quot;c:/tmp/bigfile.sql&quot;

target default, (build, clean):
  pass

target build:
  msbuild(file: solution_file, configuration: configuration, properties: {&quot;OutputPath&quot;: output_path})

target deploy, (build, deploy_codebase_to_some_machine, update_sql, clean):
  pass

target deploy_codebase_to_some_machine:
  ..deploy stuff &lt;snip&gt;

desc &quot;combine all .sql files into one big one&quot;
target build_sql_script:
	file = File.Open(sql_file_path,FileMode.Create)
	writer = StreamWriter(file)
	with FileList(&quot;./.sql&quot;):
		.Flatten(true)
		.Include(&quot;**/*.sql&quot;)
		.ForEach def(file):
			writer.Write(&quot;\n\n&quot;)
			writer.Write(File.ReadAllText(file.FullName))
	writer.Close()

target update_sql, (build_sql_script):
	msdeploy(verb:&quot;sync&quot;, source: {&quot;dbFullSql&quot;:sql_file_path}, dest: {&quot;dbFullSql&quot;:&quot;data source=127.0.0.2;initial catalog=Hermes;password=god!secure;persist security info=True;user id=admin;packet size=4096&quot;})

target clean:
  rm(output_path)
  rm(sql_file_path)
</pre>
<h1>3. Invoke</h1>
<p>This script can be used to perform a deploy, complete with schema updates and stored procedures by invoking:</p>
<pre>phantom.exe deploy</pre>
<p>- or to only update schema and stored procedures:</p>
<pre>phantom.exe update_sql</pre>
<p>All that is left is to add this to the build server, add some triggers and you are all set. good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdog.se/blog/2011/03/17/microsoft-sql-server-version-control-and-deployment-using-msdeploy-and-phantom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Browser portability</title>
		<link>http://www.creamdog.se/blog/2011/03/16/browser-portability/</link>
		<comments>http://www.creamdog.se/blog/2011/03/16/browser-portability/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 07:44:49 +0000</pubDate>
		<dc:creator>creamdog</dc:creator>
				<category><![CDATA[ranting]]></category>
		<category><![CDATA[standards]]></category>

		<guid isPermaLink="false">http://www.creamdog.se/blog/?p=489</guid>
		<description><![CDATA[Me favoring a browser depends on (amongst other things) if I can take the browser experience with me as I venture in between platforms. Oh! lets me count the ways! Browser Windows OSX GNU/Linux Chrome Yes Yes Yes Safari Yes &#8230;<p class="read-more"><a href="http://www.creamdog.se/blog/2011/03/16/browser-portability/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Me favoring a browser depends on (amongst other things) if I can take the browser experience with me as I venture in between platforms.</p>
<p>Oh! lets me count the ways!</p>
<table>
<tbody>
<tr>
<th>Browser</th>
<th>Windows</th>
<th>OSX</th>
<th>GNU/Linux</th>
</tr>
<tr>
<td>Chrome</td>
<td style="background: green; color: white;">Yes</td>
<td style="background: green; color: white;">Yes</td>
<td style="background: green; color: white;">Yes</td>
</tr>
<tr>
<td>Safari</td>
<td style="background: green; color: white;">Yes</td>
<td style="background: green; color: white;">Yes</td>
<td style="background: red; color: white;">No</td>
</tr>
<tr>
<td>Firefox</td>
<td style="background: green; color: white;">Yes</td>
<td style="background: green; color: white;">Yes</td>
<td style="background: green; color: white;">Yes</td>
</tr>
<tr>
<td>Internet Explorer</td>
<td style="background: green; color: white;">Yes</td>
<td style="background: red; color: white;">No</td>
<td style="background: red; color: white;">No</td>
</tr>
</tbody>
</table>
<p>When I work I use the browsers in the following way</p>
<ol>
<li>Chrome for gathering information and leisure browsing</li>
<li>Firefox for development (firebug)</li>
<li>IE to see if it fucks everything up or not</li>
<li>Safari, rarely</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdog.se/blog/2011/03/16/browser-portability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deploy and install .NET Windows services using MSDeploy &amp; Phantom</title>
		<link>http://www.creamdog.se/blog/2011/03/12/deploy-and-install-net-windows-services-using-msdeploy-phantom/</link>
		<comments>http://www.creamdog.se/blog/2011/03/12/deploy-and-install-net-windows-services-using-msdeploy-phantom/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 21:19:05 +0000</pubDate>
		<dc:creator>creamdog</dc:creator>
				<category><![CDATA[automation]]></category>
		<category><![CDATA[boo]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[phantom]]></category>
		<category><![CDATA[webdeploy]]></category>

		<guid isPermaLink="false">http://www.creamdog.se/blog/?p=432</guid>
		<description><![CDATA[I recently needed to deploy a .NET Windows service to a remote machine and, if needed, install it. The first part was to be able to install or uninstall a .NET Windows service using InstallerTool.exe in the following way: Install &#62;&#62; &#8230;<p class="read-more"><a href="http://www.creamdog.se/blog/2011/03/12/deploy-and-install-net-windows-services-using-msdeploy-phantom/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>I recently needed to deploy a <a title="Writing a Useful Windows Service in .NET in Five Minutes [Dave Fetterman]" href="http://blogs.msdn.com/b/bclteam/archive/2005/03/15/396428.aspx" target="_blank">.NET Windows service</a> to a remote machine and, if needed, install it.</p>
<p>The first part was to be able to install or uninstall a .NET Windows service using <a href="http://msdn.microsoft.com/en-us/library/50614e95(v=vs.80).aspx" target="_blank">InstallerTool.exe</a> in the following way:</p>
<pre>Install   &gt;&gt; InstallerTool.exe /name=MyService /account=user /user=domain\username /password=password ./service.exe
Uninstall &gt;&gt; InstallerTool.exe /u /name=MyService ./service.exe</pre>
<p>To do this without needing to manually enter credentials in a popup window I needed to modify my installer class. In order for it to accept credentials and stuff from the command line parameters I added the following to my installer.</p>
<pre class="brush: csharp; title: ; notranslate">
protected override void OnBeforeInstall(IDictionary savedState)
{
	base.OnBeforeInstall(savedState);

	this.processInstaller = this.processInstaller ?? new ServiceProcessInstaller();
	this.serviceInstaller = this.serviceInstaller ?? new ServiceInstaller();

	this.serviceInstaller.ServiceName = string.IsNullOrEmpty(GetContextParameter(&quot;name&quot;)) ? this.serviceInstaller.ServiceName : GetContextParameter(&quot;name&quot;);
	this.serviceInstaller.Description = string.IsNullOrEmpty(GetContextParameter(&quot;desc&quot;)) ? this.serviceInstaller.Description : GetContextParameter(&quot;desc&quot;);

	switch (GetContextParameter(&quot;account&quot;).ToLower())
	{
		case &quot;user&quot;:
			this.processInstaller.Account = ServiceAccount.User;
			this.serviceInstaller.Username = string.IsNullOrEmpty(GetContextParameter(&quot;user&quot;)) ? this.serviceInstaller.Username : GetContextParameter(&quot;user&quot;);
			this.serviceInstaller.Password = string.IsNullOrEmpty(GetContextParameter(&quot;password&quot;)) ? this.serviceInstaller.Password : GetContextParameter(&quot;password&quot;);
			break;
		case &quot;localservice&quot;:
			this.processInstaller.Account = ServiceAccount.LocalService;
			break;
		case &quot;localsystem&quot;:
			this.processInstaller.Account = ServiceAccount.LocalSystem;
			break;
		case &quot;networkservice&quot;:
			this.processInstaller.Account = ServiceAccount.NetworkService;
			break;
	}
}

protected override void OnBeforeUninstall(IDictionary savedState)
{
	base.OnBeforeUninstall(savedState);
	this.serviceInstaller.ServiceName = string.IsNullOrEmpty(GetContextParameter(&quot;name&quot;)) ? this.serviceInstaller.ServiceName : GetContextParameter(&quot;name&quot;);
}

private string GetContextParameter(string key)
{
	return Context.Parameters.ContainsKey(key) ? Context.Parameters[key] : string.Empty;
}
</pre>
<p>I am using my <a title="Phantom on Github" href="https://github.com/creamdog/Phantom" target="_blank">Phantom fork on Github</a> that adds a wrapper for MSDeploy.exe</p>
<p>In this example <a href="http://msdn.microsoft.com/en-us/library/50614e95(v=vs.80).aspx" target="_blank">InstallUtil.exe</a> is deployed together with my service to the remote machine in the folder <em>&#8220;./installer/installUtil.exe&#8221;</em></p>
<p>Example script usage:</p>
<pre>deploy             &gt;&gt; pantom.exe build deploy clean
deploy &amp; install   &gt;&gt; pantom.exe build deploy install clean
deploy &amp; uninstall &gt;&gt; pantom.exe build deploy uninstall clean</pre>
<pre class="brush: jscript; title: ; notranslate">
# file: build.boo
# deploys and install or uninstalls services on a remote machine
solution_file = &quot;./solution.sln&quot;
configuration = &quot;release&quot;
output_path = &quot;./phantom.build&quot;

remote_path=&quot;E:/Services/service&quot;
remote_installer = deploy_path+&quot;/installer/installUtil.exe&quot;
remote_server = &quot;127.0.0.1&quot;
remote_username = &quot;admin&quot;
remote_password = &quot;god!secure&quot;
remote_uninstall_cmd = remote_installer_path+&quot; /u /name=MyService &quot;+deploy_path+&quot;/service.exe&quot;
remote_install_cmd = remote_installer_path+&quot; /name=MyService /account=user /user=domain\\username /password=password &quot;+deploy_path+&quot;/service.exe&quot;

target default, (build, clean):
pass

target build:
msbuild(file: solution_file, configuration: configuration, properties: {&quot;OutputPath&quot;: output_path })

target deploy:
msdeploy(verb: &quot;sync&quot;,source:{&quot;dirPath&quot;: output_path}, dest: {&quot;dirPath&quot;:remote_path,&quot;wmsvc&quot;:remote_server,&quot;authType&quot;:&quot;basic&quot;,&quot;userName&quot;:remote_username,&quot;password&quot;:remote_password},flags:&quot;-allowUntrusted&quot;)

target uninstall:
msdeploy(verb: &quot;sync&quot;, source:{&quot;runCommand&quot;:remote_uninstall_cmd}, dest: {&quot;auto&quot;:&quot;&quot;,&quot;wmsvc&quot;:remote_server,&quot;authType&quot;:&quot;basic&quot;,&quot;userName&quot;:deploy_username,&quot;password&quot;:deploy_password},flags:&quot;-allowUntrusted&quot;)

target install:
msdeploy(verb: &quot;sync&quot;, source:{&quot;runCommand&quot;:remote_install_cmd}, dest: {&quot;auto&quot;:&quot;&quot;,&quot;wmsvc&quot;:remote_server,&quot;authType&quot;:&quot;basic&quot;,&quot;userName&quot;:remote_username,&quot;password&quot;:remote_password},flags:&quot;-allowUntrusted&quot;)

target clean:
rm(output_path)
</pre>
<p>You may need to add some privileges to the WMSVC service running on the remote machine</p>
<pre>c:\&gt; sc privs wmsvc SeChangeNotifyPrivilege/SeImpersonatePrivilege/SeAssignPrimaryTokenPrivilege/SeIncreaseQuotaPrivilege
c:\&gt; sc stop wmsvc
c:\&gt; sc start wmsvc</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdog.se/blog/2011/03/12/deploy-and-install-net-windows-services-using-msdeploy-phantom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>backup and deploy using MSDeploy and Phantom with configuration version control</title>
		<link>http://www.creamdog.se/blog/2011/03/02/backup-and-deploy-using-msdeploy-and-phantom-with-configuration-version-control/</link>
		<comments>http://www.creamdog.se/blog/2011/03/02/backup-and-deploy-using-msdeploy-and-phantom-with-configuration-version-control/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 14:03:17 +0000</pubDate>
		<dc:creator>creamdog</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[boo]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[phantom]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[webdeploy]]></category>

		<guid isPermaLink="false">http://www.creamdog.se/blog/?p=395</guid>
		<description><![CDATA[Working on a project that spans several environments like development, testing, staging and production can prove difficult when it comes to managing their configuration files. Because they are basically the same configuration files but with different settings, like pointing on &#8230;<p class="read-more"><a href="http://www.creamdog.se/blog/2011/03/02/backup-and-deploy-using-msdeploy-and-phantom-with-configuration-version-control/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Working on a project that spans several environments like development, testing, staging and production can prove difficult when it comes to managing their configuration files.</p>
<p>Because they are basically the same configuration files but with different settings, like pointing on different databases or enable/disable debug stuff.</p>
<p>Using my recent <a title="Github" href="https://github.com/creamdog/Phantom" target="_blank">Github fork of Phantom</a> I am now able to do this:</p>
<ol>
<li>Deploy a website/application using MSDeploy</li>
<li>Backup an existing website/application before deploying, also using MSDeploy</li>
<li>Version control configuration files and deploy the correct set to a given environment</li>
</ol>
<p>The following build.boo show how to configure  backups,  configuration files and deploy targets for the same solution.</p>
<p><em>this script assumes that there is a directory named &#8220;.configurations&#8221; in the solution directory and that it contains two sub folders named &#8220;staging&#8221; and &#8220;production&#8221;</em></p>
<pre class="brush: php; title: ; notranslate">
solution_file = &quot;solution.sln&quot;
configuration = &quot;release&quot;

output_path = &quot;./.output&quot;
published_web_path = output_path + &quot;/_PublishedWebsites/website&quot;
package_path = output_path+&quot;/deploy_package&quot;

remote_backup_folder = &quot;{path on remote machine}/some_name_[&quot;+System.Environment.MachineName +&quot;]_&quot;+ date.Now.ToString(&quot;yyyy.MM.dd.hh.mm.ss&quot;)

msdeploy_authentication_staging = &quot;,wmsvc=\&quot;127.0.0.1\&quot;,authType=\&quot;basic\&quot;,userName=\&quot;admin\&quot;,password=\&quot;god!secure\&quot;&quot;
msdeploy_authentication_production = &quot;,wmsvc=\&quot;127.0.0.2\&quot;,authType=\&quot;basic\&quot;,userName=\&quot;admin\&quot;,password=\&quot;god!more!secure\&quot;&quot;

target default, (build, clean):
  pass

target build:
  msbuild(file: solution_file, configuration: configuration, properties: {&quot;OutputPath&quot;: output_path })

target package:
  rm(package_path)
  with FileList(published_web_path):
    .Exclude(&quot;{*.config, *.txt}&quot;)
    .ForEach def(file):
      file.CopyToDirectory(package_path)

target deploy_to_staging, (clean, build, package, backup_staging, clean):

	with FileList(&quot;./.configurations/staging/&quot;):
		.Include(&quot;**&quot;)
		.ForEach def(file):
			file.CopyToDirectory(package_path)

	msdeploy(skipfiles: (&quot;.*\\.bak&quot;,&quot;.*\\.txt&quot;), verb: &quot;sync&quot;, source: &quot;iisApp=&quot;+package_path, dest: &quot;iisApp=\&quot;Default Website\&quot;&quot;+msdeploy_authentication_staging)

target deploy_to_production, (clean, build, package, backup_production, clean):

	with FileList(&quot;./.configurations/production/&quot;):
		.Include(&quot;**&quot;)
		.ForEach def(file):
			file.CopyToDirectory(package_path)

	msdeploy(skipfiles: (&quot;.*\\.bak&quot;,&quot;.*\\.txt&quot;), verb: &quot;sync&quot;, source: &quot;iisApp=&quot;+package_path, dest: &quot;iisApp=\&quot;Default Website\&quot;&quot;+msdeploy_authentication_production )

target backup_staging:
	msdeploy(verb: &quot;sync&quot;, source: &quot;iisApp=\&quot;Default Website\&quot;&quot;+msdeploy_authentication_staging, dest: &quot;archivedir=\&quot;&quot;+remote_backup_folder+&quot;\&quot;+msdeploy_authentication_staging)

target backup_production:
	msdeploy(verb: &quot;sync&quot;, source: &quot;iisApp=\&quot;Default Website\&quot;&quot;+msdeploy_authentication_production , dest: &quot;archivedir=\&quot;&quot;+remote_backup_folder+&quot;\&quot;+msdeploy_authentication_production )

target clean:
  rm(output_path)
</pre>
<p>Example usage:</p>
<ul>
<li><em>&#8220;Phantom.exe deploy_to_staging&#8221;</em> : builds, makes a backup, configures and deploys</li>
<li><em>&#8220;Phantom.exe deploy_to_production&#8221;</em> : builds, makes a backup, configures and deploys</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdog.se/blog/2011/03/02/backup-and-deploy-using-msdeploy-and-phantom-with-configuration-version-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Continuous Integration using Phantom and MSDeploy</title>
		<link>http://www.creamdog.se/blog/2011/02/28/continuous-integration-using-phantom-and-msdeploy/</link>
		<comments>http://www.creamdog.se/blog/2011/02/28/continuous-integration-using-phantom-and-msdeploy/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 20:57:44 +0000</pubDate>
		<dc:creator>creamdog</dc:creator>
				<category><![CDATA[automation]]></category>
		<category><![CDATA[boo]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[phantom]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[webdeploy]]></category>

		<guid isPermaLink="false">http://www.creamdog.se/blog/?p=362</guid>
		<description><![CDATA[Phantom is a pretty sweet .NET build system by Jeremy Skinner written in C# and Boo. I recently forked it on github as I wanted to add support for aspnet_compiler.exe and msdeploy.exe for use in one of our bigger projects. &#8230;<p class="read-more"><a href="http://www.creamdog.se/blog/2011/02/28/continuous-integration-using-phantom-and-msdeploy/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Phantom is a pretty sweet .NET build system by <a title="Phantom on github" href="https://github.com/JeremySkinner/Phantom" target="_blank">Jeremy Skinner</a> written in C# and Boo.</p>
<p>I recently <a title="github" href="https://github.com/creamdog/Phantom/" target="_blank">forked it</a> on github as I wanted to add support for aspnet_compiler.exe and msdeploy.exe for use in one of our bigger projects.</p>
<p>These are just two simple wrappers for <a title="github" href="https://github.com/creamdog/Phantom/blob/master/src/Phantom.Core/Builtins/MSDeploy.cs" target="_blank">msdeploy.exe</a> and <a title="github" href="https://github.com/creamdog/Phantom/blob/master/src/Phantom.Core/Builtins/AspNetCompiler.cs" target="_blank">aspnet_compiler.exe</a> - basic and crude, but they do work.</p>
<p>With these in my build.boo script I can make a deploy simply by calling<em> &#8220;Phantom.exe build publish deploy&#8221;</em></p>
<p>Nothing left but to set it up in Team City with the appropriate triggers <img src='http://www.creamdog.se/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The next step I guess is to throw in the updating of configuration files.</p>
<pre>solution_file = "./solution.sln"
configuration = "release"

output_path = "./.output/solution.build"
publish_path = output_path+"/published.solution"

deploy_src = "iisApp=\""+publish_path+"\""
deploy_dest_test = "iisApp=\"website/application\",wmsvc=\"127.0.0.1\",authType=\"basic\",userName=\"admin\",password=\"god\" -allowUntrusted"
deploy_dest_stage = "iisApp=\"website/application\",wmsvc=\"127.0.0.2\",authType=\"basic\",userName=\"admin\",password=\"god!secure\" -allowUntrusted"

target default, (build, clean):
  pass

target build:
  msbuild(file: solution_file, configuration: configuration, properties: {"OutputPath": output_path, "TrackFileAccess": false})

target publish:
  aspnetcompiler(physicalpath: "./", virtualpath: "App", targetpath: publish_path)

target deploy, (deploy_test):
  pass

target deploy_test:
  msdeploy(skipfiles: (".*\\.config",".*\\.txt"),verb: "sync", source: deploy_src, dest: deploy_dest_test)

target deploy_stage:
  msdeploy(skipfiles: (".*\\.config",".*\\.txt"),verb: "sync", source: deploy_src, dest: deploy_dest_stage)  

target clean:
  rm(output_path)</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdog.se/blog/2011/02/28/continuous-integration-using-phantom-and-msdeploy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

