Skip to content

Instantly share code, notes, and snippets.


The Stonefox thestonefox

View GitHub Profile
thestonefox / thestonefox-vimrc
Last active May 29, 2019
Basic .vimrc with pathogen, solarized theme, nerdtree
View thestonefox-vimrc
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-solarized-tmux
Created Feb 8, 2014
Alternative Solarized tmux theme
View thestonefox-solarized-tmux
#### COLOUR (Solarized 256)
# default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg colour244 #base0
set-window-option -g window-status-bg default
View docker-root-ssh-access
#Setup SSH Access
RUN apt-get -q -y update
RUN apt-get install -q -y openssl whois openssh-server vim nano
RUN mkdir -p /root/.ssh
RUN chown -R root:root /root/.ssh
RUN chmod -R 600 /root/.ssh/
RUN mkdir -p /var/run/sshd
RUN printf "#!/bin/bash \
\n echo \"root:password\" |chpasswd \
thestonefox / docker-service-manager
Created Feb 21, 2014
Docker container management script to start, stop and restart containers from source
View docker-service-manager
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
thestonefox /
Last active Aug 29, 2015
Base Environment Setup
echo "Moving to home directory"
cd ~/
echo "Setting up git defaults"
git clone
ln -s git-config/.gitconfig ~/.gitconfig
ln -s git-ignore/.gitignore ~/.gitignore
thestonefox / nodejs-install
Last active Aug 29, 2015
Ubuntu NodeJS Install (Requires sudo su)
View nodejs-install
apt-get install -y python-software-properties python &&
add-apt-repository ppa:chris-lea/node.js &&
echo "deb precise universe" >> /etc/apt/sources.list &&
apt-get -q -y update &&
apt-get install -y nodejs
thestonefox / phantomjs-install
Created Feb 11, 2015
Install PhantomJS (Run as sudo su)
View phantomjs-install
wget &&
mv phantomjs-1.9.7-linux-x86_64.tar.bz2 /usr/local/share/. &&
cd /usr/local/share/ &&
tar xjf phantomjs-1.9.7-linux-x86_64.tar.bz2 &&
ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64 /usr/local/share/phantomjs &&
ln -s /usr/local/share/phantomjs/bin/phantomjs /usr/bin/phantomjs
thestonefox / apt-install
Created Feb 12, 2015
Recommended Ubuntu Dependencies
View apt-install
sudo apt-get update && sudo apt-get install git-core curl git build-essential libssl-dev libreadline-dev autoconf bison libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libncurses5-dev automake libtool libpq-dev fontconfig
thestonefox / ViveCursor.cs
Last active Jun 5, 2019
A basic implementation of a laser pointer for the HTC Vive controllers in Unity3D
View ViveCursor.cs
using UnityEngine;
using System.Collections;
public class ViveCursor : MonoBehaviour {
public enum AxisType
thestonefox / SteamVR_FirstPersonController.cs
Last active Mar 13, 2017
A Unity3d 5.3 script to add SteamVR functionality such as object interaction/grabbing/throwing, laser pointer and teleport movement with blink (Requires Unity SteamVR plugin)
View SteamVR_FirstPersonController.cs
// Purpose: Add player ability on SteamVR CameraRig to:
// * Trackpad press down: project laser pointer from Touch Controller
// * Trackpad release: teleport player with blink to laser point destination
// * Trigger click: grab any object that has a custom "Grabbable" tag applied
// * Trigger release: release the current grabbed object with relative force
// * Application Menu: reset the position of last grabbed object to controller