Skip to content

Instantly share code, notes, and snippets.

# Blender Python script for directing characters with a script.
# See example at bottom for usage
# Author: Zach Capalbo (zachcapalbo.com)
# Copyright (c) 2024 Zach Capalbo
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
@zach-capalbo
zach-capalbo / console-paste.js
Created June 4, 2021 23:21
A-Frame Reverb G2 Controllers as Oculus touch
// Copy and paste this into the developer console
document.querySelectorAll('*[oculus-touch-controls]').forEach(el => {
el.setAttribute('tracked-controls', 'iterateControllerProfiles', true);
AFRAME.utils.trackedControls.checkControllerPresentAndSetup(el.components['oculus-touch-controls'], 'oculus-touch',
{hand: el.getAttribute('oculus-touch-controls').hand, iterateControllerProfiles: true})
})
@zach-capalbo
zach-capalbo / hubseggbot.js
Created May 16, 2020 14:28
A Headless Mozilla Hubs Bot that drops easter eggs in a room
const ROOM_URL = "https://hub.link/cmPv8xv"
var HEADLESS_BROWSER = true
var puppeteer = require('puppeteer');
var browser
var page
async function launchBrowser () {
browser = await puppeteer.launch({headless: HEADLESS_BROWSER});
@zach-capalbo
zach-capalbo / quilltool.rb
Created June 23, 2019 00:23
Tool for exporting Oculus Quill files
require 'json'
require 'fileutils'
class ::Hash
def deep_merge!(other_hash, &block)
merge!(other_hash) do |key, this_val, other_val|
if this_val.is_a?(Hash) && other_val.is_a?(Hash)
this_val.deep_merge(other_val, &block)
elsif block_given?
block.call(key, this_val, other_val)