Skip to content

Instantly share code, notes, and snippets.

View deprecatedcoder's full-sized avatar

Ryan Sullivan deprecatedcoder

View GitHub Profile
I spent some time messing around getting Time Lapse and HTTP Live streaming
working on my Raspberry Pi
I'm using a raspberry pi, Logitech C920 webcam and some powered 4 port hub from amazon
Had a lot of problems with firmware (Make sure you update to the, as of April
18th 2014, beta firmware and set the USB concurrency flags to 0x7 (or something
like that).)
I also had problems with shitty USB cables, but now its pretty stable.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class CompanionCamera : MonoBehaviour {
// Debug shortcut keys:
public KeyCode modifier;
public KeyCode toggleButton;
// If true, this will permanently disable the SteamVR companion camera.
using UnityEngine;
using System.Collections;
public class LinkedCamera : MonoBehaviour {
// What transform to chase:
public Transform target;
// Debug keyboard controls:
public KeyCode modifier;
public KeyCode incSmooth;
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.IO;
public class SaveFormToDisk : MonoBehaviour {
public InputField textReference;
public string saveDir;
public void SaveToFile(string text, string subDir) {
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using System.IO;
public class SubmitFormOnline : MonoBehaviour {
public InputField textReference;
public string pendingDir;
// FormID comes from the google drive ID, eg:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public static class ListExtensions
{
public static T PickRandom<T>(this IList<T> source)
{
if (source.Count == 0)
return default(T);
@ipha
ipha / movement.cs
Last active December 30, 2016 23:22
using UnityEngine;
using System.Collections;
public class movement : MonoBehaviour {
const int numSamples = 10;
public GameObject head;
public float scalingFactor;
private Vector3 headPrev;
@WhiteNoise
WhiteNoise / MyVDPlugin.cs
Last active June 17, 2017 00:09
Unity Editor script for showing Virtual Desktop when Unity stops playing (for the HTC Vive). It allows you to stay in VR to edit code (without removing the headset).
using System;
using System.Collections;
using System.Reflection;
using System.Diagnostics;
using System.Runtime.InteropServices;
using UnityEditor;
using UnityEngine;
using System.Security;
@ByronMayne
ByronMayne / AnimatedComponent.cs
Created May 29, 2017 11:17
The source code behind my Unity tip.
using UnityEngine;
using System.Collections;
// This is not need but I just wanted to make the point clear.
public class AnimatedComponent : MonoBehaviour
{
}
@dpid
dpid / DiffuseColorWithLightEstimation.shader
Last active September 21, 2017 14:06
ARCore shader for Google Blocks materials in Unity
Shader "ARCore/DiffuseColorWithLightEstimation"
{
Properties
{
_Color("Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader
{