Skip to content

Instantly share code, notes, and snippets.

View melMass's full-sized avatar
Focusing

Mel Massadian melMass

Focusing
View GitHub Profile
@melMass
melMass / edl_write.py
Created December 12, 2017 16:43
# Simple script to extract read nodes from the comp and sequence them to a one track EDL for DI
####################################
# File name: edl_write #
# Author: Mel Massadian #
# Submission: 12/12/17 #
####################################
import os
import sys
from timecode import Timecode
@melMass
melMass / MTB_normalize.c
Last active January 3, 2017 17:17
Simple normalize node in VEX for Houdini (Points)
// NORMALIZE in VEX for Houdini
// Normalize input mesh (resize it to 1 unit) and centers it.
//INIT
vector min, max;
getbbox(min, max);
vector center = (min+max)/2;
vector size = set(max.x - min.x,max.y -min.y,max.z - min.z);
@melMass
melMass / 0_reuse_code.js
Created November 11, 2016 18:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Fit Range

OldRange = (OldMax - OldMin)  
NewRange = (NewMax - NewMin)  
NewValue = (((OldValue - OldMin) * NewRange) / OldRange) + NewMin

PaintCode Expressions

Operators

!b boolean logical negation of b
x * y numbers product of numbers x and y

Migrate Brew Cask

  1. Move the casks to the new location
sudo mv /opt/homebrew-cask/Caskroom /usr/local
// UPGRADED TO SWIFT 3
// fn_lister.swift
// MTB_Kit
//
// Created by Mel Massadian on 04/10/16.
// Copyright © 2016 Mel Massadian. All rights reserved.
//
import Cocoa
import Foundation
import AppKit
@melMass
melMass / rsync_with_progress.py
Created October 11, 2016 00:17 — forked from aerickson/rsync_with_progress.py
Get total rsync progress using Python
# from https://libbits.wordpress.com/2011/04/09/get-total-rsync-progress-using-python/
import subprocess
import re
import sys
print('Dry run:')
cmd = 'rsync -az --stats --dry-run ' + sys.argv[1] + ' ' + sys.argv[2]
proc = subprocess.Popen(cmd,
shell=True,
@melMass
melMass / iridas_look_to_csp.py
Created October 5, 2016 00:39 — forked from dbr/iridas_look_to_csp.py
IRIDAS .look to .csp LUT
"""From the seemingly undocumented IRIDAS .look format to .csp
"""
import re
import os
import sys
import struct
import binascii
import xml.etree.ElementTree as ET
@melMass
melMass / batch_edit.py
Created May 1, 2016 01:57 — forked from tokejepsen/batch_edit.py
Nuke: Batch Edit Tool
import os
import difflib
import nuke
import nukescripts
class KnobsPanel(nukescripts.PythonPanel):
def __init__(self, knobs):
nukescripts.PythonPanel.__init__(self, 'KnobsPanel')