Skip to content

Instantly share code, notes, and snippets.

View micmania1's full-sized avatar

Michael Strong micmania1

  • Wellington, New Zealand
View GitHub Profile
@micmania1
micmania1 / xr-controls.tsx
Created January 13, 2022 09:40
XR Controls ideas
import { MotionController } from '@webxr-input-profiles/motion-controllers'
import { useEffect, useState } from 'react'
import { Group, Object3D, Vector3, XRHand } from 'three'
import { XRControllerModelFactory } from 'webxr/XRControllerModelFactory'
import { useXR } from '../XR'
const modelFactory = new XRControllerModelFactory()
const modelCache = new WeakMap<Group, any>()
export const useMotionControllers = () => {
const { controllers } = useXR()
@micmania1
micmania1 / main.go
Last active June 8, 2018 04:52
Go concurrency test (me learning go)
package main
import (
"fmt"
"time"
)
func main() {
fmt.Println("Concurrency test")
@micmania1
micmania1 / gulpfile.js
Last active October 27, 2021 01:46
Basic react gulpfile with browserfy and babel
var gulp = require('gulp');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var watch = require('gulp-watch');
var gutil = require('gulp-util');
var browserify = require('browserify');
var babel = require('gulp-babel');
gulp.task('transform', function() {
return gulp.src('./app/src/**/*.jsx')
@micmania1
micmania1 / .gitignore_global
Last active February 18, 2017 05:23
dotfiles
tags
phptags
.DS_STORE
*.swp
*.swo
*.swn
.nfs*
@micmania1
micmania1 / BulkInsert.php
Last active May 5, 2016 23:19
Silverstripe DataObject bulk insert.
<?php
/**
* Handles bulk inserts to a MySQL database. This wil only work on base DataObject tables
* as there is currently no way to relate to child tables in a bulk insert.
*
* @author Michael Strong <mstrong@silverstripe.org>
**/
class BulkInsert
{