Alembic 1.5.1 Boost 1.49 OpenEXR 2.0.1 HDF5 1.8.9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Simple utility to parse the __doc__, __name__ and __author__ values from | |
a Python module. | |
""" | |
import sys | |
import ast | |
m = ast.parse(''.join(open(sys.argv[1]))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class QCheckableHeaderView(QtGui.QHeaderView): | |
''' | |
Checkable QHeaderView. Column 0 contains a checkbox that emits | |
a signal when it's check state is updated. | |
''' | |
is_on = True | |
signal_checked = QtCore.pyqtSignal(bool) | |
def __init__(self, *args, **kwargs): | |
super(QCheckableHeaderView, self).__init__(*args, **kwargs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt4.QtCore import Qt | |
from PyQt4.QtGui import * | |
class ElidedLabel(QLabel): | |
def paintEvent(self, event): | |
painter = QPainter(self) | |
metrics = QFontMetrics(self.font()) | |
elided = metrics.elidedText(self.text(), Qt.ElideRight, self.width()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# open our log file | |
so = se = open("stdout.log", 'a', 0) | |
# re-open stdout without buffering | |
sys.stdout = os.fdopen(sys.stdout.fileno(), 'a', 0) | |
# redirect stdout and stderr to the log file opened above | |
os.dup2(so.fileno(), sys.stdout.fileno()) | |
os.dup2(se.fileno(), sys.stderr.fileno()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class dotdictify(dict): | |
""" | |
life = { | |
'bigBang': { | |
'stars': { | |
'planets': {} | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tool chain | |
xcode-select --install | |
# install homebrew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# required libs | |
brew doctor | |
brew install boost --with-python | |
brew install boost-python |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
#<UDF name="ssuser" Label="New user" example="username" /> | |
#<UDF name="sspassword" Label="New user password" example="Password" /> | |
#<UDF name="hostname" Label="Hostname" example="examplehost" /> | |
#<UDF name="website" Label="Website" example="example.com" /> | |
# <UDF name="db_password" Label="MySQL root Password" /> | |
# <UDF name="db_name" Label="Create Database" default="" example="Create database" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -eu | |
# | |
# https://www.namecheap.com/support/knowledgebase/article.aspx/43/11/how-do-i-set-up-a-host-for-dynamic-dns | |
# | |
#FETCH="fetch -qo -" | |
# or for curl: | |
FETCH="curl -s" | |
# $1: your domain | |
# $2: subdomain to update use @ for TLD |