This file contains hidden or 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
| // written by https://github.com/FreyaHolmer so use at your own risk c: | |
| using System.Collections.Generic; | |
| using UnityEditor; | |
| using UnityEngine; | |
| /// <summary>Utility functions to copy GUIDs, as well as Copy/Paste import settings</summary> | |
| public static class AssetCopyUtils { | |
| const int CTX_MENU_LOCATION = 70; |
This file contains hidden or 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 "Mobile VR Highlight" { | |
| Properties { | |
| _ColorOutline ("Outline", Color) = (1,1,1,1) | |
| _ColorInterior ("Interior", Color) = (0.25,0.25,0.25,0.25) | |
| _ColorInteriorFaded ("Interior Faded", Color) = (0.1,0.1,0.1,0.1) | |
| _ColorInteriorOcc ("Interior Occluded", Color) = (0.15,0.15,0.15,0.15) | |
| _ColorInteriorOccFaded ("Interior Occluded Faded", Color) = (0.05,0.05,0.05,0.05) | |
| _PulseRateMod ("Pulse Rate Modifier", Float) = 4.0 | |
| _OutlneWidth ("Outline Pixel Width", Float) = 1.0 | |
| } |
This file contains hidden or 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 sh | |
| set -e | |
| echo "Pulling latest code..." | |
| git pull | |
| echo "Deleting local branches that were removed in remote..." | |
| git fetch -p | |
| git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D | |
| echo "Remaining local branches:" | |
| git branch -vv |
This file contains hidden or 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
| public class Tree<K, V> | |
| where K : class, IComparable<K> | |
| where V : class | |
| { | |
| private Node<K, V> root; | |
| public V BFS(K key) | |
| { | |
| Queue<Node<K, V>> queue = new Queue<Node<K, V>>(); | |
This file contains hidden or 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
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |