This file contains hidden or 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( | |
$path | |
) | |
$files = Get-ChildItem -Path $path -File | |
$files | % { | |
$fileInfo = $_ | |
$doc = [xml](Get-Content $fileInfo.FullName) | |
$pageNode = $doc.DocumentElement.SelectSingleNode("Pages") |
This file contains hidden or 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 ( | |
$Server, | |
$Database, | |
$Direction = "left to right", | |
$IncludeDoctypes = $true, | |
[Switch] | |
$IncludeElements = $false, | |
[Switch] | |
$IncludeProperties = $false | |
) |
This file contains hidden or 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
# run in %programfiles%\Steam\steamapps | |
$files = Get-ChildItem -Path *.acf | |
$files | % { | |
$file = $_ | |
$content = get-content $_ | |
$content | % { | |
if ($_.Contains("AutoUpdateBehavior")) { | |
$_.Replace("0", "2") |
This file contains hidden or 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
let | |
Coalesce = (items as list) => | |
let | |
listOfFirst = List.FirstN(List.Select(items, each _ <> "" and _ <> null), 1), | |
first = try List.Single(#"listOfFirst") otherwise null | |
in | |
first | |
in | |
Coalesce |
This file contains hidden or 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
// umbracoPropertyData | |
let | |
Source = Sql.Database(".\sqlexpress", "[your database]"), | |
dbo_umbracoPropertyData = Source{[Schema="dbo",Item="umbracoPropertyData"]}[Data], | |
#"Expanded cmsPropertyType" = Table.ExpandRecordColumn(dbo_umbracoPropertyData, "cmsPropertyType", {"Alias", "Name", "umbracoDataType"}, {"cmsPropertyType.Alias", "cmsPropertyType.Name", "cmsPropertyType.umbracoDataType"}), | |
#"Expanded cmsPropertyType.umbracoDataType" = Table.ExpandRecordColumn(#"Expanded cmsPropertyType", "cmsPropertyType.umbracoDataType", {"propertyEditorAlias"}, {"cmsPropertyType.umbracoDataType.propertyEditorAlias"}), | |
#"Expanded umbracoContentVersion" = Table.ExpandRecordColumn(#"Expanded cmsPropertyType.umbracoDataType", "umbracoContentVersion", {"id", "current", "umbracoContent"}, {"umbracoContentVersion.id", "umbracoContentVersion.current", "umbracoContentVersion.umbracoContent"}), | |
#"Expanded umbracoLanguage" = Table.ExpandRecordColumn(#"Expanded umbracoContentVersion", "umbracoLanguage", {"languag |
This file contains hidden or 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
import-module webadministration | |
$sites = Get-ChildItem -path IIS:\Sites | |
$mappedSites = $sites | % { | |
$bindings = try { ($_.Bindings.Collection | % {$_.bindingInformation}) } catch { @() } | |
if ($bindings -eq $null) { $bindings = @() } | |
[PSCustomObject]@{ ` | |
Name=$_.Name; ` | |
Id=$_.Id; ` | |
State=$_.State; ` | |
Path=$_.PhysicalPath; ` |
This file contains hidden or 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
let | |
Table.GenerateByPage = (getNextPage as function) as table => | |
let | |
listOfPages = List.Generate( | |
() => getNextPage(null), // get the first page of data | |
(lastPage) => lastPage <> null, // stop when the function returns null | |
(lastPage) => getNextPage(lastPage) // pass the previous page to the next function call | |
), | |
// concatenate the pages together | |
tableOfPages = Table.FromList(listOfPages, Splitter.SplitByNothing(), {"Column1"}), |
This file contains hidden or 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 Fluidity; | |
using XYZ.Core.Entities; | |
using System; | |
using System.Collections.Generic; | |
using System.Data.Entity; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using Umbraco.Core.Models; |
This file contains hidden or 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.IO; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using System.Xml.Linq; | |
using Examine; | |
using Examine.LuceneEngine.Providers; | |
using Lucene.Net.Analysis; | |
using Microsoft.WindowsAzure.Storage.Auth; |
This file contains hidden or 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.IO; | |
using Examine; | |
using Examine.LuceneEngine; | |
using Examine.LuceneEngine.Indexing; | |
using Lucene.Net.Analysis; | |
using Lucene.Net.Util; | |
using Umbraco.Core.Composing; | |
using Constants = Umbraco.Core.Constants; | |
// ReSharper disable once CheckNamespace |
NewerOlder