Skip to content

Instantly share code, notes, and snippets.

@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: matthieu.cadet@gmail.com
'''
import PySide.QtGui as QtGui
def setNukeZeroMarginsWidget(widget_object):
@maty974
maty974 / gist:c076ff829063f70db3d9
Last active October 18, 2021 08:27
nuke update fbx knobs without popup message
orig_node=nuke.selectedNode()
new_filepath="/path_dir/path_to_new_file.fbx"
# save current fbx take and node name knob
fbx_take=orig_node.knob("fbx_take_name").getValue()
fbx_node=orig_node.knob("fbx_node_name").getValue()
# set knob flag NO_KNOB_CHANGED to avoid popup message
orig_node.knob("file").setFlag(0x00020000)
@maty974
maty974 / tmux-migrate-options.py
Created April 25, 2020 11:33 — forked from tbutts/tmux-migrate-options.py
For tmux configs: Merge deprecated/removed -fg, -bg, and -attr options into the -style option
#!/usr/bin/env python
# vim: set fileencoding=utf-8
#
# USAGE:
# Back up your tmux old config, run the script and redirect stdout to your conf
# file. Example:
#
# $ cp ~/.tmux.conf ~/.tmux.conf.orig
# $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf
#
@maty974
maty974 / csv-to-icloud-keychain.applescript
Created October 3, 2018 17:40
Password csv to import to iCloud keychain
-- select the csv to import to iCloud keychain
set theFile to (choose file with prompt "Select the CSV file")
-- read csv file
set f to read theFile
-- split lines into records
set recs to paragraphs of f
-- open safari passwords screen, check it is unlocked, do not allow to proceed until it is unlocked or user clicks cancel.
@maty974
maty974 / asus_gl703VM_tips_workaround.md
Last active December 7, 2018 22:29
Centos 7 on ASUS GL703VM - Tips & Workaround

ASUS GL703VM tips & Workaround

Keyboard

Not working:

  • Fn+F12 : airplane mode
  • Fn+F11 : sleep mode
  • Fn + F7-8 : lcd backlight brightness
  • Fn+F5 : fan turbo mode?
@maty974
maty974 / backlight-daemon.sh
Created March 11, 2018 12:50 — forked from furui/backlight-daemon.sh
Set xbacklight to ACPI brightness (ROG GL702VM but probably GL502VM as well)
#!/bin/bash
while true
do
inotifywait -e modify /sys/class/backlight/acpi_video0/brightness
echo brightness set to: $(cat /sys/class/backlight/acpi_video0/brightness)
xbacklight -set $(cat /sys/class/backlight/acpi_video0/brightness)
done
@maty974
maty974 / bash-git-prompt.sh
Created March 7, 2018 08:57 — forked from zessx/bash-git-prompt.sh
Custom PS1 for git
# Install for all users:
# $ wget https://gist.githubusercontent.com/zessx/10777a44ff56304487e7970142ca0b65/raw/bash-git-prompt.sh --no-check-certificate -P /etc/bash_completion.d
# Install for one user:
# $ wget https://gist.githubusercontent.com/zessx/10777a44ff56304487e7970142ca0b65/raw/bash-git-prompt.sh --no-check-certificate -P ~
# $ echo "\n\n# Bash Git Prompt\nsource ~/bash-git-prompt.sh" >> ~/.bashrc
# $ . ~/.bashrc
# Settings:
BGP_BRANCH_SAFE=("develop")
@maty974
maty974 / Synology-Diskstation-Git.md
Created February 15, 2018 06:05 — forked from walkerjeffd/Synology-Diskstation-Git.md
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation
@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:
@maty974
maty974 / gist:66e29df303d1f1825a53
Last active May 3, 2016 08:32
QSortFilterProxyModel and QListView - indexWidget get deleted when filtering
import PySide.QtGui as QtGui
import PySide.QtCore as QtCore
_DEFAULT_ITEM_SIZE = QtCore.QSize(100, 85)
_USER_ROLE = QtGui.QStandardItem.UserType + 1
class CustomItemWidget(QtGui.QWidget):
def __init__(self, parent=None):
super(CustomItemWidget, self).__init__(parent=parent)