This file contains 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
using UnityEngine; | |
using System.Collections; | |
using System.IO; | |
using UnityEngine.Rendering.Universal; | |
/* | |
Usage: | |
1. Attach this script to your chosen camera's game object. | |
2. Set that camera's Clear Flags field to Solid Color. | |
3. Use the inspector to set frameRate and framesToCapture |
This file contains 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
Shader "Custom/MobileOcclusion" | |
{ | |
SubShader { | |
Pass { | |
// Render the Occlusion shader before all | |
// opaque geometry to prime the depth buffer. | |
Tags { "Queue"="Geometry" } | |
ZWrite On | |
ZTest LEqual |
This file contains 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
/************************************************************************************ | |
Content : First-person view test application for Oculus Rift | |
Created : 19th June 2015 | |
Authors : Tom Heath | |
Copyright : Copyright 2015 Oculus, Inc. All Rights reserved. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at |
This file contains 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
-- Most of this came from the blog article here: | |
-- https://lettier.github.io/posts/2016-04-26-lets-make-a-ntp-client-in-c.html | |
-- For reference, the packet structure looks like: | |
--[[ | |
typedef struct | |
{ | |
unsigned li : 2; // Only two bits. Leap indicator. | |
unsigned vn : 3; // Only three bits. Version number of the protocol. | |
unsigned mode : 3; // Only three bits. Mode. Client will pick mode 3 for client. |
This file contains 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
// Add a 401 response interceptor | |
window.axios.interceptors.response.use(function (response) { | |
return response; | |
}, function (error) { | |
if (401 === error.response.status) { | |
swal({ | |
title: "Session Expired", | |
text: "Your session has expired. Would you like to be redirected to the login page?", | |
type: "warning", | |
showCancelButton: true, |
This file contains 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
#!/usr/bin/env python | |
import sys | |
def gml_sub(blob): | |
lines = [] | |
for line in blob.split('\n'): | |
line = line.strip() | |
lines.append(line) |
This file contains 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
using UnityEngine; | |
using System.Collections; | |
using System.IO; | |
/* | |
Usage: | |
1. Attach this script to your chosen camera's game object. | |
2. Set that camera's Clear Flags field to Solid Color. | |
3. Use the inspector to set frameRate and framesToCapture |
This file contains 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
// See http://rosskendall.com/blog/web/javascript-function-to-check-an-email-address-conforms-to-rfc822 | |
function isEmail(email){ | |
return /^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/.test( email ); | |
} |