This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Unity.Extensions { | |
using Microsoft.Practices.Unity; | |
public static class UnityContainerExtensions | |
{ | |
public static IUnityContainer RegisterExportFactory<T>(this IUnityContainer container) | |
{ | |
return container.RegisterType<ExportFactory<T>>(new InjectionFactory(CreateExportFactory<T>)); | |
} | |
private static ExportFactory<T> CreateExportFactory<T>(IUnityContainer container, Type type, string name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading.Tasks; | |
namespace MyCompany.Windows.Reactive | |
{ | |
public interface ISplashPresenter | |
{ | |
Task ShowAsync(); | |
Task DisplayMessage(string messageFormat, params object[] args); | |
Task CloseAsync(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configuration ProGet_Install | |
{ | |
param | |
( | |
# Target node to apply the configuration | |
[string] $NodeName = 'localhost', | |
[ValidateSet('Express','Trial','LicenseKey')] | |
[string] $Edition = "LicenseKey", #Choices are Trial, LicenseKey, and Express | |
[string] $LicenseKey="", | |
[string] $Email = "[email protected]", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create or replace function csvToTable(p_clob_text in varchar2) | |
return sys.dbms_debug_vc2coll pipelined | |
is | |
next_new_line_indx pls_integer; | |
remaining_text varchar2(20000); | |
next_piece_for_piping varchar2(20000); | |
begin | |
remaining_text := p_clob_text; | |
loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[string]$NuGetDir=".\.nuget\" | |
) | |
function Download-File { | |
param ( | |
[string]$url, | |
[string]$file | |
) | |
Write-Host "Downloading $url to $file" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[diff] | |
tool = vsdiffmerge | |
[difftool] | |
prompt = true | |
[difftool "vsdiffmerge"] | |
cmd = \"C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\vsdiffmerge.exe\" \"$LOCAL\" \"$REMOTE\" //t | |
keepbackup = false | |
trustexistcode = true | |
[merge] | |
tool = vsdiffmerge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Akka.Persistence.Sandbox | |
{ | |
using Akka.Actor; | |
public class MyPersistenceExtension: IExtension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// credit: http://madskristensen.net/post/A-shorter-and-URL-friendly-GUID | |
using System; | |
public static class GuidEncoder | |
{ | |
public static string Encode(string guidText) | |
{ | |
Guid guid = new Guid(guidText); | |
return Encode(guid); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Script to restore nuget packages | |
.DESCRIPTION | |
Script to restore nuget packages | |
.PARAMETER Site | |
The web site name. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare | |
table_count integer; | |
begin | |
select count (object_id) into table_count from user_objects where exists ( | |
select object_name from user_objects where (object_name = upper('{0}') and object_type = 'TABLE')); | |
if table_count = 0 then | |
dbms_output.put_line('Creating the {0} table'); | |
execute immediate ( |
OlderNewer