Skip to content

Instantly share code, notes, and snippets.

@Meakk
Meakk / 0001-usd-onetbb.patch
Last active July 3, 2023 16:01
Patch required to build USD v23.05 with oneTBB
From 26594a04da545ce7368a4abebe4c6a3012721ef6 Mon Sep 17 00:00:00 2001
From: gitamohr <gitamohr@users.noreply.github.com>
Date: Thu, 18 May 2023 14:05:35 -0700
Subject: [PATCH 01/13] sdf: Path node cleanups. Embed the "has token" flag in
the node's refcount so we don't read/write it non-atomically.
(Internal change: 2276996)
---
pxr/usd/sdf/path.h | 8 ++--
pxr/usd/sdf/pathNode.cpp | 14 +++---
@BigRoy
BigRoy / usdviewport_qt.py
Last active December 5, 2025 06:26
Example of how to embed a simple USD viewport in Qt application
"""
MIT License
Copyright (c) 2019 Roy Nieterau
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
<?xml version="1.0" encoding="utf-8"?>
<ADLMCUSTOMENV VERSION="1.0.0.0">
<PLATFORM OS="Windows">
<KEY ID="ADLM_COMMON_BIN_LOCATION">
<!--Path to the AdLM shared executables-->
<STRING><path to maya netinstall>\adlm\R14\Program Files\Common Files\Autodesk Shared\Adlm\R14</STRING>
</KEY>
<KEY ID="ADLM_COMMON_LIB_LOCATION">
<!--Path to the AdLM shared libraries-->
<STRING><path to maya netinstall>\adlm\R14\Program Files\Common Files\Autodesk Shared\Adlm\R14</STRING>
@liorbenhorin
liorbenhorin / Simple_MayaDockingClass.py
Created December 1, 2017 15:04
Simple way to Docking Qt widgets to Maya 2017+
'''
Template class for docking a Qt widget to maya 2017+.
Author: Lior ben horin
12-1-2017
'''
import weakref
import maya.cmds as cmds
import maya.OpenMayaUI as omui
@silveraid
silveraid / CentOS-Docker
Created October 27, 2017 12:09
Creating minimal CentOS docker image from scratch
# Create a folder for our new root structure
$ export centos_root='/centos_image/rootfs'
$ mkdir -p $centos_root
# initialize rpm database
$ rpm --root $centos_root --initdb
# download and install the centos-release package, it contains our repository sources
$ yum reinstall --downloadonly --downloaddir . centos-release
$ rpm --root $centos_root -ivh centos-release*.rpm
$ rpm --root $centos_root --import $centos_root/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
# install yum without docs and install only the english language files during the process
@jb68
jb68 / user.py.diff
Last active April 27, 2025 06:02
freeipa user-add/remove/mod trigger a custom script
diff --git a/user.py b/user.py
index cb47cbb..6b9ff36 100644
--- a/user.py
+++ b/user.py
@@ -40,7 +40,7 @@ from ipalib import _, ngettext
from ipalib import output
from ipalib import x509
from ipaplatform.paths import paths
-from ipapython.ipautil import ipa_generate_password
+from ipapython.ipautil import ipa_generate_password, run
@liorbenhorin
liorbenhorin / MayaDockingClass.py
Last active October 3, 2023 13:01
Maya 2017 PySide2 Docking Qt QMainWindow
"""
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
@drmalex07
drmalex07 / README-python-service-on-systemd-activated-socket.md
Last active June 21, 2025 17:32
An example network service with systemd-activated socket in Python. #systemd #python #socket #socket-activation

README

The example below creates a TCP server listening on a stream (i.e. SOCK_STREAM) socket. A similar approach can be followed to create a UDP server on a datagram (i.e. SOCK_DGRAM) socket. See man systemd.socket for details.

An example server

Create an simple echo server at /opt/foo/serve.py.

@paulwinex
paulwinex / alembic_maya_writer_anim.py
Last active August 21, 2018 09:06
Polygons + Normals + UVs + animation + custom point and prim attribs + groups
from pymel.core import *
import maya.OpenMaya as om
from imath import *
from alembic.Abc import *
from alembic.AbcGeom import *
import math
import alembic
def get_mesh_data():
@paulwinex
paulwinex / alembic_maya_to_houdini.py
Created November 14, 2015 18:37
Full example for export Maya polygons to Houdini winth attributes and groups
import maya.OpenMaya as om
from imath import *
from alembic.Abc import *
from alembic.AbcGeom import *
import math
import alembic
def get_mesh_data():
selection = om.MSelectionList()