This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pro Trinket - OLED Display Clock | |
// | |
// OLED (SSD1306) | |
// CLOCK (ZS-042) | |
// | |
#include "Wire.h" | |
#include <Adafruit_SSD1306.h> | |
#define OLED_RESET 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<clip type="clip" version="5"> | |
<handler> | |
<name>MIO Clip</name> | |
<version>2</version> | |
<longName>MIO Clip</longName> | |
<options type="dict"> | |
<ScanPattern type="string">SH050_comp_v{version}.{frame}.exr</ScanPattern> | |
</options> | |
</handler> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module UsersHelper | |
#Returns the Gravatar for the given user. | |
def gravatar_for(user, options = { size: 50 }) | |
gravatar_id = Digest::MD5::hexdigest(user.email.downcase) | |
size = options[:size] | |
gravatar_url = "https://secure.gravatar.com/avatar/#{gravatar_id}?s=#{size}" | |
image_tag(gravatar_url, alt: user.email, class: "img-responsive") | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import maya.cmds as mc | |
import maya.OpenMaya as om | |
def softSelection(): | |
selection = om.MSelectionList() | |
softSelection = om.MRichSelection() | |
om.MGlobal.getRichSelection(softSelection) | |
softSelection.getSelection(selection) | |
dagPath = om.MDagPath() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymel.core as pm | |
from pymel.core.datatypes import Matrix | |
for item in pm.ls(sl=True): | |
cube = pm.polyCube(ch=False) | |
mat = Matrix(pm.xform(item, m=True, ws=True, q=True)) | |
pm.xform(cube, ws=True, m=mat) | |
pm.parent(cube, item) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymel.core as pm | |
# Helper methods | |
def debug(message): | |
print("DEBUG: %s" % message) | |
# Average between 2 nodes | |
def averageBetween(a, b): | |
return matrixLinearBetween(a, b, 0.5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Orient tip joint to world | |
{ | |
proc string[] getChildren(string $nodes[]) | |
{ | |
return `listRelatives -f -c $nodes`; | |
} | |
proc int isTip(string $node) | |
{ | |
if (size(getChildren({$node})) > 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Orient tip joint to parent | |
{ | |
proc string[] getChildren(string $nodes[]) | |
{ | |
return `listRelatives -f -c $nodes`; | |
} | |
proc int isTip(string $node) | |
{ | |
if (size(getChildren({$node})) > 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select -hi; | |
ToggleLocalRotationAxes; |