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
$.ajax({ | |
async: false, | |
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists(guid'listID')/fields?$top=1000", | |
method: "GET", | |
headers: { | |
Accept: "application/json; odata=verbose", | |
}, | |
success: function (data) { | |
var colStr = []; | |
var elements = {}; |
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
New-SPSite -ContentDatabase WSS_Content_NewDB -URL https://siteAddress -Template pwa#0 -OwnerAlias domain\username | |
Enable-SPFeature pwasite -URL https://siteAddress |
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
$(document).ready(function () { | |
SP.SOD.executeFunc('sp.init.js', 'SP.ScriptHelpers', GetCurrentItemAttachments); | |
}); | |
function GetCurrentItemAttachments() { | |
var url = document.location.href; | |
if (url.toLowerCase().indexOf("dispform.aspx") > -1) { | |
var attachments = $('#idAttachmentsTable a'); |
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
$(this).mask("#.##0,00", { | |
byPassKeys: [188, 189, 109], | |
reverse: true, | |
placeholder: "0,00", | |
translation: { | |
'#': { | |
pattern: /-|\d/, | |
recursive: true | |
} | |
}, |
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
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") | |
$siteUrl = "<site collection URL>"; | |
$site = New-Object Microsoft.SharePoint.SPSite($siteurl); | |
$web = $site.OpenWeb(); | |
$enumPerms = [Microsoft.SharePoint.SPBasePermissions]; | |
Write-Host $web.AnonymousPermMask64; | |
$web.AnonymousPermMask64 = $enumPerms::ViewListItems -bor $enumPerms::ViewVersions -bor $enumPerms::ViewFormPages -bor $enumPerms::Open -bor $enumPerms::ViewPages -bor $enumPerms::UseClientIntegration -bor $enumPerms::OpenItems | |
$web.Update(); | |
Write-Host $web.AnonymousPermMask64; | |
$web.Dispose(); |
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
// ==UserScript== | |
// @name Download Artwork From Apple Music | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Download best resolution artwork from Apple Music! | |
// @author CM | |
// @match https://music.apple.com/* | |
// @require https://code.jquery.com/jquery-3.4.1.min.js | |
// @grant GM_download | |
// ==/UserScript== |
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-SPSite -Limit All | Get-SPWeb -Limit All | Select-Object -Property Title, Url | Format-Table * | |
#Only Root Webs | |
Get-SPSite -Limit All | Get-SPWeb -Limit All | Where { $_.IsRootWeb } | Select-Object -Property Title, Url | Format-Table * |
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.Net; | |
using System.Text.RegularExpressions; | |
using System.Threading.Tasks; | |
namespace CM.Youtube.Library | |
{ | |
public class YTDecrypt | |
{ | |
private static string GetPlayerJS(string videoUrl) |
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
Import-Module BitsTransfer | |
$destPath = "C:\SP16PreReqFiles" | |
$destPath = $destPath.TrimEnd('\') | |
function validatePath($destFolder){ | |
## Check that the path entered is valid | |
If (!(Test-Path $destFolder -Verbose)) { | |
New-Item -Path $destFolder -ItemType Directory | |
} |
NewerOlder