Archives

Archives / 2011 / October

Continuous Integration with TFS2010, MSDeploy & VSDBCMD

Oct 28 2011No Comments by stanley

After I created an account at Cytanium, I quickly discovered the glory of One-Click Publish. After setting up my source control in TFS. All I could think of, was getting TFS to do the same thing for me, but even I knew that wouldn't be enough. I wanted TFS to deploy my database changes as well. Well, there is that Schema Compare utility in Visual Studio, I know it can figure out and deploy changes to a database. I figured if Visual Studio can do all of these things, I should be able to as well.. …

MS Web Deploy, Team Foundation Server, Visual Studio, VSDBCMD Read more

Synchronously Await an Async Workflow Using Observable.guard

Oct 15 2011No Comments by stanley

The other day, I couldn't figure out how to Synchronously wait for an Async workflow to complete. I was pretty sure I needed to use Observable.guard, I just couldn't wrap my head around how to use it. This morning I was on a mission to figure it out. [fsharp] open System open FSharp.Control let event = new Event<_>() let createObservableByExecutingAsync asyncToExecute = event.Publish |> Observable.guard(fun _ -> let asyncOperation = async { …

Async Workflow, f#, fsharpx Read more

Rate Limiting a Function with Async Workflows

Oct 14 2011No Comments by stanley

So I am trying to deal with an API that says I cannot make more than 4 requests per second. This is a really good use for F# since it has such great support for Asynchronous Workflows. I took a little inspiration from this post by Luca Bolognese. [fsharp] module RateLimiting open System open FSharp.Control type RateLimitedMessage<'a,'b> = {payload: 'a ; response: ('b -> Async<unit>) option} type RateLimitedAgent<'a,'b>( operation: 'a -& …

Async Workflow, f#, fsharpx Read more

HashTables and New-Object -Property in Powershell

Oct 09 2011No Comments by justin

There are many uses for the New-Object cmdlet. One of the more obvious uses is to transform a HashTable to a PSObject, perhaps to be pipelined into Format-Table. [powershell] New-Object PSObject -Property @{ Name = "Justin Dearing"; Occupation = ".NET Developer" } [/powershell] That is a convenient output formatting trick because you can then pass it to an Out-* or Format-* cmdlet. However, this trick has uses beyond formatting. For example, lets say you …

Read more