Skip to content

Instantly share code, notes, and snippets.

@maty974
maty974 / hideAllViewerQtInfosWidgets.py
Created April 3, 2012 15:11
Hide all Nuke Viwer Qt Infos Widgets
def hideAllViewerQtInfosWidgets():
try:
import PySide.QtGui as QtGui
parentApp = QtGui.QApplication.allWidgets()
parentName = "Viewer"
name = "/"
parentViewer = None
for parent in parentApp:
@xdu
xdu / certificateKeytool.md
Last active June 9, 2021 14:15 — forked from dahernan/certificateKeytool.txt
generate self signed certificate with keytool

To generate a self-signed SSL certificate using the keytool command on Windows, Mac, or Linux:

  • Open a command prompt or terminal.

  • Run this command:

    keytool -genkey -keyalg RSA -alias tomcat -keystore selfsigned.jks \ -validity -keysize 2048

Where <days> indicate the number of days for which the certificate will be valid.
@minrk
minrk / ipnbdoctest.py
Last active September 14, 2023 11:23
simple example script for running and testing notebooks.
#!/usr/bin/env python
"""
simple example script for running and testing notebooks.
Usage: `ipnbdoctest.py foo.ipynb [bar.ipynb [...]]`
Each cell is submitted to the kernel, and the outputs are compared with those stored in the notebook.
"""
# License: Public Domain, but credit is nice (Min RK).
@sirleech
sirleech / gist:2660189
Created May 11, 2012 14:42
Python Read JSON from HTTP Request of URL
# Load Json into a Python object
import urllib2
import json
req = urllib2.Request("http://localhost:81/sensors/temperature.json")
opener = urllib2.build_opener()
f = opener.open(req)
json = json.loads(f.read())
print json
print json['unit']
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active August 4, 2025 14:30
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@afair
afair / tmux.cheat
Last active June 3, 2024 23:26
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New new -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
@jturcotte
jturcotte / gist:3912465
Created October 18, 2012 15:11
Terminator plugin to open paths in Sublime Text
import re
import terminatorlib.plugin as plugin
import subprocess
# Every plugin you want Terminator to load *must* be listed in 'AVAILABLE'
AVAILABLE = ['FileURLHandler']
class FileURLHandler(plugin.URLHandler):
capabilities = ['url_handler']
handler_name = 'file_path'
"""Inspired by https://github.com/timbowman/blackbody
..this creates a Nuke ColorLookup node, which maps from Kelvin to xyY values,
using code from https://github.com/dbr/colourstuff
"""
def cie1931_standard_observer_rawdata(two_degree = False, ten_degree = False):
"""Returns dictionary with three keys: x, y and z. Each key contains
a dictionary mapping wavelength to value
Created using the from_txt_to_python function
"""Exports a Nuke ColorLookup node as a 1D CSP
The "master" curve becomes the prelut curve, and the red/green/blue curves
are the R/G/B curves
All curves are linearly sampled between 0 and 1
"""
import nuke
@maty974
maty974 / setNukeZeroMarginsWidget.py
Last active March 14, 2024 09:09
The Foundry Nuke hack works with "nukescripts.panels.registerWidgetAsPanel", to remove the disturbing widget contents margins set by Nuke.
'''
Created on Feb 8, 2013
@author: matthieuc
@contact: [email protected]
'''
import PySide.QtGui as QtGui
def setNukeZeroMarginsWidget(widget_object):