Skip to content

Instantly share code, notes, and snippets.


Eriks Vitolins evitolins

View GitHub Profile
View lagrange.js
* At least two points are needed to interpolate something.
* @class Lagrange polynomial interpolation.
* The computed interpolation polynomial will be reffered to as L(x).
* @example
* var l = new Lagrange(0, 0, 1, 1);
* var index = l.addPoint(0.5, 0.8);
* console.log(l.valueOf(0.1));
* l.changePoint(index, 0.5, 0.1);
naholyr / monkey-patch.js
Created Dec 21, 2012
JS monkey patching
View monkey-patch.js
// Original method
var object = {
method: function (x, y) {
return x+y;
// Add operations before or after!
object.method = (function (original) {
return function (x, y) {
View video-client.html
<!-- This is a Node+WebSocket powered demo to sync videos
across different browsers. This file is the client,
the other one is the Node server. Powered by Node and -->
.inactive { display: none; }
.active { display: block; }
justinfx /
Last active Dec 24, 2019
Mixing PyQt4 and Maya UI objects
from PyQt4 import QtCore, QtGui
import maya.cmds as cmds
import maya.OpenMayaUI as mui
import sip
class MyDialog(QtGui.QDialog):
Mark-Booth / git-branch-status
Last active Aug 19, 2019 — forked from lth2h/git-branch-status
Version of git-branch-status which only shows the current branch and only generates output if a branch is ahead or behind.Added options to:* Show all branches (revert to the old behaviour)* Show output even if the branch isn't ahead or behind (revert to the old behaviour)* Show branch(es) with respect to origin/master (inspired by git-branches-v…
View git-branch-status
# hosted at
# forked from @ ae184f1 by mark.booth
# forked from @ e357c1e by lth2h
# ideas from
# this prints out some branch status
# (similar to the '... ahead' info you get from git status)
# example:
jhoolmans /
Created Feb 24, 2014
Maya create soft cluster
import maya.cmds as mc
import maya.OpenMaya as om
def softSelection():
selection = om.MSelectionList()
softSelection = om.MRichSelection()
dagPath = om.MDagPath()
import maya.cmds as cmds
import maya.mel as mel
What is this:
This is a simple script that will copy UV's from one mech to another. The meshes should be simular for best results.
It will copy the UV's to a rigged mesh or a non rigged mesh.
In order to run this script correctly, just select the mesh with the good UV's, then select the mesh with bad UV's.
View gist:60d7327d945e65cc624d
def jointLock():
allJoints ='joint')
for joint in allJoints:
def jointUnlock():
allJoints ='joint')
for joint in allJoints:
# Create Dynamic Joint Chains
dynChain = lpDynamiChain(startJoint, endJoint)
def __init__(self, startJoint="", endJoint="", node=""):
""" Constructor. Creates the custom node.
You can’t perform that action at this time.