Skip to content

Instantly share code, notes, and snippets.

@jedypod
jedypod / reformat_paint.py
Created November 18, 2015 17:40
Scales all strokes in a rotopaint node by a specified scale: expects a layer full of strokes that have all been scaled by the specified amount from a center of 0,0
## Adjust size of all brush stokes in a layer
## Expects a single layer in the rotopaint node containing strokes that want to be scaled.
## This script scales the brushsize and source transform by the scale value
_SCALE_ = 1.53706293
rn = nuke.selectedNode()
cKnob = rn["curves"]
rootLayer = cKnob.rootLayer
@jedypod
jedypod / OpticalZDefocus.md
Last active December 14, 2024 10:02
OpticalZDefocus is a physically accurate ZDefocus, which controls circle of confusion (coc) size based on lens geometry using the depth of field equation. Set your lens and film-back characteristics, your focus distance, and adjust the size of your bokeh with the aperture size, just like a real lens.

OpticalZDefocus

OpticalZDefocus UI

OpticalZDefocus is a physically accurate ZDefocus, which controls circle of confusion size based on lens geometry using the depth of field equation.

  1. Set your focal length and film-back characteristics to match the lens that shot your plate
  2. Animate your focus distance
  3. Adjust the f-stop to match the size of your bokeh to your plate
@Alhadis
Alhadis / font-formats.txt
Created October 30, 2015 16:10
Font format file extensions
_v Adobe Type Manager Japanese font metrics
### SmartWare filled area font
#gf MetaFont
$on Steinberg Cubase fonts compressed
$tf Steinberg Cubase fonts compressed
075 Corel Ventura Publisher 75x75 DPI
085 Corel Ventura Publisher 85x85 DPI
091 Corel Ventura Publisher 91x91 DPI
096 Corel Ventura Publisher 96x96 DPI
0b Adobe PageMaker printer font
@beugley
beugley / stop_thread.py
Last active March 14, 2022 00:13
Python: implement a stoppable thread
#!/usr/bin/env python
import sys
import logging
import threading
from time import sleep
class StoppableThread(threading.Thread):
"""
Implements a thread that can be stopped.
"""
@kgn
kgn / AppReviews
Created June 9, 2015 23:02
App Reviews - Python script to retrieve App Store reviews and save them to a CSV file
#!/usr/bin/env python
try:
# For Python 3.0 and later
from urllib.request import urlopen
except ImportError:
# Fall back to Python 2's urllib2
from urllib2 import urlopen
import json
@protrolium
protrolium / ffmpeg.md
Last active April 27, 2025 21:52
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@pklaus
pklaus / NMEA Output.md
Created March 10, 2015 16:00
u-blox 7 GPS/Glonass Receiver G-7020 / VK-172

output of the command

screen /dev/ttyACM0 38400

without any prior special settings:

$GPTXT,01,01,02,u-blox ag - www.u-blox.com*50
$GPTXT,01,01,02,HW  UBX-G70xx   00070000 *77
$GPTXT,01,01,02,ROM CORE 1.00 (59842) Jun 27 2012 17:43:52*59

$GPTXT,01,01,02,PROTVER 14.00*1E

@jedypod
jedypod / PlanarProjection.nk
Last active October 12, 2023 06:31
PlanarProjection Planar Projection Generates 2D coordinates for points in 3D space. Works on 4 points at once, is instantaneous to calculate, and generates a 4x4 transform matrix for use in rotos.
set cut_paste_input [stack 0]
push $cut_paste_input
Group {
name PlanarProjection
help "<b>Planar Projection</b>\nGenerates 2D coordinates for points in 3D space. Type in 3D point coordinates, or use vertex selection in 3D viewer and click set to pick average of selected points, or set points to set all four points at once. \n\nYou can connect node output to scene together with your pointcloud or geometry and see where your points are located in 3d space. Double click any of them to move it in 3d space like any traditional nuke transform control. \n\nA matrix transform is also generated to be used with RotoPaint, SplineWarp and GridWarp nodes. If you are using matrix in GridWarp, points have to be in clockwise order, pick them one by one! \n\nCommand set points doesn't respect selection order! \n\nCheck out the demo video on my website! Kudos to Ivan Busquets for help with matrix math. \n\n-- developed by Vit Sedlacek 2012 www.vitsedlacek.com \n\n-- Modified by Jed Smith to make calculation time nearly inst
@fredrikaverpil
fredrikaverpil / custom_ui_docked.py
Last active December 1, 2022 16:29
Create custom PySide GUI and dock it into Nuke UI
import PySide.QtCore as QtCore
import PySide.QtGui as QtGui
from nukescripts import panels
class PanelTest(QtGui.QWidget):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.setLayout(QtGui.QVBoxLayout())
self.myTable = QtGui.QTableWidget()
self.myTable.header = ['Date', 'Files', 'Size', 'Path' ]
@shamil
shamil / mount_qcow2.md
Last active May 18, 2025 02:59
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8