Skip to content

Instantly share code, notes, and snippets.

View davidlatwe's full-sized avatar
:shipit:
Awesome

David Lai davidlatwe

:shipit:
Awesome
View GitHub Profile
'''
This plugin was ported to python from C++,
All credits by Anno Schachner
original plugin is here https://github.com/wiremas/tension
'''
import sys
import maya.api.OpenMaya as om2
import maya.OpenMaya as om
@kapb14
kapb14 / base.html
Created October 17, 2018 07:14
Flask simplest realtime log file viewer
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" dir="ltr" class="uk-height-1-1">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>flasktest</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css" />
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
@thirstydevil
thirstydevil / git-update.py
Created October 16, 2018 08:48
Git - force pull latest repro
import git, os, shutil
DIR_NAME = "c:/temp2"
REMOTE_URL = "https://gitlab.com/blarblar/blar.git"
# This is a note to myself on how to pull down to a local folder the latest code from a remote branch.
class Progress(git.remote.RemoteProgress):
"""
@zekroTJA
zekroTJA / example.cpp
Last active June 13, 2024 07:34
Simple C++ asynchronous timer class
/*
COPYRIGHT © 2018 Ringo Hoffmann (zekro Development)
READ BEFORE USING: https://zekro.de/policy
*/
#include "timer.h"
using namespace std;
@P7h
P7h / Install_7zip_on_Linux.md
Last active February 24, 2025 03:23
7zip install on Linux -- Ubuntu and Fedora or CentOS / RHEL

Steps to install 7zip on Linux » Ubuntu and Fedora or CentOS / RHEL

Ubuntu

cat /etc/*release
sudo apt-get update -yqq
sudo apt-get install -yqq p7zip-full
@borgfriend
borgfriend / maya2017install.sh
Last active April 13, 2024 13:34
Maya 2017 Installation on Ubuntu 16.04
#!/bin/bash
#Make sure we’re running with root permissions.
if [ `whoami` != root ]; then
echo Please run this script using sudo
echo Just type “sudo !!”
exit
fi
#Check for 64-bit arch
if [uname -m != x86_64]; then
@fredrikaverpil
fredrikaverpil / maya_floating_win.py
Last active July 16, 2025 10:16
Window floating atop Maya 2017
from PySide2 import QtWidgets, QtCore
def _maya_main_window():
"""Return Maya's main window"""
for obj in QtWidgets.qApp.topLevelWidgets():
if obj.objectName() == 'MayaWindow':
return obj
raise RuntimeError('Could not find MayaWindow instance')
@mmolero
mmolero / cefpython_pyside.py
Created July 7, 2016 13:12
CefBrowser using PySide on Windows/Linux/MacOX
from cefpython3 import cefpython
import sys, os
import platform
import ctypes
from PySide.QtGui import *
from PySide.QtCore import *
@yamahigashi
yamahigashi / MTypeId.tsv
Last active September 18, 2019 02:49
maya MTypeId listing (incomplete)
typeId typeName classification attributeCount
0x345dad01 substance texture/2d 38L
0x346dad01 substanceOutput drawdb/shader/texture/2d/substanceOutput:texture/2d 36L
0x41424141 animBlendNodeAdditiveDA animation 12L
0x41424146 animBlendNodeAdditiveF animation 12L
0x41424149 animBlendNodeAdditiveI32 animation 12L
0x4142414c animBlendNodeAdditiveDL animation 12L
0x41424153 animBlendNodeAdditiveI16 animation 12L
0x4142424f animBlendNodeBoolean animation 11L
0x41424641 animBlendNodeAdditiveFA animation 12L
@amoilanen
amoilanen / tabs2spaces.py
Created January 29, 2016 15:50
Python script to replace tabs with spaces recursively for all files matching a specified file mask regex, the number of spaces if configurable
#
# Usage:
#
# python tabs2spaces.py . 2 .*\.js$
#
import argparse
import os
import re
parser = argparse.ArgumentParser(description='Replace tabs with spaces.')