Skip to content

Instantly share code, notes, and snippets.

View mottosso's full-sized avatar

Marcus Ottosson mottosso

View GitHub Profile
@mottosso
mottosso / Dock.py
Last active October 13, 2023 09:01 — forked from liorbenhorin/Simple_MayaDockingClass.py
Simple way to dock Qt widgets to Maya 2017+
from maya import cmds, OpenMayaUI as omui
from Qt import QtWidgets, QtCore, QtCompat
def Dock(Widget, width=300, show=True):
"""Dock `Widget` into Maya
Arguments:
Widget (QWidget): Class
show (bool, optional): Whether to show the resulting dock once created
@mottosso
mottosso / MayaDockingClass.py
Created January 12, 2018 07:16 — forked from liorbenhorin/MayaDockingClass.py
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
@mottosso
mottosso / docker-compose.yml
Created June 12, 2017 14:59 — forked from puppybits/docker-compose.yml
sentry docker-compose
redis:
image: redis
postgres:
image: postgres
environment:
- POSTGRES_PASSWORD=sentry
- POSTGRES_USER=sentry
volumes:
- /var/lib/postgresql/data
@mottosso
mottosso / README.md
Last active July 14, 2017 10:13 — forked from puppybits/docker-compose.yml
Sentry docker-compose

As opposed to the parent gist, this version supports 8.5.x and above, and stores the database on the host drive as opposed to within the postgres container.

Usage

$ git clone https://gist.github.com/6a3cd5f9fad4e17e6c6ccbac801303fe.git sentry
$ . sentry/run.sh

Your server is accessible via http://localhost

@mottosso
mottosso / messages.md
Last active September 18, 2016 08:56 — forked from mharris717/messages.md
A Conversation About OOP vs. FP Turns Constructive

Just tried to put this in a more readable format: https://github.com/svanderbleek/haskellandchill.com/blob/master/a-conversation-about-oop-vs-fp-turns-constructive.md

Person Time Message
sagar 10:47 why is that, why is OOP trash
katychuang 10:48 excellent question
katychuang 10:49 I've been told FP and OOP are different paradigms
katychuang 10:52 I'm going to butcher a quote from a talk by Evie so I'm going to paraphrase… She said something like when you work with OOP you create lots of objects and rules on how they should interact and yet somehow end up having to touch each other a lot and inappropriately
katychuang 10:53 On the other hand FP (especially Haskell) is like working with shapes, like that baby shape fitting toy where you focus more on fitting the type parameters correctly
katychuang 10:56 I think of programming as building a piping system. FP (especia
@mottosso
mottosso / PyQt5_members.json
Last active August 29, 2016 20:41
Missing members of PySide2
{
"QtGui": [
"QAbstractOpenGLFunctions",
"QAbstractTextDocumentLayout",
"QActionEvent",
"QBackingStore",
"QBitmap",
"QBrush",
"QClipboard",
"QCloseEvent",
@mottosso
mottosso / README.md
Last active August 24, 2016 08:53
An example of publishing in Maya with Pyblish

Model publishing example

Here's an example in which two extractors operate on models of two kinds; one for animation, and one optimised for playback/preview.


Interface

Assets are assumed to be located within an objectSet with the following attributes attached:

@mottosso
mottosso / README.md
Last active June 9, 2016 14:39
A small publishing pipeline with Pyblish, Maya and Nuke.

A small publishing pipeline with Pyblish, Maya and Nuke.

It can:

  1. Identify one type of asset, a "model"
  2. Ensure correctness of one aspect
  3. Write a single file to disk
  4. Register model with server

Usage

@mottosso
mottosso / Dockerfile
Last active July 10, 2017 01:02
Build and install Qt from scratch
# Based on https://wiki.qt.io/Building_Qt_5_from_Git
FROM ringo/scientific:6.6
MAINTAINER marcus@abstractfactory.io
# Prerequisities, among others, GCC 4.7.1
RUN wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo -O /etc/yum.repos.d/devtools-1.1.repo && \
yum install -y \
wget \
@mottosso
mottosso / Dockerfile
Last active July 24, 2018 03:21 — forked from jeetsukumaran/build-gcc.sh
Build and Install GCC from Scratch
FROM ringo/scientific:6.6
MAINTAINER marcus@abstractfactory.io
# Prerequisities
RUN yum install -y \
wget \
zlib-devel && \
yum groupinstall -y \
"Development Tools" \