Skip to content

Instantly share code, notes, and snippets.

@OlafHaag
OlafHaag / gltf-accessor-usage.js
Created November 29, 2023 16:12
Using https://gltf.report and switching to the script tab (<> symbol on the left), the following script can be used to identify what kind of data the accessors from the error message hold.
const root = document.getRoot();
// Get all accessors in the document
const accessors = document.getRoot().listAccessors();
// Loop through each accessor
for (let accessorIndex = 0; accessorIndex < accessors.length; accessorIndex++) {
const accessor = accessors[accessorIndex];
// Find where the accessor is used
const usedAs = findAccessorUsage(accessor);
@OlafHaag
OlafHaag / Process_InteriorFurniture.mel
Created December 8, 2020 23:27
Maya MEL script to prepare Interior Furniture Pack from CGTrader for export to Unity.
// Prepares the models from the Interior Furniture pack (CGTrader) for export to Unity.
// Combine all meshes if applicable and move to origin on top of grid/floor.
// Remap the texture paths to where they are on the hard drive.
// Embed the textures into the exported FBX.
//
// Usage:
// MAYA LT
// It does seem Maya LT doesn't come with the batch mode, so you have to start maya, source the script and run
// the below command manually in the MEL prompt.
//
@OlafHaag
OlafHaag / PyMC3_HLM.py
Last active October 1, 2020 01:17
Try to figure out how to use PyMC3 with Patsy for a Hierarchical Linear Model
"""
Having a 3 x (3) Mixed Design: 3 conditions as BETWEEN factor, 3 blocks as WITHIN factor.
There are multiple measurements in each block (trials).
There are 2 dependent variables: parallel & orthogonal
Since 'parallel' and 'orthogonal' measures have the same unit,
it can be viewed as 1 outcome called 'projection' in 2 different directions.
The interest here is in the VARIABILITY (e.g. standard deviation or variance) of the data
for parallel & orthogonal outcomes for blocks 1, 2, and 3.
The analysis should enable to make statements about whether conditions, blocks, direction
@OlafHaag
OlafHaag / figure.html
Created April 13, 2020 00:32
Hugo Magnific Popup figure shortcode with fallback image
<!-- use either src or link-thumb for thumbnail image -->
{{ $src := .Get "src" }}
{{ $url := (.Get "link" | default (.Get "src")) }}
<!-- Allow local and remote images -->
{{ if and $src (not (findRE "^(/|http(s?)://)" $src)) }}
{{ $src = ($.Page.Resources.GetMatch (.Get "src")).RelPermalink }}
{{ end }}
{{ if not (findRE "^(/|http(s?)://)" $url) }}
{{ $url = ($.Page.Resources.GetMatch $url).RelPermalink }}
{{ end }}
@OlafHaag
OlafHaag / CompositeToolSettings.xml
Created February 28, 2019 10:19
Nvil Configuration
<?xml version="1.0" standalone="yes"?>
<NewDataSet>
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Group">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string" minOccurs="0" />
@OlafHaag
OlafHaag / Update-Force-Test-0.md
Last active January 20, 2019 17:57
Update Force Test Report #powershell #chocolatey
@OlafHaag
OlafHaag / Update-AUPackages.md
Last active November 15, 2024 21:32
Update-AUPackages Report #powershell #chocolatey

Keybase proof

I hereby claim:

  • I am olafhaag on github.
  • I am vaquero (https://keybase.io/vaquero) on keybase.
  • I have a public key ASBvz7dlurlOcrJ-gwEfaHvjjCZ-jewrGrHi9jnO-mlsowo

To claim this, I am signing this object: