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
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
#!/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
#!/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 | |
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
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
# Bash function for convert video for twitter upload. | |
# Place this function in your bash profile | |
# | |
# Usage: convert_for_twitter <file_path> | |
# | |
# Source http://pimentoso.blogspot.com/2016/01/convert-videos-for-twitter-using-ffmpeg.html | |
function convert_for_twitter { | |
# Make sure to install ffmpeg with libx | |
# brew install ffmpeg --with-libvpx |
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 python3 | |
""" | |
Bruteforce solution to the following assigment | |
1. Estimate how long it's going to take you, before you do it, and let us know what your guess is. | |
2. Time yourself at the end, compare results. | |
Guidelines and requirements: | |
-Do it in a pythonic, readable way. Readability is the priority. | |
-Instead of 1, 3, 4, 6, accept any user input for n integers or floas. |
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
// Align object to target vector base on selected normal | |
// Useful when object has some weird orientation baked | |
// in the mesh and you wan to straighten it up. | |
// Point with normal from second wrangler input to align | |
vector from = point(1, 'N', 0); | |
// Allign "from" normal to the following vector | |
vector to = {0,1,0}; |
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 [ -z "$1" ] | |
then | |
echo "Usage: `basename "$0"` <bucket_name>" | |
fi | |
bucket_name=$1 | |
bucket_policy=`echo '{ | |
"Version":"2012-10-17", | |
"Statement":[{ | |
"Sid":"PublicReadGetObject", |