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 / 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" \
@mottosso
mottosso / getopt.c
Created January 11, 2016 15:37 — forked from ashelly/getopt.c
"Port of GNU getopt() to Win32 for anyone who's tired of dealing with getopt() calls in Unix-to-Windows ports." Ported by Pete Wilson. Recovered from the Internet Archive's snapshot of www.pwilson.net/sample.html.
/* Getopt for GNU.
NOTE: getopt is now part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to drepper@gnu.org
before changing it!
Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@mottosso
mottosso / 0_README.md
Last active August 29, 2015 14:24 — forked from MichaelLawton/gist:ee27bf4a0f591bed19ac
Install Maya 2015 SP5 on Ubuntu 14.04

Install Maya 2015 SP5 on Ubuntu 14.04

Not in development, see Dockerfile

usage

$ git clone https://gist.github.com/6a12bc322b8b334250cf.git maya && cd maya
$ . install.sh
@mottosso
mottosso / treeview.qml
Last active August 29, 2015 14:18 — forked from elpuri/gist:3753756
import QtQuick 1.1
Item {
width: 200
height: 300
ListView {
anchors.fill: parent
model: nestedModel
delegate: categoryDelegate