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
Vector3 RelativeMouseAt() | |
{ | |
var mouseOverWindow = EditorWindow.mouseOverWindow; | |
System.Reflection.Assembly assembly = typeof(UnityEditor.EditorWindow).Assembly; | |
Type type = assembly.GetType("UnityEditor.PlayModeView"); | |
int displayID = 0; | |
if (type.IsInstanceOfType(mouseOverWindow)) | |
{ | |
var displayField = type.GetField("m_TargetDisplay", BindingFlags.NonPublic | BindingFlags.Instance); |
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
cvlc /home/ullaakut/Downloads/dummy.jpg -I dummy \ | |
--sout-keep --no-drop-late-frames --no-skip-frames \ | |
--image-duration 9999 \ | |
--sout="#transcode{vcodec=h264,fps=15,venc=x264{preset=ultrafast,tune=zerolatency,keyint=30,bframes=0,ref=1,level=30,profile=baseline,hrd=cbr,crf=20,ratetol=1.0,vbv-maxrate=1200,vbv-bufsize=1200,lookahead=0}}:rtp{sdp=rtsp://:8554/live.sdp}" \ | |
--sout-all |
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
# NMEA to GPX converter | |
# Peter Pearson | |
# version 0.11 | |
import csv | |
import sys | |
import time | |
from time import strftime | |
def convert_dms_to_dec(value, dir): |
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; | |
public class EnumFlagAttribute : PropertyAttribute | |
{ | |
public string enumName; | |
public EnumFlagAttribute() {} | |
public EnumFlagAttribute(string name) | |
{ |
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 "Diffuse Lightmap" { | |
Properties { | |
_MainTex ("Texture 1", 2D) = "white" {} | |
} | |
SubShader { | |
Tags { "RenderType" = "Opaque" } | |
Pass { |
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
/* | |
* http://arduino.cc/playground/ComponentLib/Thermistor2 | |
* | |
* Inputs ADC Value from Thermistor and outputs Temperature in Celsius | |
* requires: include <math.h> | |
* Utilizes the Steinhart-Hart Thermistor Equation: | |
* Temperature in Kelvin = 1 / {A + B[ln(R)] + C[ln(R)]3} | |
* where A = 0.001129148, B = 0.000234125 and C = 8.76741E-08 | |
* | |
* These coefficients seem to work fairly universally, which is a bit of a |
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; | |
public class MyStateMachine : MonoBehaviour | |
{ | |
public delegate void StateHandlerDelegate (); | |
public enum MyStateType |