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 | |
# Null separate arguments to retain newlines/whitespace | |
ARGS_FILE="$(mktemp)" | |
# WRITE/STORE ----------------------------------------- | |
printf "%s\0" "$@" > "$ARGS_FILE" | |
# READ ----------------------------------------- |
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 -x | |
: Raw @ and * | |
: $@ | |
: $* | |
: | |
: Quoted @ and * | |
: "$@" | |
: "$*" | |
: |
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 centos:7 | |
RUN yum install -y \ | |
mesa-libGLU-9.0.0-4.el7 \ | |
libgomp-4.8.5-39.el7 \ | |
libXp-1.0.2-2.1.el7 \ | |
libXmu-1.1.2-2.el7 \ | |
libXpm-3.5.12-1.el7 \ | |
libXi-1.7.9-1.el7 \ | |
libtiff-4.0.3-32.el7 \ |
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 -euf -o pipefail | |
# Usage: | |
# | |
# deps-install CMD [ARGS ...] | |
# | |
# Execute a command, parsing and yum installing library dependencies | |
# | |
# Examples: |
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 |
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
# 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/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
#!/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
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))) | |