Skip to content

Instantly share code, notes, and snippets.

View akhileshnirapure's full-sized avatar

Akhilesh Nirapure akhileshnirapure

View GitHub Profile
@zplume
zplume / LS.SP.JSOM.js
Last active June 30, 2023 15:04
SharePoint 2013 REST / JSOM / Utility functions (work in progress)
(function() {
var nsName = "LS"; // root namespace name
var ns = window[nsName]; // root namespace alias
var utils = ns.Utils; // utils alias
ns.SP = ns.SP || {};
ns.SP.JSOM = {
Data: {
Sites: {} // cache for Taxonomy terms JSON
},
@zplume
zplume / SP.MDS.OnPageLoad.js
Last active November 11, 2021 13:32
Example code to ensure that a function is executed on all page loads, including MDS page loads (where partial page loading is used for navigation rather than full postbacks).
// define a global function to execute
function $_global_onMDSPageLoad() {
// code to execute on page load goes here
}
ExecuteOrDelayUntilScriptLoaded(function () {
if (typeof asyncDeltaManager != "undefined")
asyncDeltaManager.add_pageLoaded($_global_onMDSPageLoad); // execute on MDS page load
else
$_global_onMDSPageLoad(); // execute on non-MDS page load
@vgrem
vgrem / Get-SPOAccessToken.ps1
Created January 25, 2015 22:40
Obtain the access token from a Microsoft Azure Access Control Service (ACS) account that is associated with the customer's Microsoft Office 365 tenancy
<#
.Synopsis
Obtain an app-only access token from ACS.
.DESCRIPTION
Retrieves an app-only access token from ACS to call the specified principal
at the specified targetHost. The targetHost must be registered for target principal. If specified realm is
null, the "Realm" setting in web.config will be used instead
.EXAMPLE
Get-SPOAccessToken -Url "https://contoso.sharepoint.com/_api/web" -ClientId "" -ClientSecret ""
#>
@rjesh-git
rjesh-git / PublishingPageCreation.ps1
Last active August 29, 2015 14:17
Creating publishing pages using PowerShell CSOM
Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Publishing.dll"
$siteUrl = "https://YOUR SITE URL"
# - use appropriate login methods
#$username = Read-Host -Prompt "Enter Username"
#$password = Read-Host -Prompt "Enter password" -AsSecureString
#$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)
@btroncone
btroncone / ngrxintro.md
Last active June 26, 2024 08:27
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@sinedied
sinedied / angular.md
Last active November 8, 2023 22:53
The Missing Introduction to Angular 2 and Modern Design Patterns

Introduction to Angular

Angular (aka Angular 2) is a new framework completely rewritten from the ground up, replacing the famous AngularJS framework (aka Angular 1.x).

More that just a framework, Angular should now be considered as a whole platform which comes with a complete set of tools, like its own CLI, debug utilities or performance tools.

Getting started

@psignoret
psignoret / Get-AzureADPSPermissions.ps1
Last active June 4, 2024 11:34
Script to list all delegated permissions and application permissions in Microsoft Entra ID
# THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF
# FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
#Requires -Modules @{ ModuleName="Microsoft.Graph.Authentication" ; ModuleVersion="2.15.0" }
#Requires -Modules @{ ModuleName="Microsoft.Graph.DirectoryObjects"; ModuleVersion="2.15.0" }
#Requires -Modules @{ ModuleName="Microsoft.Graph.Identity.SignIns"; ModuleVersion="2.15.0" }
#Requires -Modules @{ ModuleName="Microsoft.Graph.Applications" ; ModuleVersion="2.15.0" }
#Requires -Modules @{ ModuleName="Microsoft.Graph.Users" ; ModuleVersion="2.15.0" }
<#