Skip to content

Instantly share code, notes, and snippets.

View Simple Math Expressions .md

Fit Range

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

PaintCode Expressions


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

View Migrate Brew

Migrate Brew Cask

  1. Move the casks to the new location
sudo mv /opt/homebrew-cask/Caskroom /usr/local
View func_lister.swift
// 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 /
Created Oct 11, 2016 — forked from aerickson/
Get total rsync progress using Python
# from
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,
melMass /
Created Oct 5, 2016 — forked from dbr/
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 /
Created May 1, 2016 — forked from tokejepsen/
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')
View Hiero Registered

Edit Playhead Time :foundry.viewer.editPlayheadTime

New Project... :foundry.application.newProject

Open Project... :foundry.application.openProject

Open Recent Project

Close Project :foundry.project.close

View Hiero Registered
for act in hiero.ui.registeredActions():
print act.text(), act.objectName()
Edit Playhead Time foundry.viewer.editPlayheadTime
New Project... foundry.application.newProject
Open Project... foundry.application.openProject
Open Recent Project
Close Project foundry.project.close
View gist:e290aea88a4ab0c7a5c6


Sélectionner lesimages d'une largeur de 300 pixels :


Sélectionner les deux premiers titres <h3> d'une page :