This file contains 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
# standard libraries | |
import os | |
import sys | |
import subprocess | |
__author__ = "Michael Trainor (http://www.mtrainor.com)" | |
__gist__ = "git@gist.github.com:f2a849dd0051d35bc2ba.git" | |
# usage | |
""" python.exe delete_all.py {your_path} """ |
This file contains 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 pymel.core as pm | |
selection = pm.ls(sl=True) | |
for index, node in enumerate(selection): | |
position = None | |
if isinstance(node, pm.Component): | |
if isinstance(node, pm.MeshVertex): |
This file contains 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
""" | |
This is what you need to do in order to get a qt window to dock next to maya channel box, | |
In all maya versions, including 2017 with PySide2 | |
""" | |
__author__ = "liorbenhorin@gmail.com" | |
import sys | |
import os | |
import logging | |
import xml.etree.ElementTree as xml |
This file contains 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
# standard libraries | |
import os | |
import sys | |
import json | |
import traceback | |
class JSONDict(dict): | |
def __init__(self, file_path, sort_keys=False, *args, **kwargs): | |
super(JSONDict, self).__init__(*args, **kwargs) |
This file contains 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
# standard libraries | |
import platform | |
import _winreg | |
def query(key, sub_key, path): | |
result = None | |
if platform.architecture()[0] == "32bit": | |
architecture_ = _winreg.KEY_READ | _winreg.KEY_WOW64_32KEY |
This file contains 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
#include <fstream> | |
#include <iterator> | |
inline std::vector<uint8_t> read_file_binary(const std::string& file_path) | |
{ | |
std::ifstream file_buffer(file_path, std::ios::binary); | |
file_buffer.unsetf(std::ios::skipws); | |
file_buffer.seekg(0, std::ios::end); | |
const auto size = file_buffer.tellg(); |
This file contains 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
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
This file contains 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
### PowerShell template profile | |
### Version 1.03 - Tim Sneath <tim@sneath.org> | |
### From https://gist.github.com/timsneath/19867b12eee7fd5af2ba | |
### | |
### This file should be stored in $PROFILE.CurrentUserAllHosts | |
### If $PROFILE.CurrentUserAllHosts doesn't exist, you can make one with the following: | |
### PS> New-Item $PROFILE.CurrentUserAllHosts -ItemType File -Force | |
### This will create the file and the containing subdirectory if it doesn't already | |
### | |
### As a reminder, to enable unsigned script execution of local scripts on client Windows, |
OlderNewer