Skip to content

Instantly share code, notes, and snippets.

View sowwic's full-sized avatar
🐀

Dmitrii Shevchenko sowwic

🐀
View GitHub Profile
@chris-lesage
chris-lesage / example_usage.py
Last active March 19, 2026 03:36
A script to pin an object to a NurbsSurface in Autodesk Maya
import pymel.core as pm
'''
Here are some examples of how to use the pin_to_surface.py script.
'''
# make a nurbsPlane
oNurbs = pm.nurbsPlane(n='nurbsPlane1')
# You can specify the nurbsSurface by string, PyNode transform or PyNode shape.
@qeeji
qeeji / maya_proxy_attr.py
Created December 13, 2018 07:09 — forked from madsjakobsen/maya_proxy_attr.py
Maya proxy attribute
import pymel.core as pymel
transform1 = pymel.createNode('transform', name='fk_control')
transform2 = pymel.createNode('transform', name='ik_control')
transform3 = pymel.createNode('transform', name='blender')
transform3.addAttr('ikFkSwitch', keyable=True, min=0, max=1)
for node in transform1, transform2:
node.addAttr('ikFkSwitch', usedAsProxy=True, keyable=True, min=0, max=1)
transform3.ikFkSwitch.connect(node.ikFkSwitch)
@mariocj89
mariocj89 / python-logging.md
Last active May 11, 2025 11:14
Understanding logging in Python

Logging trees

Introduction

When applications are running in production, they become black boxes that need to be traced and monitored. One of the simplest, yet main, ways to do so is logging. Logging allows us - at the time we develop our software - to instruct the program to emit information while the system is running that will be useful for us and our sysadmins.

@Francesco149
Francesco149 / osu_on_linux_overhaul.md
Last active December 2, 2025 07:52
Ultimate guide to low-latency osu on linux
@wizioo
wizioo / gitignore_per_git_branch.md
Last active October 10, 2025 18:54
HowTo have specific .gitignore for each git branch

How to have specific .gitignore for each git branch

Objective

My objective is to have some production files ignored on specific branches. Git doesn't allow to do it.

Solution

My solution is to make a general .gitignore file and add .gitignore.branch_name files for the branches I want to add specific file exclusion. I'll use post-checkout hook to copy those .gitignore.branch_name in place of .git/info/exclude each time I go to the branch with git checkout branch_name.

@da-n
da-n / gist:9998623
Created April 5, 2014 22:01
Rename a tag in git

Rename a git tag old to new:

git tag new old
git tag -d old
git push origin :refs/tags/old
git push --tags

The colon in the push command removes the tag from the remote repository. If you don't do this, git will create the old tag on your machine when you pull.

-- source http://stackoverflow.com/a/5719854/695454

@rbonvall
rbonvall / redirect.py
Created April 4, 2014 20:36
Redirect both stdin and stdout of a process to a PyQt text edit.
from PyQt4 import QtGui, QtCore, uic
def p(x):
print x
class MainWindow(QtGui.QMainWindow):
def __init__(self):
QtGui.QWidget.__init__(self)
uic.loadUi('redirect.ui', self)
@KrzysztofCiba
KrzysztofCiba / TypedList.py
Last active August 25, 2021 09:30
TypedList: definition of a python list that can hold only items of desired type.
########################################################################
# $HeadURL $
# File: TypedList.py
# Author: Krzysztof.Ciba@NOSPAMgmail.com
# Date: 2012/07/19 08:21:16
########################################################################
""" :mod: TypedList
=======================
.. module: TypedList
:synopsis: typed list