Skip to content

Instantly share code, notes, and snippets.

View sjkp's full-sized avatar

Simon J.K. Pedersen sjkp

View GitHub Profile
@sjkp
sjkp / fake-sp2013-installation.reg
Created July 20, 2015 11:18
Fake SharePoint installation to create WSP solution
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\15.0]
"SharePoint"="Installed"
"Location"="C:\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\15\\"
@sjkp
sjkp / Azure-VM-Extensions
Created August 22, 2015 09:57
Azure VM Extensions Complete list
Id : /Subscriptions/cd0d7179-80a0-47e6-a201-9c12de0bbd37/Providers/Microsoft.Compute/Locations/westeurope
/Publishers/alertlogic/ArtifactTypes/VMExtension/Types/AlertLogicLM/Versions/1.3.0.1
Location : westeurope
PublisherName : alertlogic
Type : AlertLogicLM
Version : 1.3.0.1
FilterExpression :
Id : /Subscriptions/cd0d7179-80a0-47e6-a201-9c12de0bbd37/Providers/Microsoft.Compute/Locations/westeurope
/Publishers/AlertLogic.Extension/ArtifactTypes/VMExtension/Types/AlertLogicLM/Versions/1.3.0.0
param
(
[Parameter(Mandatory=$true, HelpMessage="Enter Azure Subscription name. You need to be Subscription Admin to execute the script")]
[string] $subscriptionName,
[Parameter(Mandatory=$true, HelpMessage="Provide a password for SPN application that you would create")]
[string] $password,
[Parameter(Mandatory=$false, HelpMessage="Provide a SPN role assignment")]
[string] $spnRole = "owner"
@sjkp
sjkp / export web part url
Created March 25, 2016 12:07
Export Web Part SharePoint
https://intranet.contoso.com/_vti_bin/exportwp.aspx?pageurl=https://intranet.contoso.com/Pages/default.aspx&guidstring=0c3adfe9-8f5d-4432-918a-42410e4e324d
@sjkp
sjkp / office-groups-connector-webhook.ps1
Created April 1, 2016 12:42
Posts an action card to Office Group using the WebHook Connector
<#
.SYNOPSIS
Posts an action card to Office Group using the WebHook Connector
.DESCRIPTION
.
.PARAMETER url
The url to the web hook connector as registered in the Office 365 Group.
.PARAMETER title
The title to show on the action card.
.PARAMETER message
@sjkp
sjkp / Get-FileEncoding
Created April 4, 2016 19:33
Get-FileEncoding
function Get-FileEncoding
{
[CmdletBinding()] Param (
[Parameter(Mandatory = $True, ValueFromPipelineByPropertyName = $True)] [string]$Path
)
[byte[]]$byte = get-content -Encoding byte -ReadCount 4 -TotalCount 4 -Path $Path
@sjkp
sjkp / proxies.json
Created March 26, 2017 20:22
Azure Function proxy support
{
"proxies": {
"ListAll": {
"desc": [
"This is the index of examples."
],
"matchCondition": {
"methods": [
"GET"
],
@sjkp
sjkp / continents.geojson
Last active June 14, 2019 18:49
ports.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sjkp
sjkp / certificate.bicep
Last active March 21, 2021 15:01
Bicep template for requesting app service certificates
param domainNames array
param appServicePlanName string
param location string = resourceGroup().location
resource certificates 'Microsoft.Web/certificates@2020-06-01' = [for domainName in domainNames: {
name: domainName
location: location
properties: {
canonicalName: domainName
@sjkp
sjkp / openapi-spec
Created March 21, 2021 14:37
Generate openapi from Logic Apps
{
"swagger": "2.0",
"info": {
"version": "1.0.0.0",
"title": "REMOVED",
"description": "Azure Logic App."
},
"host": "prod-02.northeurope.logic.azure.com",
"basePath": "/workflows/931ae63fd6b6459e88c2cf43ed366b20/triggers",
"schemes": [