Skip to content

Instantly share code, notes, and snippets.

Eriks Vitolins evitolins

Block or report user

Report or block evitolins

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
evitolins /
Last active Aug 29, 2015 — forked from jookyboi/
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.


  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
evitolins / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#Open New Maya
from subprocess import call
appPath = "/Applications/Autodesk/maya2014/"
call(["open -n " + appPath], shell=True)
View gist:1195873369f3878a5ad9

RGB: ScriptManager


'ScriptManager' gives both Maya users & developers a simple and standardized workflow for the installation and removal of 3rd-party Maya scripts. Files are stored and maintained in an organized fashion, doing away with the process of hand-copying files into their intended Maya folders.

evitolins /
Last active Mar 8, 2017
Python: Filter list by prefix and/or suffix
def getFilteredList(list=[], pfx='', sfx=''):
filteredList = []
for item in list:
isMatch = False
if pfx and not sfx: isMatch = item.startswith(pfx)
if not pfx and sfx: isMatch = item.endswith(sfx)
if pfx and sfx: isMatch = item.startswith(pfx) and item.endswith(sfx)
if isMatch: filteredList.append(item)
return filteredList
evitolins / php2json.php
Last active Aug 29, 2015
Simple PHP -> JSON Usage
View php2json.php
* Returns an array as JSON formatted data
// Automatically Gather Images from a directory
$autoImageList = array();
foreach(glob('./images/*.{jpg,png,gif}') as $filename){
evitolins /
Last active Aug 29, 2015
Python: Modules, Classes & Objects

Python: Modules, Classes & Objects

So in Python you have 3 major tools for code organization…Modules, Classes, & Objects


Python modules are pretty much just a single python file. You can think about it as giving your variables and functions a specific namespace to reference within another python script. For example: The code below imports the contents of "" to allow all it's contents to be used in another python script under it's namespace (by default, the filename).

import mySampleModule
evitolins /
Last active Oct 19, 2019
Maya Python Snippets
This fixes a RRM bug (v1.4.7) where saved RRM setups do not preserve a
module's 'pinned' status.
import maya.cmds as cmds
import maya.mel
def RRM_fixPinBug(objs):
for obj in objs:
trans = cmds.xform(obj,q=True, r=True, translation=True)
maya.mel.eval("RRM_PinProxies(1, 0);")
evitolins /
Created Aug 31, 2014
Maya CommandPort methods to assist with MayaSublime package integration.
import maya.cmds as cmds
def activateCommandPort(host='', port='7002', language="python"):
path = host + ":" + port
active = cmds.commandPort(path, q=True)
if not active:
cmds.commandPort(name=path, sourceType=language)
print("%s is already active" % path)
evitolins /
Created Aug 11, 2014
A simple class for manipulating key/value pairs, and applying associated callbacks.
class DataModel
constructor: () ->
@data = {}
@callbacks =
set: []
unset: []
applyCallbacks: (action, args) ->
for cb in @callbacks[action]
You can’t perform that action at this time.