Skip to content

Instantly share code, notes, and snippets.

@achingono
achingono / target.xml
Created Nov 12, 2018 — forked from StevenLiekens/target.xml
A list of all <Target /> tags that ship with MSBuild / Visual Studio
View target.xml
C:\Program Files (x86)\MSBuild\12.0\Bin\Microsoft.Common.CurrentVersion.targets
<Target Name="_CheckForInvalidConfigurationAndPlatform"></Target>
<Target Name="Build" Condition=" '$(_InvalidConfigurationWarning)' != 'true' " DependsOnTargets="$(BuildDependsOn)" Returns="$(TargetPath)" />
<Target Name="BeforeBuild" />
<Target Name="AfterBuild" />
<Target Name="CoreBuild" DependsOnTargets="$(CoreBuildDependsOn)"></Target>
<Target Name="Rebuild" Condition=" '$(_InvalidConfigurationWarning)' != 'true' " DependsOnTargets="$(RebuildDependsOn)" Returns="$(TargetPath)" />
<Target Name="BeforeRebuild" />
<Target Name="AfterRebuild" />
<Target Name="BuildGenerateSources" DependsOnTargets="BuildGenerateSourcesTraverse;$(BuildGenerateSourcesAction)" />
@achingono
achingono / UpdateIISBindings.ps1
Last active Nov 8, 2018
Update IIS bindings from sitecore SiteDefinitions file using powershell
View UpdateIISBindings.ps1
param(
[Parameter(Position=0,Mandatory=$true)]
[Alias("Site")]
$siteName,
[Parameter(Position=1,Mandatory=$true)]
$domain,
[Parameter(Position=2)]
$configPath = "App_Config\Include\zzz\Project.SiteDefinitions.config"
[Parameter(Position=3)]
$xpath = "/configuration/sitecore/sites/site"
@achingono
achingono / RecursivelyApplyNamespaces.ps1
Last active Nov 8, 2018
Apply namespace to multiple C# files and associated aspx files using powershell
View RecursivelyApplyNamespaces.ps1
param(
[Parameter(Position=0,Mandatory=$true)]
[Alias("Path")]
$rootPath,
[Parameter(Position=1,Mandatory=$true)]
[Alias("Namespace")]
$rootNamespace
)
$namespacePattern = "namespace\s+([^\s]+)"
@achingono
achingono / Dialog.cs
Last active Jan 4, 2016
Assert that a Twitter bootstrap dialog is visible after clicking a button
View Dialog.cs
public class Dialog<TModel> : UiComponent<TModel>
where TModel : class, new()
{
private IWebElement Element
{
get
{
return this.Find.Element(By.CssSelector(".dialog.modal"));
}
@achingono
achingono / ToggleCss.html
Created Nov 26, 2013
Dynamically Enable/Disable CSS files
View ToggleCss.html
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title></title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="/Content/Design.css">
<link rel="stylesheet" href="/Content/Print.css" disabled="disabled">
<link rel="stylesheet" href="/Content/Large.css" disabled="disabled">
</head>
@achingono
achingono / DerivingTypes.ps1
Last active Dec 14, 2015
T4 Scaffolder using the the module created by @ulfbjo [ http://pastebin.com/rjYdsuD7 ]
View DerivingTypes.ps1
[T4Scaffolding.Scaffolder(Description = "Enter a description of Generator here")][CmdletBinding()]
param(
[parameter(Mandatory = $true, Position = 0)][string]$ParentTypeName,
[string]$Project,
[string]$CodeLanguage,
[string[]]$TemplateFolders,
[switch]$Force = $false
)
$parentType = Get-ProjectType $ParentTypeName
You can’t perform that action at this time.