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
/* | |
* The following code is based of this thread: https://answers.unity.com/questions/228841/dynamically-combine-verticies-that-share-the-same.html | |
* | |
* This function gets rid of shared vertices that fall within the same threshold distance. | |
* | |
*/ | |
using System.Collections; |
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
/* | |
* The following code is based of this thread: https://answers.unity.com/questions/798510/flat-shading.html | |
* | |
* This function flat shades any mesh. | |
* | |
*/ | |
using UnityEngine; |
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
{ | |
"ExtensionReference":"https://www.computerhope.com/issues/ch001789.htm", | |
"IconsReference":"https://react.semantic-ui.com/elements/icon", | |
"Extensions": [ | |
{ | |
"Ext": [ | |
"txt", | |
"md", | |
"tex", | |
"doc", |
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.Collections.Generic; | |
public class goLevel : MonoBehaviour { | |
//With the @ before the string, we can split a long string in many lines without getting errors | |
private string json = @"{ | |
'hello':'world', | |
'foo':'bar', | |
'count':25 |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SimpleCameraShake : MonoBehaviour | |
{ | |
public static SimpleCameraShake Instance; | |
float shakeAmount; | |
float shakeDuration; |
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
//https://www.sensedeep.com/blog/posts/stories/lambda-fast-http.html | |
export const fetchWithoutResp = async ( | |
url: string, | |
body?: string | Buffer, | |
headers: { | |
[key: string]: string; | |
} = {}, | |
method: "POST" | "GET" = "POST" | |
) => { | |
const router = url.includes("http://") ? http : https; |
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
const JSONtoURLEncoded = (element: any, key?: string, _list?: any[]) => { | |
let list = _list || []; | |
if (typeof element == "object") { | |
for (let idx in element) JSONtoURLEncoded(element[idx], key ? key + "[" + idx + "]" : idx, list); | |
} else { | |
list.push(key + "=" + encodeURIComponent(element)); | |
} | |
return list.join("&"); | |
}; |
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
#https://fly.io/docs/reference/configuration/ | |
app = "hasura" | |
primary_region = "sjc" #https://fly.io/docs/reference/regions/ | |
[build] | |
image = "hasura/graphql-engine:v2.15.2" #update version accordingly | |
#https://hasura.io/docs/latest/deployment/updating-graphql-engine/ | |
#https://hasura.io/docs/latest/policies/versioning |
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
const endPoint = "https://api.jigsawstack.com/v1/ai/scrape"; | |
const run = async (url: string, prompts: string[]) => { | |
const resp = await fetch(endPoint, { | |
method: "POST", | |
headers: { | |
"Content-Type": "application/json", | |
"x-api-key": "KEY", | |
}, | |
body: JSON.stringify({ |
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
[ | |
{ | |
"accent": "af-ZA-female-1", | |
"locale_name": "Afrikaans (South Africa)", | |
"gender": "female" | |
}, | |
{ | |
"accent": "af-ZA-male-1", | |
"locale_name": "Afrikaans (South Africa)", | |
"gender": "male" |
OlderNewer