Skip to content

Instantly share code, notes, and snippets.

View keathmilligan's full-sized avatar
👽

Keath Milligan keathmilligan

👽
View GitHub Profile
@keathmilligan
keathmilligan / notes.md
Created October 16, 2016 17:39
Lazy-loaded routes with angular-cli

Create the app:

ng new angular-cli-lazyload

cd angular-cli-lazyload

Create a module to be lazy loaded:

ng g module lazy

@keathmilligan
keathmilligan / auth0-angular-cli-notes.md
Last active March 20, 2018 20:56
auth0 + angular-cli notes

Auth0 Example with Angular CLI

A complete example is available at https://github.com/keathmilligan/angular2-cli-auth0-example

The provided auth0 tutorial uses SystemJS, these notes outline how to integrate into an angular-cli or straight webpack project.

Create project as usual with "ng create".

Install auth0 packages & bootstrap:

@keathmilligan
keathmilligan / msalappclient.py
Created December 12, 2020 16:38
MSAL Application/Client Secret Example
# Example of a priviledged application client using a client secret
import os
import atexit
import json
import msal
import requests
TENANT_ID = '<your-tenant-id>'
CLIENT_ID = '<your-client-id>'
import requests
import msal
import atexit
import os.path
import urllib.parse
TENANT_ID = '<your tenant id>'
CLIENT_ID = '<your app/client id>'
SHAREPOINT_HOST_NAME = '<your site name>.sharepoint.com'
@keathmilligan
keathmilligan / msgraph-upload.py
Created March 23, 2020 16:58
Upload a small file to a SharePoint site using MS Graph and MSAL
import requests
import msal
import atexit
import os.path
import urllib.parse
TENANT_ID = '<your tenant id>'
CLIENT_ID = '<your client id>'
SHAREPOINT_HOST_NAME = 'yourcompany.sharepoint.com'
SITE_NAME = '<your site>'
@keathmilligan
keathmilligan / win10bootusb.md
Created December 5, 2020 16:38
Create bootable Windows 10 USB

Create a bootable Windows 10 USB drive (handles images >4GB):

Download Windows install ISO and insert USB drive. Open Administrator command window. Run diskpart:

Microsoft DiskPart version 10.0.19041.610

Copyright (C) Microsoft Corporation.
On computer: ABYSS
@keathmilligan
keathmilligan / msgraph-list-contents.py
Last active April 18, 2023 14:55
List the contents of a SharePoint folder using Microsoft Graph with MSAL
import requests
import msal
import atexit
import os.path
import urllib.parse
TENANT_ID = '<your tenant id>'
CLIENT_ID = '<your application id>'
SHAREPOINT_HOST_NAME = 'yourcompany.sharepoint.com'
SITE_NAME = '<your site name>'
@keathmilligan
keathmilligan / msgraph-download.py
Created March 23, 2020 16:55
Get info about and download a file from a SharePoint site with Microsoft Graph and MSAL
import requests
import msal
import atexit
import os.path
import urllib.parse
TENANT_ID = '<your tenant id>'
CLIENT_ID = '<your application id>'
SHAREPOINT_HOST_NAME = 'yourcompany.sharepoint.com'
SITE_NAME = '<your site name>'
@keathmilligan
keathmilligan / msgraph-upload-session.py
Created March 23, 2020 17:01
Upload a large file using an upload session to a SharePoint site using MS Graph and MSAL
import requests
import msal
import atexit
import os.path
import urllib.parse
import os
TENANT_ID = '<your tenant id>'
CLIENT_ID = '<your application id>'