title | subtitle | author | date | source |
---|---|---|---|---|
npm vs Yarn Command Translation Cheat Sheet |
CLI commands comparison |
yarn |
February 15, 2020 |
This file contains hidden or 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
/** | |
* Minimal Pub/Sub class | |
* | |
* @class EventEngine | |
*/ | |
class EventEngine { | |
/** | |
* Creates an instance of EventEngine. | |
* @memberof EventEngine | |
*/ |
This file contains hidden or 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
// Modern method | |
// If you need to polyfill, see this MDN article https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from | |
var args = Array.from(arguments); | |
// Old school method | |
var args = [].slice.call(arguments); |
Details about some of the options.
The principal sources to search.
- All (15) – Search all principal sources.
- MembershipProvider (4) – Search the current membership provider.
- None (0) – Search no principal sources.
- RoleProvider (8) – Search the current role provider.
- UserInfoList (1) – Search the user information list.
This file contains hidden or 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 jsonSPHeaders = { | |
"Accept": "application/json;odata=verbose", | |
"Content-Type": "application/json;odata=verbose", | |
"DataServiceVersion": "3.0" | |
}; | |
OData.request( { | |
requestUri: _spPageContextInfo.webAbsoluteUrl + "/_api/$batch", | |
method: "POST", | |
headers: { "X-RequestDigest": $("#__REQUESTDIGEST").val(), |
This file contains hidden or 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
/*! | |
* Grid portion of Bootstrap under sc- namespace. | |
* Classes: | |
* sc-container-fluid, sc-row, sc-col-X-Y (like regular B3) | |
* | |
* For more info, see: | |
* http://snippets.khromov.se/decoupled-bootstrap-3-grid/ | |
* | |
* Bootstrap v3.2.0 (http://getbootstrap.com) | |
* Copyright 2011-2014 Twitter, Inc. |
This file contains hidden or 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 host = "127.0.0.1"; | |
var port = 1337; | |
var express = require("express"); | |
var app = express(); | |
app.use('/', express.static(__dirname + '/')); | |
app.listen(port, host); | |
console.log('Running server at http://localhost:' + port + '/'); |
This file contains hidden or 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
. .\TopOfScript_PSCSOM.ps1 | |
function addListItemRemoteEventReceiver([Microsoft.SharePoint.Client.ClientContext]$context, [string]$listName, | |
[Microsoft.SharePoint.Client.EventReceiverType]$eventType, [Microsoft.SharePoint.Client.EventReceiverSynchronization]$synchronization, | |
[string]$receiverName, [string]$receiverUrl, [string]$receiverAssemblyName, [string]$receiverClassName) | |
{ | |
$list = $context.Web.Lists.GetByTitle($listName); | |
$context.Load($list) | |
$eventReceivers = $list.EventReceivers | |
$context.Load($eventReceivers) |
This file contains hidden or 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
GetItemsFromCalendarAsmx = function (webUrl, calendarGuid) { | |
wsURL = webUrl + "_vti_bin/Lists.asmx"; | |
var xmlCall = | |
"<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'> <soap:Body>" + | |
"<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>" + | |
"<listName>" + calendarGuid + "</listName>" + | |
"<query>" + | |
"<Query>" + |
This file contains hidden or 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
################################################################################################################################ | |
# | |
# Script Name : SmoDb | |
# Version : 1.0 | |
# Author : Vince Panuccio | |
# Purpose : | |
# This script generates one SQL script per database object including Stored Procedures,Tables,Views, | |
# User Defined Functions and User Defined Table Types. Useful for versionining a databsae in a CVS. | |
# | |
# Usage : |
NewerOlder