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 Microsoft.Extensions.Logging; | |
using System; | |
using System.Collections.Generic; | |
using System.Collections.Specialized; | |
using System.Dynamic; | |
using System.Net; | |
using System.Net.Http.Headers; | |
using System.Runtime.CompilerServices; | |
using System.Text; | |
using Umbraco.Cms.Core.Models.PublishedContent; |
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
# authored @alirobe for @sopewebtech 2022-06-17 | |
# pnp-list-copy.ps1 : https://gist.githubusercontent.com/alirobe/4187b0f073dc2eba5207f312a01ddab6/ | |
# this copies list values from source to target | |
# before using this script, create a new list 'from existing list' in the same site | |
# then, plug values in below and run. should work for most field types. any issues let me know. | |
# todo: add batching, add field types | |
# licensed under GPL V2 | |
$Site = "https://notproduction.sharepoint.com/sites/not-sproket-4/" |
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 Microsoft.AspNetCore.Mvc; | |
using Umbraco.Cms.Core.Services; | |
using MimeKit; | |
using Umbraco.Cms.Core.Models; | |
using Umbraco.Cms.Core.IO; | |
namespace UmbracoProject.Controllers | |
{ | |
public class SecureMediaController : Controller | |
{ |
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
winget install code52.Carnac -s winget | |
winget install Github.GithubDesktop -s winget | |
winget install Postman.Postman -s winget | |
winget install Github.cli -s winget | |
winget install Microsoft.Powertoys -s winget | |
winget install Microsoft.AzureCLI -s winget | |
winget install Microsoft.VisualStudioCode -s winget | |
winget install Microsoft.VisualStudio.2022.Enterprise -s winget | |
winget install Microsoft.Bicep -s winget | |
winget install Microsoft.Teams -s winget |
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 Newtonsoft.Json; | |
using System; | |
using System.Collections.Generic; | |
using System.Collections.Specialized; | |
using System.Dynamic; | |
using System.Net; | |
using System.Text.RegularExpressions; | |
using Umbraco.Core.Logging; | |
using Umbraco.Forms.Core; | |
using Umbraco.Forms.Core.Attributes; |
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
var _ = require('lodash'); | |
var arr = [ | |
{"name":"my2child1","title":"My 2 Child 1","parent":"my2"}, | |
{"name":"my2child2","title":"My 2 Child 2","parent":"my2"}, | |
{"name":"parent","title":"A single parent"}, | |
{"name":"child-parent","title":"A child parent","parent":"child1"}, | |
{"name":"my","title":"My"}, | |
{"name":"my2","title":"My2"}, | |
{"name":"child1","title":"Child 1","parent":"my"}, |
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
function global:Connect-SPOSite { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory=$true, ValueFromPipeline=$true, Position=0)] | |
$Url | |
) | |
begin { | |
[System.Reflection.Assembly]::LoadFile("C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.dll") | Out-Null | |
[System.Reflection.Assembly]::LoadFile("C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.Runtime.dll") | Out-Null |
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 | |
Facilitates the loading of specific properties of a Microsoft.SharePoint.Client.ClientObject object or Microsoft.SharePoint.Client.ClientObjectCollection object. | |
.DESCRIPTION | |
Replicates what you would do with a lambda expression in C#. | |
For example, "ctx.Load(list, l => list.Title, l => list.Id)" becomes | |
"Load-CSOMProperties -object $list -propertyNames @('Title', 'Id')". | |
.EXAMPLE | |
Load-CSOMProperties -parentObject $web -collectionObject $web.Fields -propertyNames @("InternalName", "Id") -parentPropertyName "Fields" -executeQuery | |
$web.Fields | select InternalName, Id |
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
jQuery(document).ready(function($) { | |
BindBrowserStyles($); | |
BindTopNav($); | |
BindBodySpans($); | |
}); | |
/* | |
specific browsers may require specific fixes | |
*/ | |
function BindBrowserStyles($) { |
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
/*bootstrap 3 resets for SharePoint*/ | |
/*border-box causes many issues with SP*/ | |
*, *:before, *:after { | |
-webkit-box-sizing: content-box; | |
-moz-box-sizing: content-box; | |
box-sizing: content-box; | |
} | |
/*reset elements that B3 is expecting to be border-box*/ | |
* [class^="col-"], * [class^="col-"]:before, * [class^="col-"]:after, | |
.container, .container:before, .container:after, |
NewerOlder