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
```js | |
function openapiToFunctions(openapiSpec) { | |
function replaceRefs(obj, parent = null) { | |
if (Array.isArray(obj)) { | |
return obj.map(item => replaceRefs(item, parent)); | |
} else if (obj !== null && typeof obj === 'object') { | |
if (obj['$ref'] && typeof obj['$ref'] === 'string') { | |
const refPath = obj['$ref'].substring(2).split('/'); | |
let refObj = parent; | |
for (const key of refPath) { |
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
hello world | |
<style> | |
.google-translate { | |
display: inline-block; | |
vertical-align: top; | |
padding-top: 15px; | |
} | |
.goog-logo-link { | |
display: none !important; |
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
// Mixamo Animation downloadeer | |
// The following script make use of mixamo2 API to download all anims for a single character that you choose. | |
// The animations are saved with descriptive long names instead of the short ones used by default by mixamo UI. | |
// | |
// This script has been written by gnuton@gnuton.org and the author is not responsible of its usage | |
// | |
// How to use this script | |
// 1. Browse mixamo.com | |
// 2. Log in | |
// 3. Open JS console (F12 on chrome) |
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
#NoEnv | |
#SingleInstance force | |
#InstallKeybdHook | |
Global KeyStates, MouseState, ClickCount, IdleDelay, LargeDisplay | |
IdleDelay=3000 | |
LargeDisplay=0 | |
; 0 = Tooltip near mouse pointer |
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
//example for(int i=0;i<1000;i++) string newZeroGcString = NonAllocString.instance+"test"+23; | |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
public class NonAllocString | |
{ | |
private NonAllocString() |
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 "Atlas Texture" | |
{ | |
Properties | |
{ | |
_MainTex("Texture", 2D) = "white" {} | |
_LightMap ("Lightmap (RGB)", 2D) = "white" {} | |
_Padding("Padding", Range(0, 0)) = 0 | |
_SrcBlend ("_SrcBlend", Float) = 1 | |
_DstBlend ("_DstBlend", Float) = 0 |
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.Generic; | |
using System.IO; | |
using System.Linq; | |
[System.Serializable] | |
public class ResourceItem | |
{ | |
public enum Type | |
{ |
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
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt) | |
Shader "Hidden/TerrainEngine/Splatmap/Diffuse-BaseGen" | |
{ | |
Properties | |
{ | |
[HideInInspector] _DstBlend("DstBlend", Float) = 0.0 | |
} | |
SubShader | |
{ |
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 System.Collections.Generic; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.Rendering; | |
public class Test64 : MonoBehaviour | |
{ | |
public bool mtRendering; | |
#if UNITY_EDITOR | |
public void OnValidate() |
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
// Put this in an editor folder | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.Experimental.LowLevel; | |
using UnityEngine.Profiling; |
NewerOlder