Skip to content

Instantly share code, notes, and snippets.

View waldekmastykarz's full-sized avatar
🥑
Microsoft 365

Waldek Mastykarz waldekmastykarz

🥑
Microsoft 365
View GitHub Profile
@waldekmastykarz
waldekmastykarz / Manifest.xml
Created September 17, 2015 11:45
Office Add-ins Azure login app domains
<AppDomains>
<AppDomain>https://login.windows.net</AppDomain>
<AppDomain>https://login.microsoftonline.net</AppDomain>
<AppDomain>https://login.microsoftonline.com</AppDomain>
</AppDomains>
@waldekmastykarz
waldekmastykarz / settings.json
Created March 31, 2017 04:10
VSCode SharePoint Framework JSON schemas configuration
// Place your settings in this file to overwrite default and user settings.
{
"json.schemas": [
{
"fileMatch": [
"/config/config.json"
],
"url": "./node_modules/@microsoft/sp-build-web/lib/schemas/config.schema.json"
},
{
@waldekmastykarz
waldekmastykarz / gulpfile.js
Last active June 9, 2017 06:34
SPFx gulpfile.js with additional task to show query string parameters for debugging extensions
'use strict';
const gulp = require('gulp');
const build = require('@microsoft/sp-build-web');
build.task('serve-info', {
execute: (config) => {
return new Promise((resolve, reject) => {
var serveTask = config.uniqueTasks.find((task) => {
return task.name === 'serve';
@waldekmastykarz
waldekmastykarz / create-projects.sh
Last active August 31, 2022 06:55
Bash script to create a set of SharePoint Framework projects
#!/usr/bin/env bash
set -o errexit
set -o pipefail
set -o nounset
#set -o xtrace
version=$1
cmd_base='yo @microsoft/sharepoint --solutionName spfx --component-name HelloWorld --component-description HelloWorld --skip-install'
cmd_v1_1="$cmd_base --no-skip-feature-deployment"
@waldekmastykarz
waldekmastykarz / mkdocs.sh
Last active December 22, 2019 18:48
MkDocs Docker
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material:3.1.0
@waldekmastykarz
waldekmastykarz / test-circleci.sh
Created August 26, 2018 10:41
Test CircleCI build in Docker
docker run -it --rm -v $PWD:/usr/src circleci/node:8.11.2
@waldekmastykarz
waldekmastykarz / modern-pages.txt
Created August 29, 2018 05:31
Test SharePoint Framework web parts on modern pages
?loadSPFX=true&debugManifestsFile=https://localhost:4321/temp/manifests.js
@waldekmastykarz
waldekmastykarz / create-cert.sh
Last active June 18, 2020 10:56
Create certificate for AAD app for app-only authN. Generated certificate is not password-protected
openssl genrsa -out localhost.pfx 2048
openssl req -new -key localhost.pfx -out localhost.csr
openssl x509 -req -in localhost.csr -signkey localhost.pfx -out localhost.pem
@waldekmastykarz
waldekmastykarz / create-sites.sh
Created February 24, 2019 15:58
Creates a number of modern team sites using the Office 365 CLI
for i in {1..10000};
do
label="$i"
if (( $i < 10 )); then
label="0$label"
fi
if (( $i < 100 )); then
label="0$label"
fi
if (( $i < 1000 )); then
@waldekmastykarz
waldekmastykarz / set-owners.sh
Created February 24, 2019 15:59
Sets the specified user as site owner for a number of test sites
for i in {1..10000};
do
label="$i"
if (( $i < 10 )); then
label="0$label"
fi
if (( $i < 100 )); then
label="0$label"
fi
if (( $i < 1000 )); then