tar cf - <files> -P | pv -s $(du -sb <files> | awk '{print $1}') | gzip > <some .tar.gz file>
where:
- `` is the root-mounted (i.e. starts with /) path to the files
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib.widgets import Button | |
from PIL import Image | |
import sys | |
import os | |
from PySide6.QtWidgets import QApplication | |
# Load the grayscale floating point TIFF image from command line | |
if len(sys.argv) != 2: |
:: ================================================================================================ | |
:: a wrapper script to run python.sh script in MSYS2 environment using bash | |
:: it will download and install MSYS2 in the current folder if it is not already installed | |
:: and then it will download python.sh script from the following URL and run it: | |
:: https://gist.github.com/hradec/32840097fe4cada3119468d8027155f9#file-python-sh | |
:: ================================================================================================ | |
@echo off | |
:: folder where this script is located | |
set "_CMD_PATH=%~dp0" |
#!/bin/bash | |
# ================================================================================================================ | |
# a simple script to create a virtual environment for python, install some basic packages and run a python script | |
# I known anaconda does the same, but I prefer to have a self-contained python environment in a folder without | |
# the need to install anything in the system. | |
# This script automatically downloads a self-contained python distribution in windows, so it can be used in any | |
# computer without any installation. | |
# | |
# In windows, use python.cmd to run this script. python.cmd will automatically download MSYS2 with bash and | |
# all dependencies to properly run this script. |
!/bin/bash | |
# pull an export from FreshStart chrome plugin directly from the clipboard and fix the URLs | |
xclip -o | sed 's/,/,\n/g' | sed 's/chrome.extension.*uri.//g' | tr -d '\n' > /dev/shm/fixTheGreatSuspender | |
# just show the fixed version on the console | |
cat /dev/shm/fixTheGreatSuspender | |
# now copy it back to the clipboard, so we can import in FreshStart | |
xclip -selection c -i < /dev/shm/fixTheGreatSuspender |
#!/bin/bash | |
CD=$(dirname $(readlink -f $0)) | |
while getopts hlv: option ; do | |
case "${option}" | |
in | |
h) export HELP=1;; | |
l) export LIST=1;; |
#!/bin/bash | |
v=$1 | |
if [ "$v" == "" ] ; then | |
v=-1 | |
fi | |
list=$(curl -L 'https://download.zerotier.com/RELEASES/' | gzip -d || curl -L 'https://download.zerotier.com/RELEASES/') | |
list=$(echo "$list" | awk -F'"' '{print $2}' | sort -V ) | |
n=$(echo "$list" | wc -l | egrep -v '^$') |
from arnold import * | |
import GafferArnold | |
import ctypes | |
import imath | |
import Gaffer | |
def convert_parameters( gaffer_shader, node ): | |
node_name = AiNodeGetName( node ) | |
entry = AiNodeGetNodeEntry( node ) |
# =============================================================================================================== | |
# rules to redirect all ports to a different machine (192.168.0.3), but port 22 | |
# =============================================================================================================== | |
redirect_to=192.168.0.3 | |
iptables -A FORWARD -i eth0 -o eth0 -p tcp --syn --dport 1:21 -m conntrack --ctstate NEW -j ACCEPT | |
iptables -A FORWARD -i eth0 -o eth0 -p udp --dport 1:21 -m conntrack --ctstate NEW -j ACCEPT | |
iptables -A FORWARD -i eth0 -o eth0 -p tcp --syn --dport 23:65389 -m conntrack --ctstate NEW -j ACCEPT | |
iptables -A FORWARD -i eth0 -o eth0 -p udp --dport 23:65389 -m conntrack --ctstate NEW -j ACCEPT | |
iptables -A FORWARD -i eth0 -o eth0 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | |
iptables -t nat -A PREROUTING -p tcp --syn --dport 1:21 -j DNAT --to-destination $redirect_to |
#!/bin/bash | |
# run this in the machine running ldap server to export the db to ldif | |
# slapcat -n 0 -l config.ldif | |
# slapcat -n 1 -l data2.ldif' | |
# this mangles the ldif output so it can be import by synology openldap | |
cat data2.ldif | \ | |
sed 's/dc=atomovfx,dc=lan/dc=ldap/g' | \ | |
sed -e 's/Admin/admin/g' -e 's/Users/users/g' -e 's/ou=Group/cn=groups/g' -e 's/ou=/cn=/g' | \ |