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
| #!/usr/bin/env python3 | |
| import subprocess | |
| import sys | |
| import os | |
| import tempfile | |
| import time | |
| import threading | |
| from ollama import Client | |
| # Retrieve the Ollama API host from the environment variable. |
| 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 download python.sh script from the following URL and run it: | |
| :: https://gist.github.com/hradec/32840097fe4cada3119468d8027155f9#file-python-sh | |
| :: running python.sh in the MSYS2 environment allows to run the same linux python.sh script in | |
| :: Windows environment without any changes!!! | |
| :: ================================================================================================ | |
| @echo off |
| #!/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 |