Skip to content

Instantly share code, notes, and snippets.

View thestonefox's full-sized avatar

The Stonefox thestonefox

View GitHub Profile
@thestonefox
thestonefox / thestonefox-vimrc
Last active May 29, 2019 07:02
Basic .vimrc with pathogen, solarized theme, nerdtree
execute pathogen#infect()
syntax on
set number
set expandtab
set tabstop=2
set background=dark
set t_Co=256
let g:solarized_termcolors=256
let g:solarized_termtrans=1
@thestonefox
thestonefox / ViveCursor.cs
Last active June 5, 2019 20:54
A basic implementation of a laser pointer for the HTC Vive controllers in Unity3D
using UnityEngine;
using System.Collections;
public class ViveCursor : MonoBehaviour {
public enum AxisType
{
XAxis,
ZAxis
}
@thestonefox
thestonefox / PrecisionFollowPrimarySecondarySwapper.cs
Created May 24, 2022 19:00
Tilia Interactables Example of how to get two handed grabbing to work with a precision grabbed object so either hand can be holding it
using System.Collections;
using Tilia.Interactions.Interactables.Interactables;
using Tilia.Interactions.Interactables.Interactables.Grab.Provider;
using UnityEngine;
using Zinnia.Data.Collection.Stack;
public class PrecisionFollowPrimarySecondarySwapper : MonoBehaviour
{
[SerializeField]
private InteractableFacade interactable;
@thestonefox
thestonefox / OrientationFollowPrimarySecondarySwapper.cs
Created May 24, 2022 19:01
Tilia Interactables Example of how to get two handed grabbing to work with an orientation grabbed object so either hand can be holding it
using System.Collections;
using Tilia.Interactions.Interactables.Interactables;
using Tilia.Interactions.Interactables.Interactables.Grab.Action;
using Tilia.Interactions.Interactables.Interactables.Grab.Provider;
using Tilia.Interactions.Interactables.Interactors;
using UnityEngine;
using Zinnia.Data.Collection.Stack;
public class OrientationFollowPrimarySecondarySwapper : MonoBehaviour
{
@thestonefox
thestonefox / docker-service-manager
Created February 21, 2014 14:46
Docker container management script to start, stop and restart containers from source
#!/bin/bash
function start() {
docker build -rm -t myapp_image .
docker run -d -name myapp_container myapp_image
}
function stop() {
docker stop myapp_container && docker rm myapp_container
}