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
input { | |
border: 2px inset white; | |
background-color: white; | |
color: black; | |
-moz-appearance: none !important; | |
} | |
textarea { | |
border: 2px inset white; | |
background-color: white; | |
color: black; |
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
from distutils.spawn import find_executable | |
def isNot_exec(name): | |
#check whether terminal program exists | |
return find_executable(name) is None | |
def findTerminal(): | |
termList = ["x-terminal-emulator", "konsole", "gnome-terminal", "urxvt", "rxvt", "termit", "terminator", "Eterm", "aterm", "uxterm", "xterm", "roxterm", "xfce4-terminal", "termite", "lxterminal", "mate-terminal", "terminology", "st", "qterminal", "lilyterm", "tilix", "terminix", "kitty", "guake", "tilda", "alacritty", "hyper"] | |
#list taken from https://github.com/i3/i3/blob/next/i3-sensible-terminal | |
i = 0 |
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
Get-ChildItem -Recurse -Attributes Reparsepoint | % { $n = $_.FullName.Trim(“\”); fsutil reparsepoint delete “$n” } |
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 os | |
from subprocess import call | |
#gather a list of files/directories/subdirectories | |
list = [] | |
for root, directories, filenames in os.environ['OneDrive']: | |
for directory in directories: | |
list.append(os.path.join(root, directory)) | |
for filename in filenames: | |
list.append(os.path.join(root, filename)) |
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
[val for sublist in [[os.path.join(i[0], j) for j in i[2]] for i in os.walk('./')] for val in sublist] |
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
l = [] | |
for root, directories, filenames in os.walk('./'): | |
for directory in directories: | |
l.append(os.path.join(root, directory)) | |
for filename in filenames: | |
l.append(os.path.join(root, filename)) |
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
for layer in extract: | |
shuffle = nuke.nodes.Shuffle(label='[value in]') | |
shuffle["in"].setValue(layer) | |
shuffle.setInput(0, self.node) |
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
def read_from_write(): | |
""" | |
Create Read node from selected Write node. | |
:return: None | |
:rtype: None | |
""" | |
selected = nuke.selectedNodes() | |
writeNodes = [] | |
for node in selected: | |
if node.Class() == 'Write': |
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
def open_folder(path): | |
""" | |
Open folder based on OS. | |
:param path: Directory path | |
:type path: str | |
:return: None | |
:rtype: None | |
""" | |
if platform.system() == "Windows": | |
os.startfile(os.path.abspath(path)) |
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
# Get the last letter/section from node name, separated by "_": | |
nuke.thisNode().name().rsplit("_").__getitem__(2) | |
# From the above, can be modified to acquire file extension | |
nuke.thisNode()['file'].getValue().rsplit(".").__getitem__(2) | |
# Set expression with python found in the link below, especially useful when setting expression to a dropdown menu which is usually not accessible | |
# http://nuke.yellow-ant.net/set-expression-via-python/ | |
nuke.selectedNode()['antialiasing'].setExpression('$gui? 0:3') |
NewerOlder