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
adb forward tcp:9222 localabstract:chrome_devtools_remote | |
wget -O tabs.json http://localhost:9222/json/list |
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
Set WshShell = CreateObject("WScript.Shell") | |
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId")) | |
Function ConvertToKey(Key) | |
Const KeyOffset = 52 | |
i = 28 | |
Chars = "BCDFGHJKMPQRTVWXY2346789" | |
Do | |
Cur = 0 | |
x = 14 |
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 numpy as np | |
from math import sqrt | |
import maya.cmds as cmds | |
from maya.api import OpenMaya | |
def str_to_dagnode(name): | |
''' | |
Returns a Maya dagNode from an input string. | |
:param name: name of the object in Maya |
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
''' | |
These are 5 different methods that attempt to retrieve the Quicktime property metadata "Media DateEncoded" from an 'mp4' file. | |
''' | |
import os | |
import re | |
import struct | |
import subprocess as sub | |
from datetime import datetime | |
from hachoir.parser import createParser |
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
#!/usr/bin/python | |
# This script opens an ALSA pcm for sound capture, and keyframes the | |
# object's 'radius' attribute while looping through the sound input. | |
import sys | |
import time | |
import maya.cmds as cmds | |
# If not installed, install alsa audio by running `pip install pyalsaaudio` | |
sys.path.append('/usr/local/lib/python2.7/dist-packages') |
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
# This is how you manually connect your Anywhere MX Mouse to Ubuntu | |
bluetoothctl | |
[bluetooth]# power off | |
[bluetooth]# power on | |
[bluetooth]# scan on | |
[bluetooth]# connect XX:XX:XX:XX:XX:XX | |
[Arc Touch Mouse SE]# trust | |
[Arc Touch Mouse SE]# connect XX:XX:XX:XX:XX:XX | |
[Arc Touch Mouse SE]# pair | |
[Arc Touch Mouse SE]# unblock |
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
@echo off | |
set curdir=%~dp0 | |
if not exist "%curdir%\setup-x86_64.exe" ( | |
wget "https://cygwin.com/setup-x86_64.exe" | |
) | |
set packages="bash,bash-completion,bind-utils,bzip2,ca-certificates,curl,cygwin-devel,git,git-svn,iso-codes,libOpenCL1,libatomic1,libbz2_1,libcurl4,libncursesw10,libopencv3.4,libopenssl100,libssh-common,libssh2_1,libssh4,libssl1.1,libzip,libzip2,lynx,nano,ncurses,opencv,openssh,openssl,python-pip-wheel,python-setuptools-wheel,python3,python3-appdirs,python3-bcrypt,python3-cffi,python3-chardet,python3-cv2,python3-imaging,python3-packaging,python3-paramiko,python3-ply,python3-pycparser,python3-pygments,python3-pyparsing,python3-setuptools,python3-six,python3-tkinter,python37,python37-asn1crypto,python37-bs4,python37-cffi,python37-cryptography,python37-html5lib,python37-imaging,python37-ipaddress,python37-lxml,python37-numpy,python37-openssl,python37-ply,python37-pycparser,python37-pyparsing,python37-requests,python37-setuptools,python37-six,python37-tkinter,python37-urllib3,rsync,ssh,subversion |
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 unicodedata | |
def stringify_dictionary(dic): | |
""" | |
Converts all keys and values of a dictionary to ascii strings | |
""" | |
tmp = {} | |
for k, v in dic.iteritems(): | |
# First transform all characters to unicode |
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 ONLY TOP LEVEL REFERENCES | |
string $references[] = `ls -type "reference"`; | |
for ( $r in $references) | |
{ | |
string $ref = `referenceQuery -filename $r`; | |
file -importReference $ref; | |
} | |
// RECURSIVELY IMPORT ALL REFERENCES | |
{ |
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
# Current frame on the timeline | |
frm = nuke.frame() | |
# Iterate over all Roto nodes | |
for rotoNode in nuke.allNodes('Roto'): | |
# Access the curves knob, then the root layer | |
curves = rotoNode['curves'] | |
rootLayer = curves.rootLayer | |
for spline in rootLayer: |