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 (var ctx = new ClientContext(this.SiteCollectionUri)) // TEST root site collection URL | |
{ | |
ctx.ExecutingWebRequest += (object sender, WebRequestEventArgs e) => | |
{ | |
// e.WebRequestExecutor.WebRequest.UserAgent = @"Mozilla/4.0 (compatible; MSIE 4.01; windows NT; MS Search 6.0 Robot)"; | |
e.WebRequestExecutor.WebRequest.Headers.Add(@"X-FORMS_BASED_AUTH_ACCEPTED", @"f"); | |
}; | |
var query = new KeywordQuery(ctx); | |
query.QueryText = "WebTemplate:STS"; |
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
$spWeb = Get-SPWeb $SiteUrl | |
# Check whether site is closed | |
$isClosed = [Microsoft.Office.RecordsManagement.InformationPolicy.ProjectPolicy]::IsProjectClosed($spWeb) | |
if($isClosed) | |
{ | |
[Microsoft.Office.RecordsManagement.InformationPolicy.ProjectPolicy]::OpenProject($spWeb) | |
} |
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 | |
Tht script checks is a site policy exists in a site collection. | |
.DESCRIPTION | |
.PARAMETER SiteUrl | |
URL of a site collection to check the policy existence. | |
.PARAMETER PolicyName | |
Name of the policy to check. | |
#> |
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
<webParts> | |
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3"> | |
<metaData> | |
<type name="Microsoft.SharePoint.WebPartPages.XsltListViewWebPart, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> | |
<importErrorMessage>Cannot import this Web Part.</importErrorMessage> | |
</metaData> | |
<data> | |
<properties> | |
<property name="ShowWithSampleData" type="bool">False</property> | |
<property name="Default" type="string" /> |
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
Материалы для дополнительного чтения на английском: | |
https://golang.org/ref/spec - спецификация по язык | |
https://golang.org/ref/mem - модель памяти го. на начальном этапе не надо, но знать полезно | |
https://golang.org/doc/code.html - про организацию кода. GOPATH и пакеты | |
https://golang.org/cmd/go/ | |
https://blog.golang.org/strings | |
https://blog.golang.org/slices | |
https://blog.golang.org/go-slices-usage-and-internals | |
https://github.com/golang/go/wiki - вики го на гитхабе. очень много полезной информации |
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 | |
Borrowed code: https://github.com/PowerShellJax/Get-FileMetaData/blob/master/Get-FileMetaDataFunction.ps1 | |
#> | |
param( | |
[Parameter(Mandatory=$true)] | |
[string] $OneDriveRootDiskPath | |
) |
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
Get-EventLog -LogName System |? {$_.EventID -in (6005,6006,6008,6009,1074,1076)} | ft TimeGenerated,EventId,Message -AutoSize –wrap |
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
Get-AppxPackage -allusers Microsoft.549981C3F5F10 | Remove-AppxPackage |
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; | |
using System.Security.Cryptography; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
namespace MyBenchmarks | |
{ | |
public class CompareArraysBenchmark | |
{ |
OlderNewer