Skip to content

Instantly share code, notes, and snippets.

#![no_std]
#![no_main]
use cortex_m::peripheral;
use cortex_m_rt::entry;
use panic_halt as _;
use stm32f3xx_hal::{pac, delay, prelude::*};
#[entry]
fn main() -> ! {
@zachlewis
zachlewis / build_test_ocio2_config.py
Last active July 17, 2021 23:00
OCIO 2.0 test config
import PyOpenColorIO as ocio
import numpy as np
import colour as colour
from six import string_types
__version__ = "2020.11.08.0"
OUTPUT = "/tmp/test_config.ocio2"
@sobotka
sobotka / bare-bones-ocio-configuration.py
Created March 23, 2020 16:33
Bare Bones OpenColorIO Configuration Generation via Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import PyOpenColorIO
import numpy
import colour
from colour import (
io,
adaptation,
models
@devjj
devjj / ffmpeg-hevc-encode-nvenc.md
Last active April 28, 2022 18:36
This gist shows you how to encode specifically to HEVC with ffmpeg's NVENC on supported hardware, with an optional CUVID-based hardware-accelerated decoder.

Encoding high-quality HEVC content with FFmpeg - based NVENC encoder on supported hardware:

tl;dr

ffmpeg -hide_banner -i input -c:v hevc_nvenc -preset hq -rc constqp -global_quality 21 -c:a libfdk_aac -ar:a 48000 -channel_layout:a 5.1 -ab:a 640k output

ffmpeg -hide_banner -i input -c:v hevc_nvenc -preset hq -rc vbr_hq -b:v 30000k -qmin 17 -qmax 21 -c:a libfdk_aac -ar:a 48000 -channel_layout:a 5.1 -ab:a 640k output

@dbr
dbr / menu.py
Created September 5, 2017 04:02
Alternative viewer connection shorcuts - alt+1..9 connect viewer, 1..9 only switch viewer
def viewer_shotcuts_alt():
# Alt+1, Alt+2 etc to connect node to viewer
for n in range(9):
def connect_viewer(n=n):
selection = nuke.selectedNodes()
nuke.connectViewer(n, nuke.selectedNode())
[node.setSelected(False) for node in nuke.selectedNodes()]
[node.setSelected(True) for node in selection]
nuke.menu("Node Graph").addMenu("ViewerThing").addCommand(
@vfxwiki
vfxwiki / OpticalZDefocus.nk
Last active August 31, 2017 01:31 — forked from jedypod/OpticalZDefocus.md
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.
# forked from Jedediah Smith https://gist.github.com/jedypod/50a3b68f9b5bbe487e1a
# modified by Rafal Kaniewski https://gist.github.com/vfxwiki/beac2c8c65f6a9d50d95d21e52a32ddb
set cut_paste_input [stack 0]
version 9.0 v8
push $cut_paste_input
Group {
name ZDefocusOptik
help "<b>OpticalZDefocus</b> is a physically accurate ZDefocus, which controls circle of confusion (coc) size based on lens geometry using the depth of field equation. \n\nSet 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."
tile_color 0xff802bff
selected true
@nickkraakman
nickkraakman / ffmpeg-cheatsheet.md
Last active April 23, 2024 20:53
FFmpeg cheat sheet for 360 video

FFmpeg Cheat Sheet for 360º video

Brought to you by Headjack

 
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.

 
Let's start with some basics:

  • ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file
@stenstorp
stenstorp / maya2016.sh
Last active December 8, 2022 06:37 — forked from MichaelLawton/gist:ee27bf4a0f591bed19ac
Installing Maya 2016 SP6 on Ubuntu 16.04 with Student License
#!/bin/bash
#Download Maya from here: http://download.autodesk.com/us/support/files/maya_2016_service_pack_6/Autodesk_Maya_2016_SP6_EN_Linux_64bit.tgz
#Get a student License from: http://www.autodesk.com/education/free-software/maya
#Log in and select maya 2016, your language and an OS. Either should work.
# !!!!!! IMPORTANT !!!!!!
# BEFORE RUNNING, REPLACE "USER" AND "HOME" AT THE BOTTOM OF THIS SCRIPT WITH YOUR USERNAME AND HOME FOLDER
# !!!!!! IMPORTANT !!!!!!
@tokejepsen
tokejepsen / batch_edit.py
Last active April 23, 2020 22:16
Nuke: Batch Edit Tool
import os
import difflib
import nuke
import nukescripts
class KnobsPanel(nukescripts.PythonPanel):
def __init__(self, knobs):
nukescripts.PythonPanel.__init__(self, 'KnobsPanel')
@MichaelLawton
MichaelLawton / gist:ee27bf4a0f591bed19ac
Last active February 23, 2021 09:17
Installing Maya 2015 SP5 on Ubuntu 14.04 LTS with Student License. I recommend using my new gist instead: https://gist.github.com/MichaelLawton/32ca5cf6145f0ca4a7ebcdc510d7447d
#References:
#http://forums.autodesk.com/t5/installation-licensing/installing-maya-on-ubuntu/td-p/4905036
#http://askubuntu.com/questions/392806/installing-maya-on-ubuntu-linux
#https://gist.github.com/insomniacUNDERSCORElemon/5555214
#http://nealbuerger.com/2013/05/ubuntu-13-04-maya-2014-install-script/
#http://www.nkoubi.com/blog/tutorial/how-to-install-autodesk-maya-2011-on-debian-ubuntu/
#http://help.autodesk.com/view/MAYAUL/2015/ENU/?guid=GUID-E7E054E1-0E32-4B3C-88F9-BF820EB45BE5
#http://www.andrewhazelden.com/blog/2014/10/autodesk-nlm-licensing-issues-with-maya-2015-and-max-2015/