This file contains hidden or 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 logging | |
log = logging.getLogger() | |
handler = logging.StreamHandler() | |
handler.setFormatter(logging.Formatter('%(levelname)s: %(message)s')) | |
log.addHandler(handler) | |
log.setLevel(logging.INFO) | |
log.info('Hello World!') |
This file contains hidden or 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
#!/usr/bin/env bash | |
function bootstrap_nuke { | |
# Find all versions of Nuke installed | |
# and sumlink them to /usr/local/bin | |
nukes=$( | |
find /Applications/Nuke* -maxdepth 1 -type d -name Nuke* \ | |
| egrep '(Nuke|NukeX)[0-9]+.[0-9]+v[0-9]+\.app' | |
) |
This file contains hidden or 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
#!/usr/bin/env bash | |
function get_entity { | |
entity_type="$1" | |
if [[ -z $entity_type ]]; then | |
echo "Usage: sg_req [entity_type]" | |
return 1 | |
fi |
This file contains hidden or 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
#!/usr/bin/env bash | |
# CAUTION! This might brake other Autodesk apps and their licenses | |
ver=2016 | |
prod_key=657H1 | |
# Unregister License | |
/Volumes/Install\ Maya\ $ver/Install\ Maya\ $ver.app/Contents/Resources/adlmreg -u N $prod_key $ver.0.0.F | |
/Volumes/Install\ Maya\ $ver/Install\ Maya\ $ver.app/Contents/Resources/adlmreg -u S $prod_key $ver.0.0.F |
This file contains hidden or 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
cmd=$1 | |
case $cmd in | |
"cmd1") | |
shift | |
# execute cmd1 | |
;; | |
"cmd2") | |
shift | |
# execute cmd2 |
This file contains hidden or 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
if [[ `uname` == "Linux" ]]; then | |
# Linux | |
elif [[ `uname` == "Darwin" ]]; then | |
# OSX | |
elif [[ `uname` = CYGWIN_NT* ]]; then | |
# Cygwin | |
fi |
This file contains hidden or 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
# This is a safe way to append a line to your sudoers file | |
# The validation will be performed with "visudo -c" | |
# before replacing the sudoers file | |
if [[ -z $1 ]]; then echo "No line provided to append"; return 1; fi | |
# Include directive to be appended to sudoers file | |
include_line=$1 | |
su_bac_file="/var/tmp/sudoers.bac" |
This file contains hidden or 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 cmds | |
import maya.OpenMaya as OpenMaya | |
import math | |
# Find if object located within camera frustum | |
# Usage: | |
# from obj_in_frust import in_frustum | |
# in_frustum('camera1', 'pCube1') | |
class Plane(object): |
This file contains hidden or 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
platform = {'linux2': 'linux', 'darwin': 'mac', 'win32': 'windows'}[sys.platform] |
This file contains hidden or 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
def get_maya_location(): | |
""" | |
Return maya install location on Windows | |
Source: https://github.com/JukeboxPipeline/jukebox-core/blob/master/src/jukeboxcore/ostool.py | |
:returns: path to maya | |
:rtype: str | |
:raises: errors.SoftwareNotFoundError | |
""" | |
# The supported maya versions |