Skip to content

Instantly share code, notes, and snippets.

View robotconscience's full-sized avatar

Brett Renfer robotconscience

View GitHub Profile
@robotconscience
robotconscience / SelectAudioOutput.mm
Created April 8, 2015 15:07
Set CoreAudio ouput device for your app
// change this to a recognizeable piece of your audio output
// e.g. setAudioOutput("AirPlay"); or setAudioOutput("VoilaDevice");
// returns true on success / false on beef
// as always, all thanks to StackOverflow for the amazing
// enumerate devices script:
// http://stackoverflow.com/questions/1983984/how-to-get-audio-device-uid-to-pass-into-nssounds-setplaybackdeviceidentifier
// Note: if you change "kAudioDevicePropertyScopeOutput" to "kAudioObjectPropertyScopeGlobal" in line 62,
// you can set the output for your whole system...
@robotconscience
robotconscience / batch_export_variants.py
Last active January 29, 2024 16:04
Blender - glTF Variants -> individual USDZs
# exports each selected object into its own file
import bpy
import os
# export to blend file location
basedir = os.path.dirname(bpy.data.filepath)
if not basedir:
raise Exception("Blend file is not saved")
@robotconscience
robotconscience / DataToAirtable.js
Last active June 7, 2024 15:29
Import Met data into Airtable
// Ask for an ObjectID
let objectID = await input.textAsync("Input an Object ID")
// get result from objectID
let apiURL = "https://collectionapi.metmuseum.org/public/collection/v1/objects/" + objectID
let results = await fetch(apiURL)
let json = await results.json()
if (json.hasOwnProperty("message")){