Skip to content

Instantly share code, notes, and snippets.

@ayoburgess
ayoburgess / wacom_southpaw.sh
Last active April 25, 2017 13:24
Wacom Tablet Left-handed, Right-click/Middle-click Setup
# Left-handed
xsetwacom --set "Wacom Intuos Pro M Pen stylus" Rotate half
# Set right click to button 2 (button closest to tip)
xsetwacom --set "Wacom Intuos Pro M Pen stylus" Button 2 3
# Set middle click to button 3
xsetwacom --set "Wacom Intuos Pro M Pen stylus" Button 3 2
@ayoburgess
ayoburgess / .tcshrc
Last active May 25, 2017 13:44
tcsh prompt
set prompt="\n%d %D-%w-%Y %P\n[%n@%m | %~]\n(tcsh) > "
@ayoburgess
ayoburgess / .bashrc
Last active May 25, 2017 13:44
bash prompt
# prompt
export PS1="\n\D{%a %d-%b-%Y} \t\n[\u@\h | \w]\n(bash) $ "
@ayoburgess
ayoburgess / random_instance_rotations.h
Last active August 28, 2017 16:16
Additional rotation on top of instances in Houdini
#include "math.h"
// additional rotation on top of instance placements
vector rot_variance = chv("rot_variance");
float x_rot = fit(rand(@ptnum+1), 0, 1, 0, rot_variance.x);
float y_rot = fit(rand(@ptnum+2), 0, 1, 0, rot_variance.y);
float z_rot = fit(rand(@ptnum+3), 0, 1, 0, rot_variance.z);
vector rotation = set(x_rot, y_rot, z_rot);
rotation = radians(rotation);
p@rot = eulertoquaternion(rotation, XFORM_SRT);
@ayoburgess
ayoburgess / tag_in_camera_points.h
Last active May 24, 2019 01:05
Houdini VEX - Tag points outside of camera frustum
string camera = chs("camera");
vector screen_pos = toNDC(camera, @P);
float left_padding = chf("left_padding");
float right_padding = chf("right_padding");
float top_padding = chf("top_padding");
float bottom_padding = chf("bottom_padding");
f@outside = 0;
int outside_left = (screen_pos.x < (0 - left_padding));