Skip to content

Instantly share code, notes, and snippets.

View peted70's full-sized avatar
™️

Pete D peted70

™️
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>WebVR on Hololens</title>
<script src="https://aframe.io/releases/0.8.0/aframe.min.js"></script>
<script type="javascript">
</script>
</head>
<body>
public void ConfigureServices(IServiceCollection services)
{
services.Configure<CookiePolicyOptions>(options =>
{
// This lambda determines whether user consent for non-essential cookies is needed for a given request.
options.CheckConsentNeeded = context => true;
options.MinimumSameSitePolicy = SameSiteMode.None;
});
services.AddAuthentication(AzureADDefaults.AuthenticationScheme)
res.res = await app.AcquireTokenWithDeviceCodeAsync(scopes, string.Empty,
deviceCodeCallback =>
{
// This will print the message on the console which tells the user where to go sign-in using
// a separate browser and the code to enter once they sign in.
// The AcquireTokenWithDeviceCodeAsync() method will poll the server after firing this
// device code callback to look for the successful login of the user via that browser.
// This background polling (whose interval and timeout data is also provided as fields in the
// deviceCodeCallback class) will occur until:
// * The user has successfully logged in via browser and entered the proper code
@peted70
peted70 / link.xml
Created January 18, 2019 11:45
link.xml used to preserve code and prevent stripping in .NET library using il2cpp
<linker>
<assembly fullname="Microsoft.Identity.Client" preserve="all"/>
<assembly fullname="System.Runtime.Serialization" preserve="all"/>
</linker>
@peted70
peted70 / TMP_SDF-MobileInstanced.shader
Created March 14, 2019 10:05
TextMeshPro Shader updated to work with Single pass stereo rendering in Unity
// Simplified SDF shader:
// - No Shading Option (bevel / bump / env map)
// - No Glow Option
// - Softness is applied on both side of the outline
Shader "TextMeshPro/Mobile/Distance Field Instanced" {
Properties {
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0