Skip to content

Instantly share code, notes, and snippets.

@bhchiang
bhchiang / blender.md
Created July 20, 2021 07:20
Blender tips

07-20

  • Use P to slice off a selection into its own object
  • For arbitrary 3D box selections, press Z and select wireframe viewing mode
  • Select two vertices in Edit Mode, press F to create an edge. In the Overlays tab, check the Edge Length box.
  • Change the color in Edit > Preferences > 3D Viewport to a higher contrast color (mine is green)
@bhchiang
bhchiang / monado.md
Last active July 19, 2021 20:39
Building Monado from scratch

OpenXR:

  324  sudo apt-get install libxcb-glx0-dev

StereoKit:


  414  sudo apt-get install libfontconfig1-dev
  415  sudo apt-get install libglew-dev
 422 sudo apt-get install libjsoncpp-dev
@bhchiang
bhchiang / deform.py
Created March 27, 2021 06:40
Deformable convolution implementation in JAX
import time
from typing import Tuple, Union
import jax
import jax.profiler
from flax import linen as nn
from IPython import embed
from jax import numpy as jnp
@bhchiang
bhchiang / jax_dataclass.py
Created January 5, 2021 21:38 — forked from odashi/jax_dataclass.py
Augmented dataclass for JAX pytree.
import dataclasses as dc
from jax import tree_util as jt
def register_jax_dataclass(cls):
"""Registers a dataclass as a JAX pytree."""
if not dc.is_dataclass(cls):
raise TypeError('%s is not a dataclass.' % cls)
keys = [field.name for field in dc.fields(cls)]
@bhchiang
bhchiang / kinto.py
Last active November 29, 2020 17:58
L220
# -*- coding: utf-8 -*-
# autostart = true
import re
from xkeysnail.transform import *
# Use the following for testing terminal keymaps
# terminals = [ "", ... ]
# xbindkeys -mk
terminals = ["kinto-gui.py", "gnome-terminal", "konsole", "io.elementary.terminal", "terminator", "sakura",
@bhchiang
bhchiang / kinto.ahk
Created November 29, 2020 17:54
L332
#SingleInstance force
#NoEnv
#Persistent
; DetectHiddenWindows, On ; Autodetect
; Run, %A_ScriptDir%\detectUSB.ahk ; Autodetect
; Enable Left clicks on Kinto Icon
; https://www.autohotkey.com/boards/viewtopic.php?t=9501
OnMessage(0x404, "AHK_NOTIFYICON")