Skip to content

Instantly share code, notes, and snippets.

View sliekens's full-sized avatar

Steven sliekens

View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
<!-- Windows specific commands -->
<NuGetToolsPath Condition=" '$(OS)' == 'Windows_NT'">$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
<PackagesConfig Condition=" '$(OS)' == 'Windows_NT'">$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
<PackagesDir Condition=" '$(OS)' == 'Windows_NT'">$([System.IO.Path]::Combine($(SolutionDir), "packages"))</PackagesDir>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(WebPublishMethod)' == 'FileSystem'">
<publishUrl Condition="!HasTrailingSlash('$(publishUrl)')">$(publishUrl)\</publishUrl>
<publishUrl>$(publishUrl)$(Configuration)\</publishUrl>
</PropertyGroup>
</Project>
@sliekens
sliekens / AddProjectReferences.ps1
Last active February 16, 2016 13:18
PowerShell script to recursively add all project references to a solution for the selected project.
function AddProjectReferences($project, $solution, $fullName)
{
$projects = $solution | select FullName
if ($projects.FullName -notcontains $fullName)
{
$solution.AddFromFile($fullName)
}
$dir = [System.IO.Path]::GetDirectoryName($fullName)
[xml]$msbuild = Get-Content $fullName
@sliekens
sliekens / DeploymentWellKnownTag.cs
Created April 26, 2016 11:39
DeploymentWellKnownTag
namespace Microsoft.Web.Deployment
{
public enum DeploymentWellKnownTag
{
None = 0b0000000000000000000000000000000000000000000000000000000000000000,
AppHostConfig = 0b0000000000000000000000000000000000000000000000000000000000000001,
AppPoolConfig = 0b0000000000000000000000000000000000000000000000000000000000000010,
Boolean = 0b0000000000000000000000000000000000000000000000000000000000000100,
ComObject32 = 0b0000000000000000000000000000000000000000000000000000000000001000,
ComObject64 = 0b0000000000000000000000000000000000000000000000000000000000010000,
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OnAfterPipelineCollectFilesPhase>
$(OnAfterPipelineCollectFilesPhase);
MSDeploySetParametersFile;
MSDeploySetParameters;
MSDeploySetParametersUpdate;
</OnAfterPipelineCollectFilesPhase>
</PropertyGroup>
@sliekens
sliekens / MOVED.md
Last active January 5, 2017 11:51
T-SQL migration helpers
@sliekens
sliekens / FileDownloadBlock.cs
Created June 26, 2016 09:53
FileDownloadBlock
public class FileDownloadBlock : IPropagatorBlock<Uri, Stream>
{
private readonly IPropagatorBlock<Uri, Stream> impl = new TransformBlock<Uri, Stream>(new Func<Uri, Stream>(Implementation));
private static Stream Implementation(Uri uri)
{
throw new NotImplementedException();
}
public DataflowMessageStatus OfferMessage(
using System;
using System.Diagnostics;
using System.Linq;
using System.Web;
using System.Web.Optimization;
[DebuggerStepThrough]
public static class BundleCollectionExtensions
{
public static void VerifyStyleBundles(this BundleCollection instance)
function getSequentialFocusNavigationOrder(nodeList) {
var els = Array.prototype.slice.call(nodeList);
els = els.filter(e => e.tabIndex !== -1);
els = els.filter(e => !e.disabled);
els = els.sort(function(left, right) {
if (left.tabIndex === 0) {
if (right.tabIndex === 0) {
return 0;
}
return 1;