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
Q() { | |
###################################################################################### | |
## To use after "install", literally type in Q in terminal and press enter ## | |
## IF ERROR (Normally first install): Open a new Terminal window THEN type Q ## | |
###################################################################################### | |
clear | |
TOTAL=$(quota -s | tail -1 | cut -d " " -f 20 | grep -o "[0-9]*") | |
USED=$(quota -s | tail -1 | cut -d " " -f 18 | grep -o "[0-9]*") | |
PERCENT=$(bc <<< "scale=2; $USED*100/$TOTAL" ) | |
TOTAL=$(bc <<< "scale=3; $TOTAL / 1024") |
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
class sweet: | |
sweetness=0 | |
def __init__(self, inputSweetness): | |
print "I'm aliveeee" | |
self.sweetness = inputSweetness | |
def addSweetness(self, inputSweetness): | |
self.sweetness = self.sweetness + inputSweetness |
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 maya.cmds as mc | |
print '\n'*8 | |
print '-'*80 | |
print "Deleting un-used anim curve nodes (they don't output to anything)" | |
print '-'*80 | |
for curveType in ["animCurveTL", "animCurveTA", "animCurveTU", "animCurveTT" ]: | |
for curveNode in mc.ls(type=curveType): | |
if mc.listConnections(curveNode+'.output') is None: |
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
w = QtGui.QDialog() | |
l = QtGui.QGridLayout(w) | |
row = 0 | |
column = 0 | |
for i in [ | |
"closed", "end", "more", "open", "root-closed", "root-open", "single", "vline", | |
]: | |
p = QtGui.QPushButton(i) | |
s = p.style() | |
p.setIcon(QtGui.QIcon(":/branch-{}.svg".format(i))) |
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 unknPlugin in (mc.unknownPlugin(query=True, list=True) or []): | |
try: | |
mc.unknownPlugin(unknPlugin, remove=True) | |
print('Unknown plugin removed : {}'.format(unknPlugin)) | |
except RuntimeError as err: | |
print('({}) {} (Node types: {})' | |
''.format(unknPlugin, err, | |
mc.unknownPlugin(unknPlugin, q=True, | |
nodeTypes=True))) | |
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
#!/bin/bash | |
ping www.google.com | while read LINE; | |
do | |
MS_STR=$(echo $LINE | grep -oP '[0-9\.]+(?= ms)') | |
MS_INT=$(printf '%.0f' "$MS_STR") | |
PRE_STR='\e[0;43m\e[30m' | |
[ $MS_INT -gt 100 ] && PRE_STR='\e[0;41m\e[30m' | |
[ $MS_INT -lt 30 ] && PRE_STR='\e[0;42m\e[30m' |
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
#!/bin/python2 | |
# | |
# usage: python2 docker_descendants.py <image_id> ... | |
import sys | |
from subprocess import check_output | |
from collections import defaultdict | |
def run(cmd): |
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
# Ctrl+Alt+2 to log into virtual terminal | |
# Then run the below: | |
showkey -k > /tmp/keycodes.txt | |
showkey -s > /tmp/scancodes.txt |
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
#!/bin/bash | |
set -eufx -o pipefail | |
cd ~/.var/app/com.valvesoftware.Steam/.local/share/Steam | |
export WINEPREFIX=$(find steamapps/compatdata/ -mindepth 1 -maxdepth 1 -type d -print -quit)/pfx | |
# WINE_BIN="$(find steamapps -name wine ! -type d | sed 's/ /\\ /g')" | |
WINE_BIN="$(find steamapps -executable -name wine ! -type d)" |
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
########### ---- Results from running ---- | |
########### curl -sSL https://bootstrap.pypa.io/get-pip.py | python - | |
########### pip install bleeding-rez | |
########### rez bind python | |
########### rez bind rez | |
########### cd $(mktemp -d) | |
########### curl -sSL https://github.com/mottosso/rez-pipz/archive/1.1.0.tar.gz | tar -xz --strip-components=1 | |
########### rez build --install | |
########### rez env pipz -- chmod +x '$REZ_PIPZ_ROOT/bin/install' | |
########### rez env pipz -- PATH=$(dirname $(command -v python)) '$REZ_PIPZ_ROOT/bin/install' -y pip |
OlderNewer