Skip to content

Instantly share code, notes, and snippets.

View decoderzhub's full-sized avatar
🏠
Working from home

Darin Josell decoderzhub

🏠
Working from home
  • AR Vibe, LLC
  • Seattle, WA
  • 09:33 (UTC -08:00)
  • LinkedIn in/djmanley85
View GitHub Profile
@derme302
derme302 / GoogleMap.cs
Last active January 31, 2024 07:38
Load a Google Map into Unity3D
/*
* Based on the Google Maps for Unity Asset
* https://www.assetstore.unity3d.com/en/#!/content/3573
* However the relience on UniWeb has been removed
*
*
Getting Started
---------------
1. Assign the GoogleMap component to your game object.
@CMCDragonkai
CMCDragonkai / http_streaming.md
Last active October 24, 2024 17:43
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

@bubblerun
bubblerun / array.js
Created January 17, 2017 02:37
State abbreviations JavaScript array
[ 'AL', 'AK', 'AS', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FM', 'FL', 'GA', 'GU', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MH', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'MP', 'OH', 'OK', 'OR', 'PW', 'PA', 'PR', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VI', 'VA', 'WA', 'WV', 'WI', 'WY' ];
@dustingraham
dustingraham / AutoSave.cs
Last active May 18, 2024 10:57
Auto-Save open unity scenes when launching play mode, or every five minutes.
#if UNITY_EDITOR
using System;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
[InitializeOnLoad]
public class AutoSave
{
private static DateTime nextSaveTime;
def ngrams(string, n=3):
string = fix_text(string) # fix text encoding issues
string = string.encode("ascii", errors="ignore").decode() #remove non ascii chars
string = string.lower() #make lower case
chars_to_remove = [")","(",".","|","[","]","{","}","'"]
rx = '[' + re.escape(''.join(chars_to_remove)) + ']'
string = re.sub(rx, '', string) #remove the list of chars defined above
string = string.replace('&', 'and')
string = string.replace(',', ' ')
string = string.replace('-', ' ')