diff --git a/NOTES b/NOTES
deleted file mode 100644
index c325e4d..0000000
--- a/NOTES
+++ /dev/null
@@ -1,34 +0,0 @@
-SETUP
-
-install wheezy
-
-==== /etc/apt/sources.list
-     deb http://ftp.debian.org/debian/ wheezy main contrib non-free
-     deb http://ftp.debian.org/debian/ wheezy-backports main contrib non-free
-     deb http://ftp.debian.org/debian/ jessie main contrib non-free
-====
-
-==== /etc/apt/preferences
-Package: *
-Pin: release a=stable
-Pin-Priority: 700
-
-Package: *
-Pin: release a=testing
-Pin-Priority: 650
-====
-
-$ apt-get install linux-headers-$(uname -r)
-$ apt-get install -t wheezy-backports virtualbox-guest-utils
-
-setup sudo, vim-nox, imagemagick, screen, git(jessie) , sshd, ssh keys, user groups (usermod -a -G <group>  <user>)
-setup dotfiles, EDITOR and PATH
-
-$ apt-get install -t jessie wine
-$ apt-get install -t jessie winetricks
-$ apt-get install -t jessie xvfb
-
-setup_dev_python_win
-setup_dev_python
-setup_dev_win
-
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..eeed94c
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+Scripts to help setup a vm that includes cross compiling python on a linux box to a windows exe
diff --git a/bin/image-create b/bin/image-create
new file mode 100755
index 0000000..7ed3bcf
--- /dev/null
+++ b/bin/image-create
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+if [[ -z "$3" ]] ; then
+    echo "$0 <image_name> <dev> <num partitions> [--dry-run]"
+    exit 1
+fi
+
+if [[ -z "$4" ]] ; then
+    DRYRUN=""
+else
+    DRYRUN="echo"
+fi
+
+imagename="$1"
+dev="$2"
+numpartitions="$3"
+
+mountdir="$(sudo mktemp -d)"
+imagedir="/tmp/$imagename"
+
+for I in $(seq "$numpartitions") ; do
+    $DRYRUN sudo mount "$dev$I" "$mountdir"
+    $DRYRUN mkdir -p "$imagedir/partition$I/"
+    $DRYRUN sudo cp -rf --preserve=all "$mountdir/"* "$imagedir/partition$I/"
+    $DRYRUN sudo umount "$mountdir"
+done
+$DRYRUN sudo dd if="$dev" of="$imagedir/mbr.img" bs=446 count=1
+
+$DRYRUN sudo tar --directory=/tmp -czf $imagename.tgz $imagename
+$DRYRUN sudo chown $USER:$USER $imagename.tgz
+$DRYRUN sudo rm -rf /tmp/$imagename
+
+sudo rm -rf "$mountdir"
diff --git a/bin/image-deploy b/bin/image-deploy
new file mode 100755
index 0000000..6507970
--- /dev/null
+++ b/bin/image-deploy
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+if [[ -z "$2" ]] ; then
+    echo "$0 <image_name> <dev> [--dry-run]"
+    exit 1
+fi
+
+if [[ -z "$3" ]] ; then
+    DRYRUN=""
+else
+    DRYRUN="echo"
+fi
+
+imagename="$1"
+dev="$2"
+
+
+mountdir="$(sudo mktemp -d)"
+imagedirroot=$(sudo mktemp -d)
+imagedir="$imagedirroot/$imagename"
+
+sudo tar --directory="$imagedirroot" -xzf "$imagename.tgz"
+sudo chown $USER:$USER "$imagedirroot" "$imagedir"
+numpartitions=$(sudo ls -d "$imagedir/partition"* | wc -l)
+
+for I in $(seq "$numpartitions") ; do
+    $DRYRUN sudo mount "$dev$I" "$mountdir"
+    $DRYRUN sudo cp -rf --preserve=all "$imagedir/partition$I/"* "$mountdir"
+    $DRYRUN sudo umount "$mountdir"
+done
+$DRYRUN sudo dd of="$dev" if="$imagedir/mbr.img" bs=446 count=1
+
+sudo rm -rf "$imagedirroot"
+sudo rm -rf "$mountdir"
diff --git a/bin/pyinstaller-linux b/bin/pyinstaller-linux
new file mode 100755
index 0000000..7103086
--- /dev/null
+++ b/bin/pyinstaller-linux
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+if [[ "$!" == "--onedir" ]] ; then
+    ARGS="--onedir"
+else
+    ARGS="--onefile"
+fi
+
+python3-venv pyinstaller-linux ~/.virtualenvs/pyinstaller/bin/pyinstaller ${ARGS} $@
diff --git a/bin/pyinstaller-win b/bin/pyinstaller-win
index 88856bc..ffdc114 100755
--- a/bin/pyinstaller-win
+++ b/bin/pyinstaller-win
@@ -1,9 +1,29 @@
 #!/bin/bash
 
-if [[ "$!" == "--onedir" ]] ; then
-    ARGS="--onedir"
-else
-    ARGS="--onefile"
-fi
+ARGS="--onefile"
+CMD="wine cmd /c"
+PATHS=""
+for arg in "$@"; do
+    case "$arg" in
+        '--help')
+            echo "$0 [--onedir] [--venv <venv>]"
+            exit
+            ;;
+        '--onedir')
+            shift
+            ARGS="--onedir"
+            ;;
+        '--venv')
+            shift
+            CMD="python3-venv-win -c $1"
+            PATHS="set PYTHONPATH=%HomeDrive%%HomePath%\\.virtualenvs\\${1}\\Lib\\site-packages &&"
+            shift
+            ;;
+        '--')
+            shift
+            break
+            ;;
+    esac
+done
 
-wine pyinstaller ${ARGS} $@
+${CMD} "${PATHS} pyinstaller ${ARGS} $@"
diff --git a/bin/python3-venv-win b/bin/python3-venv-win
new file mode 100755
index 0000000..90def90
--- /dev/null
+++ b/bin/python3-venv-win
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+function usage() {
+    if [[ -n "$1" ]] ; then
+        echo "Error $1"
+    fi
+    echo "$0 [-c] <venv> [commands]"
+    exit $2
+}
+
+create=0
+if [[ "${1}" == "-c" ]] ; then
+    create=1
+    shift
+fi
+venv=
+if [[ -n "${1}" ]] ; then
+    venv=$1
+    shift
+else
+    usage "missing venv" 1
+fi
+
+if [[ ! -f "$HOME/.wine/drive_c/users/$USER/.virtualenvs/${venv}/Scripts/activate.bat" ]] ; then
+    if [[ ${create} -eq 1 ]] ; then
+        wine cmd /c mkdir "%HomeDrive%%HomePath%/.virtualenvs" &> /dev/null
+        wine cmd /c python -m venv "%HomeDrive%%HomePath%/.virtualenvs/${venv}"
+    else
+        echo "env \"${venv}\" not found"
+        exit
+    fi
+fi
+
+if [[ -n "${@}" ]] ; then
+    wine cmd /c "%HomeDrive%%HomePath%/.virtualenvs/${venv}/Scripts/activate.bat" "&&" ${@}
+else
+    wine cmd /k "%HomeDrive%%HomePath%/.virtualenvs/${venv}/Scripts/activate.bat"
+fi
diff --git a/bin/reencode b/bin/reencode
new file mode 100755
index 0000000..325954c
--- /dev/null
+++ b/bin/reencode
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+du -H -c . | tail -n1 | cut -f 1
+
+START=$(du -c . | tail -n1 | cut -f 1)
+
+if [[ "$1" == "-d" ]] ; then
+    DRYRUN="echo"
+else
+    DRYRUN=""
+fi
+
+echo "" > remove
+
+di_opts=""
+qual_opts="-crf 21"
+codec="libx265"
+speed="fast"
+
+for infile in * ; do
+    case "$infile" in
+        *reencode*) ;;
+        *.avi | *.mkv | *.mp4)
+            outfile="${infile}-reencodex265.mkv"
+            $DRYRUN ffmpeg -i "${infile}" ${di_opts} ${qual_opts}  -c:v ${codec} -sn -c:a aac ${subtitle} -preset ${speed} "${outfile}"
+            ;;
+    esac
+done && \
+$DRYRUN rm -f *.nfo && \
+$DRYRUN rm -rf '.@__thumb' && \
+for x in * ; do
+    case "$x" in
+        *reencode*) ;;
+        *.mkv | *.avi | *.mp4)
+            echo "\rm -f \"${x}\"" | grep -v reencode >> remove
+            ;;
+    esac
+done
+
+echo "\rm -f remove" >> remove
+
+END=$(du -c . | tail -n1 | cut -f 1)
+
+echo "(${END}-${START}) / ${START}" | bc -l
diff --git a/bin/reencode-dirs b/bin/reencode-dirs
new file mode 100755
index 0000000..e366eef
--- /dev/null
+++ b/bin/reencode-dirs
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+du -H -c . | tail -n1 | cut -f 1
+
+START=$(du -c . | tail -n1 | cut -f 1)
+
+if [[ "$1" == "-d" ]] ; then
+    DRYRUN="echo"
+else
+    DRYRUN=""
+fi
+
+echo "" > remove
+
+di_opts=""
+qual_opts="-crf 21"
+codec="libx265"
+speed="fast"
+
+for indir in */; do
+    pushd "$indir"
+    reencode $@
+    echo "cd \"$indir\"" >> ../remove
+    cat remove >> ../remove
+    echo "cd .." >> ../remove
+    rm -f remove
+    popd
+done && \
+$DRYRUN rm -f *.nfo && \
+$DRYRUN rm -rf '.@__thumb' && \
+
+echo "\rm -f remove" >> remove
+
+END=$(du -c . | tail -n1 | cut -f 1)
+
+echo "(${END}-${START}) / ${START}" | bc -l
diff --git a/bin/upgrayedd b/bin/upgrayedd
index 55f6010..f1eccdc 100755
--- a/bin/upgrayedd
+++ b/bin/upgrayedd
@@ -1,23 +1,44 @@
 #!/bin/bash
 
-if [[ "$1" == "-h" ]] ; then
-    echo "$0 [-4] [-d]"
+usage() {
+    echo "$0 [-4] [-d] [-y]"
+    echo
+    echo "  -4  use ipv4"
+    echo "  -d  perform a dist-upgrade"
+    echo "  -y  automatic yes to prompts"
+    echo
     exit
-fi
+}
 
 EXTRAOPTS=
-if [[ "$1" == "-4" ]] ; then
-    EXTRAOPTS="-o Acquire::ForceIPv4=true"
-    shift
-fi
-
 DIST=
+DODIST=0
+YES=
+
+while getopts "4dyh" opt ; do
+    case $opt in
+        4)
+            EXTRAOPTS="${EXTRAOPTS} -o Acquire::ForceIPv4=true"
+            ;;
+        d)
+            DODIST=1
+            ;;
+        y)
+            YES="-y"
+            ;;
+        h)
+            usage
+            ;;
+    esac
+done
+
+
 DONE="echo done"
-if [[ "$1" == "-d" ]] ; then
-    DIST="sudo apt $EXTRAOPTS dist-upgrade"
+if [[ $DODIST -eq 1 ]] ; then
+    DIST="sudo apt ${YES} ${EXTRAOPTS} dist-upgrade"
     DONE="echo \"done with dist-upgrade\""
     shift
 fi
 
 
-sudo apt ${EXTRAOPTS} update && sudo apt ${EXTRAOPTS} upgrade && sudo apt autoremove && $DIST && $DONE
+sudo apt ${YES} ${EXTRAOPTS} update && sudo apt ${YES} ${EXTRAOPTS} upgrade && sudo apt ${YES} autoremove && ${DIST} && ${DONE}
diff --git a/dev/install_dev_conda_win_draggan b/dev/install_dev_conda_win_draggan
new file mode 100755
index 0000000..b2d6c65
--- /dev/null
+++ b/dev/install_dev_conda_win_draggan
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+CUDA=11.8
+
+./install_dev_conda_win
+
+cd ~/src/DragGAN
+git checkout environment.yml
+
+sed -i 's/^  - nvidia/  - nvidia\n  - conda-forge/g' environment.yml
+sed -i 's/dependencies:/dependencies:\n  - pyinstaller/g' environment.yml
+sed -i 's/\(^.*pytorch.*=.*$\)/\1\n  - pytorch-cuda='"${CUDA}"'/g' environment.yml
+sed -i 's/^  - cudatoolkit=.*$/  - cudatoolkit='"${CUDA}"'/g' environment.yml
+
+wine conda env create -f environment.yml
+wine conda info
+wine conda env list
+
+sed -i 's/(result, consumed) = self\._buffer_decode(data, self\.errors, final)/(result, consumed) = self._buffer_decode(data, "replace", final)/g' ${HOME}/.wine/drive_c/users/${USER}/miniconda3/envs/stylegan3/lib/codecs.py
+sed -i "s/'could not get source code'/f'could not get source code: {file}'/g" ${HOME}/.wine/drive_c/users/${USER}/miniconda3/envs/stylegan3/lib/inspect.py
+
+echo "make sure to install nvidia cuda tools version ${CUDA}"
+echo "git clean -dfx && wine cmd /c conda activate stylegan3 \"&&\" pyinstaller --onedir visualizer_drag.py"
+echo "wine cmd /c conda activate stylegan3 \"&&\" python -m compileall -b training stylegan_human"
+echo "copy ${HOME}/.wine/drive_c/users/${USER}/miniconda3/envs/stylegan3/lib/site-packages/glfw/glfw3.dll"
+echo "copy ${HOME}/.wine/drive_c/users/${USER}/miniconda3/envs/stylegan3/Library/bin/ninja.exe"
+echo "copy ${HOME}/.wine/drive_c/users/${USER}/miniconda3/envs/stylegan3/include"
+echo "copy ${HOME}/.wine/drive_c/users/${USER}/miniconda3/envs/stylegan3/libs"
+echo "copy checkpoints"
+echo "copy training and stylegan_human"
+
+# git@github.com:XingangPan/DragGAN.git
diff --git a/dev/install_dev_conda_win_tryit b/dev/install_dev_conda_win_tryit
new file mode 100755
index 0000000..813deba
--- /dev/null
+++ b/dev/install_dev_conda_win_tryit
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+CUDA=11.8
+
+./install_dev_conda_win
+
+mkdir -p ~/src/tryit &> /dev/null
+cd ~/src/tryit
+
+echo "name: tryit
+channels:
+  - pytorch
+  - nvidia
+  - conda-forge
+dependencies:
+  - python >= 3.8
+  - numpy>=1.25
+  - pytorch>=2.0.1
+  - pytorch-cuda=${CUDA}
+  - cudatoolkit=${CUDA}
+  - pyinstaller" \
+     > environment.yml
+
+if [[ ! -e "tryit.py" ]] ; then
+    echo 'import torch
+train_on_gpu = torch.cuda.is_available()
+if train_on_gpu:
+    print("CUDA is available, Training on GPU ...")
+else:
+    print("CUDA is not available!  Training on CPU ...")' > tryit.py
+fi
+
+wine conda env create -f environment.yml
+wine conda info
+wine conda env list
+
+
+echo "make sure to install nvidia cuda tools version ${CUDA}"
+echo "git clean -dfx && wine cmd /c conda activate tryit \"&&\" pyinstaller --onefile tryit.py"
diff --git a/dev/install_dev_python_win_ntfs b/dev/install_dev_python_win_ntfs
new file mode 100755
index 0000000..01b33e6
--- /dev/null
+++ b/dev/install_dev_python_win_ntfs
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+source ./script_lib/std.inc
+source ./script_lib/install.inc
+
+./install_dev_python_win
+
+python3-venv-win -c ntfs pip install ntfsutils
+
+if [[ -e "$HOME/.wine/drive_c/users/$USER/.virtualenvs/ntfs/Lib/site-packages/ntfsutils-0.1.5.dist-info" ]] ; then
+    apply_patch "ntfutils.patch" "$HOME/.wine/drive_c/users/$USER/.virtualenvs/ntfs/Lib/site-packages/"
+fi
+
+# pyinstaller-win --venv ntfs -- --uac-admin linkssd.py
+# pyinstaller-win --venv ntfs profile_dirs.py
diff --git a/dev/install_dev_python_win_pygame b/dev/install_dev_python_win_pygame
new file mode 100755
index 0000000..53b8b58
--- /dev/null
+++ b/dev/install_dev_python_win_pygame
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+source ./script_lib/install.inc
+
+./install_dev_python_win
+
+python3-venv-win -c pygame pip install numpy scipy sounddevice pygame PyOpenGL PyOpenGL_accelerate
diff --git a/dev/ntfutils.patch b/dev/ntfutils.patch
new file mode 100644
index 0000000..e96eb84
--- /dev/null
+++ b/dev/ntfutils.patch
@@ -0,0 +1,80 @@
+From 84f8535d7e81c947e28abafd5f0e2f00456a2a75 Mon Sep 17 00:00:00 2001
+From: Brian Koropoff <bkoropoff@gmail.com>
+Date: Fri, 8 Jul 2022 21:54:05 -0700
+Subject: [PATCH 1/3] fs: fix invalid handle value
+
+DWORD is unsigned, so -1 must be cast appropriately
+---
+ ntfsutils/fs.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ntfsutils/fs.py b/ntfsutils/fs.py
+index c90a711..7f6629c 100644
+--- a/ntfsutils/fs.py
++++ b/ntfsutils/fs.py
+@@ -28,7 +28,7 @@
+ 
+ MAX_PATH = 260
+ 
+-INVALID_HANDLE_VALUE = -1
++INVALID_HANDLE_VALUE = HANDLE(-1).value
+ 
+ class FILETIME(ctypes.Structure):
+     _fields_ = [("dwLowDateTime", DWORD),
+
+From c100bd02adf83138d579ed664a45235070ad80c5 Mon Sep 17 00:00:00 2001
+From: Brian Koropoff <bkoropoff@gmail.com>
+Date: Fri, 8 Jul 2022 21:56:01 -0700
+Subject: [PATCH 2/3] junction: fix isjunction
+
+os.path.exists will return False for junctions with invalid targets.
+Check for an error from GetFileAttributes instead.
+---
+ ntfsutils/junction.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/ntfsutils/junction.py b/ntfsutils/junction.py
+index 4c49802..992a61e 100644
+--- a/ntfsutils/junction.py
++++ b/ntfsutils/junction.py
+@@ -100,10 +100,13 @@ def unparsed_unconvert(path):
+     return path
+ 
+ def isjunction(path):
+-    if not os.path.exists(path) or not fs.junctions_supported(path):
++    if not fs.junctions_supported(path):
+         return False
+ 
+     attrs = GetFileAttributes(path)
++    if attrs == DWORD(-1).value:
++        return False
++
+     return bool((attrs & fs.FILE_ATTRIBUTE_DIRECTORY) and
+                 (attrs & fs.FILE_ATTRIBUTE_REPARSE_POINT))
+ 
+
+From 42600251d88aaa270d48620dddb47e6427b76524 Mon Sep 17 00:00:00 2001
+From: Brian Koropoff <bkoropoff@gmail.com>
+Date: Fri, 8 Jul 2022 21:57:18 -0700
+Subject: [PATCH 3/3] junction: fix readlink
+
+Use 0 for desired access, or you can get permission denied in some
+circumstances.
+---
+ ntfsutils/junction.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ntfsutils/junction.py b/ntfsutils/junction.py
+index 992a61e..b0da63c 100644
+--- a/ntfsutils/junction.py
++++ b/ntfsutils/junction.py
+@@ -160,7 +160,7 @@ def readlink(path):
+     if not isjunction(path):
+         raise Exception("%s does not exist or is not a junction" % path)
+ 
+-    hlink = CreateFile(path, fs.GENERIC_READ, fs.FILE_SHARE_READ, None,
++    hlink = CreateFile(path, 0, fs.FILE_SHARE_READ, None,
+         fs.OPEN_EXISTING,
+         fs.FILE_FLAG_OPEN_REPARSE_POINT | fs.FILE_FLAG_BACKUP_SEMANTICS,
+         None)
+
diff --git a/dotfiles/.bash_aliases b/dotfiles/.bash_aliases
index 8356684..33d0c3e 100644
--- a/dotfiles/.bash_aliases
+++ b/dotfiles/.bash_aliases
@@ -1,11 +1,12 @@
 alias sudo='sudo '
 alias ll='ls -hAlF'
-ls --color=auto &> /dev/null && alias ls='ls --color=auto' || alias ls='ls -G'
+ls --color=always &> /dev/null && alias ls='ls --color=always' || alias ls='ls -G'
 alias grep='grep --color=auto'
 alias mv='mv -i'
 alias rm='rm -i'
 alias cp='cp -i'
-alias youtube-dl='python3-venv youtube-dl youtube-dl'
+alias youtube-dl='yt-dlp'
 alias gcp='git cherry-pick'
 alias unrar='rar x'
 alias json='python3 -m json.tool'
+alias diff='diff --color=always'
diff --git a/link_base b/install_base
similarity index 61%
rename from link_base
rename to install_base
index 5441f33..e6f164b 100755
--- a/link_base
+++ b/install_base
@@ -2,12 +2,19 @@
 
 source ./script_lib/link.inc
 
+mkdir ~/bin &> /dev/null && true
+
+sudo apt-get install -y vim-nox rar
+
 link_dotfiles .bash_aliases
 link_dotfiles .gitconfig
 link_dotfiles .gitignore
 link_dotfiles .vimrc
 
 link_bin bsync
+link_bash_completion bsync
+
+link_bin upgrayedd
 
 if [[ -e ../profile_dirs ]] ; then
     link_bin_external ../profile_dirs/profile_dirs.py profile_dirs
@@ -16,3 +23,9 @@ else
 fi
 
 link_bin unjson_tool.py unjson
+
+link_bin reencode
+link_bin reencode-dirs
+
+link_bin image-create
+link_bin image-deploy
diff --git a/install_dev_conda_win b/install_dev_conda_win
new file mode 100755
index 0000000..6f9ad25
--- /dev/null
+++ b/install_dev_conda_win
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+source ./script_lib/std.inc
+source ./script_lib/install.inc
+source ./script_lib/graphics.inc
+source ./script_lib/link.inc
+
+
+sudo dpkg --add-architecture i386
+sudo apt-get update
+
+sudo apt-get install -y wine winetricks
+
+wine wineboot
+xvfb-run winetricks -q win10 vcrun2019 cmd
+
+download https://repo.anaconda.com/miniconda/Miniconda3-py38_23.3.1-0-Windows-x86_64.exe
+install_exe Miniconda3-py38_23.3.1-0-Windows-x86_64.exe "/InstallationType=JustMe /AddToPath=1 /RegisterPython=1 /S"
diff --git a/install_dev_go b/install_dev_go
index d47c963..bf75719 100755
--- a/install_dev_go
+++ b/install_dev_go
@@ -4,12 +4,15 @@ source ./script_lib/std.inc
 source ./script_lib/install.inc
 source ./script_lib/link.inc
 
+name=go
 version=1.19
-filename=go${version}.linux-amd64.tar.gz
-dirname=$(rootname go${version}.linux-amd64.tar.gz)
+filename="${name}${version}.linux-amd64.tar.gz"
+remote="https://go.dev/dl/${filename}"
 
-download https://go.dev/dl/${filename}
-install_go ${filename}
+dirname="$(rootname "${filename}")"
+
+download "${remote}" "${filename}"
+install_go "${filename}"
 
 link_bin_external "${HOME}/opt/${dirname}/bin/go"
 link_bin_external "${HOME}/opt/${dirname}/bin/gofmt"
diff --git a/install_dev_python b/install_dev_python
index cf746e9..8743736 100755
--- a/install_dev_python
+++ b/install_dev_python
@@ -2,9 +2,12 @@
 
 source ./script_lib/link.inc
 
-sudo apt-get install -y python3-venv binutils nfs-common net-tools ipython3 libfreetype6-dev libjpeg-dev
+sudo apt-get install -y python3-pip python3-venv binutils nfs-common net-tools ipython3 libfreetype6-dev libjpeg-dev
 
 link_bin python3-venv
+link_bin pyinstaller-linux
+
+python3-venv -c pyinstaller pip install pyinstaller==5.12.0
 
 # python3-venv -c <venv>
 # python3-venv <venv> [python] <script.py>
diff --git a/install_dev_python_win b/install_dev_python_win
index 645b874..e30b119 100755
--- a/install_dev_python_win
+++ b/install_dev_python_win
@@ -5,25 +5,21 @@ source ./script_lib/install.inc
 source ./script_lib/graphics.inc
 source ./script_lib/link.inc
 
-sudo dpkg --add-architecture i386 && sudo apt-get update
+py3_version=3.8.10
+
+
+sudo dpkg --add-architecture i386
+sudo apt-get update
+
 sudo apt-get install -y wine winetricks
 
-#export WINEPREFIX="$HOME/.wine32"
-export WINEARCH=win32
 wine wineboot
+xvfb-run winetricks -q win10 vcrun2015
 
-xvfb-run winetricks -q vcrun2008
+download https://www.python.org/ftp/python/${py3_version}/python-${py3_version}-amd64.exe
+install_exe python-${py3_version}-amd64.exe "/quiet PrependPath=1"
 
-download https://www.python.org/ftp/python/2.7.18/python-2.7.18.msi
-install_msi python-2.7.18.msi
-wine pip install numpy scipy ntfsutils pyinstaller==3.6
+wine pip install pyinstaller==5.12.0
 
 link_bin pyinstaller-win
-
-xvfb-run winetricks -q win10 vcrun2015
-
-download https://www.python.org/ftp/python/3.9.5/python-3.9.5.exe
-#run "python-3.9.5.exe /quiet /passive /layout c:/tmp"
-#run "c:/tmp/python-3.9.5.exe /quiet /passive /simple InstallAllUsers=1 PrependPath=1"
-run "python-3.9.5.exe PrependPath=1"
-#wine pip3 install numpy scipy ntfsutils pyinstaller
+link_bin python3-venv-win
diff --git a/install_pihole b/install_pihole
new file mode 100755
index 0000000..9712cf6
--- /dev/null
+++ b/install_pihole
@@ -0,0 +1,9 @@
+#!/bin/bash -e
+
+
+source ./script_lib/std.inc
+source ./script_lib/install.inc
+
+download https://install.pi-hole.net pihole-install.sh
+
+run_bash pihole-install.sh
diff --git a/install_virtualbox b/install_virtualbox
index e91e4cd..695f0f0 100755
--- a/install_virtualbox
+++ b/install_virtualbox
@@ -4,14 +4,17 @@ source ./script_lib/std.inc
 source ./script_lib/install.inc
 source ./script_lib/link.inc
 
-sudo apt-get install -y libqt5core5a libqt5gui5 libqt5opengl5 libqt5printsupport5 libqt5widgets5 libqt5x11extras5 libsdl1.2debian linux-headers-$(uname -r)
+version="7.0.6"
+versionb="155176"
+filename="virtualbox-${version%.*}_${version}-${versionb}~Debian~bullseye_amd64.deb"
+remote="https://download.virtualbox.org/virtualbox/${version}/${filename}"
 
-filename=virtualbox-6.1_6.1.36-152435~Debian~bullseye_amd64.deb
-dirname=$(rootname $filename)
+sudo apt-get install -y libxcursor1 libvpx6 libqt5xml5 libqt5x11extras5 libqt5widgets5 libqt5printsupport5 libqt5opengl5 libqt5help5 libqt5gui5 libqt5dbus5 libqt5core5a libgl1 libvulkan1 linux-headers-$(uname -r)
 
-download https://download.virtualbox.org/virtualbox/6.1.36/${filename}
+dirname=$(rootname "${filename}")
 
-install_virtualbox ${filename}
+download "${remote}"
+install_deb "${filename}"
 
 link_bin vmadd
 link_bin vmfixnetwork
diff --git a/install_wireguard b/install_wireguard
new file mode 100755
index 0000000..66df79b
--- /dev/null
+++ b/install_wireguard
@@ -0,0 +1,145 @@
+#!/bin/bash -e
+
+source ./script_lib/std.inc
+source ./script_lib/link.inc
+source ./script_lib/network.inc
+
+usage() {
+    local err=$1
+    local msg=$2
+
+    if [[ -n "$msg" ]] ; then
+        echo "ERROR: $msg"
+        echo
+    fi
+
+    echo "$0 [-h] -4 ADDRESS/NETMASK -6 ADDRESS6/NETMASK6 -v VPNADDRESS:VPNPORT"
+    echo
+
+    exit $err
+}
+
+while getopts "4:6:v:h" opt ; do
+    case $opt in
+        4)  NETWORK4_T=$OPTARG
+            ADDRESS4=${NETWORK4_T%/*}
+            if [[ "$NETWORK4_T" == *"/"* ]] ; then
+                NETMASK4=${NETWORK4_T#*/}
+            fi
+            ;;
+        6)  NETWORK6_T=$OPTARG
+            ADDRESS6=${NETWORK6_T%/*}
+            if [[ "$NETWORK6_T" == *"/"* ]] ; then
+                NETMASK6=${NETWORK6_T#*/}
+            fi
+            ;;
+        v)  VPN_T=$OPTARG
+            VPN=${VPN_T%:*}
+            if [[ "$VPN_T" == *":"* ]] ; then
+                PORT=${VPN_T#*:}
+            fi
+            ;;
+        h)  usage
+            ;;
+    esac
+done
+
+if [[ -z $ADDRESS4 ]] ; then usage 1 "missing ipv4 address"; fi
+if [[ -z $NETMASK4 ]] ; then usage 1 "missing ipv4 netmask"; fi
+if [[ -z $ADDRESS6 ]] ; then usage 1 "missing ipv6 address"; fi
+if [[ -z $NETMASK6 ]] ; then usage 1 "missing ipv6 netmask"; fi
+if [[ -z $VPN ]] ; then usage 1 "missing vpn address"; fi
+if [[ -z $PORT ]] ; then usage 1 "missing port"; fi
+
+ADDRESS4ROOT="${ADDRESS4%.*}"
+ADDRESS6ROOT="${ADDRESS6%:*}"
+
+sudo apt-get install -y wireguard wireguard-tools qrencode
+
+OUMASK=$(umask)
+umask 077
+wg genkey | sudo tee /etc/wireguard/server.key | wg pubkey | sudo tee /etc/wireguard/server.pub > /dev/null
+
+echo "[Interface]
+Address = $ADDRESS4/$NETMASK4, $ADDRESS6/$NETMASK6
+ListenPort = $PORT
+PrivateKey = $(sudo cat /etc/wireguard/server.key)
+PostUp = nft add table ip wireguard; nft add chain ip wireguard wireguard_chain {type nat hook postrouting priority srcnat\; policy accept\;}; nft add rule ip wireguard wireguard_chain counter packets 0 bytes 0 masquerade; nft add table ip6 wireguard; nft add chain ip6 wireguard wireguard_chain {type nat hook postrouting priority srcnat\; policy accept\;}; nft add rule ip6 wireguard wireguard_chain counter packets 0 bytes 0 masquerade
+PostDown = nft delete table ip wireguard; nft delete table ip6 wireguard" | sudo tee /etc/wireguard/wg0.conf > /dev/null
+
+umask $OUMASK
+
+echo '#! /usr/bin/env bash
+umask 077
+
+usage() {
+    local err=$1
+    local msg=$2
+
+    if [[ -n "$msg" ]] ; then
+        echo "ERROR: $msg"
+        echo
+    fi
+
+    echo "$0 <client index, starting from 2> <name> [dns]"
+    echo
+
+    exit $err
+}
+
+if [[ -z "$2" ]] ; then
+    usage 1
+fi
+
+if [[ "$1" -lt 2 ]] ; then
+    usage 1 "client index must be 2 or greater"
+fi
+
+ipv4="'$ADDRESS4ROOT'.$1"
+ipv6="'$ADDRESS6ROOT':$1"
+serv4="'$ADDRESS4'"
+serv6="'$ADDRESS6'"
+dns="${3-'$ADDRESS4'}"
+name="$2"
+target="'$VPN':'$PORT'"
+
+cd /etc/wireguard
+
+wg genkey | tee "${name}.key" | wg pubkey > "${name}.pub"
+wg genpsk > "${name}.psk"
+
+echo "" >> /etc/wireguard/wg0.conf
+echo "# $name" >> /etc/wireguard/wg0.conf
+echo "[Peer]" >> /etc/wireguard/wg0.conf
+echo "PublicKey = $(cat "${name}.pub")" >> /etc/wireguard/wg0.conf
+echo "PresharedKey = $(cat "${name}.psk")" >> /etc/wireguard/wg0.conf
+echo "AllowedIPs = $ipv4/32, $ipv6/128" >> /etc/wireguard/wg0.conf
+echo "" >> /etc/wireguard/wg0.conf
+
+echo "[Interface]" > "${name}.conf"
+echo "Address = $ipv4/'$NETMASK4', $ipv6/'$NETMASK6'" >> "${name}.conf"
+echo "DNS = ${dns}" >> "${name}.conf" #Specifying DNS Server
+echo "PrivateKey = $(cat "${name}.key")" >> "${name}.conf"
+echo "" >> "${name}.conf"
+echo "[Peer]" >> "${name}.conf"
+echo "PublicKey = $(cat server.pub)" >> "${name}.conf"
+echo "PresharedKey = $(cat "${name}.psk")" >> "${name}.conf"
+echo "Endpoint = $target" >> "${name}.conf"
+# echo "AllowedIPs = ${serv4}/32, ${serv6}/128" >> "${name}.conf" # clients isolated from one another
+# echo "AllowedIPs = '$ADDRESS4ROOT'.0/'$NETMASK4', '$ADDRESS6ROOT':/'$NETMASK6'" >> "${name}.conf" # clients can see each other
+echo "AllowedIPs = 0.0.0.0/0, ::/0" >> "${name}.conf" # client routes all traffic
+echo "PersistentKeepalive = 25" >> "${name}.conf"
+
+wg syncconf wg0 <(wg-quick strip wg0)
+
+# Print QR code scanable by the Wireguard mobile app on screen
+qrencode -t ansiutf8 < "${name}.conf"' > "$HOME/bin/wg-add-client"
+
+sysctl_set net.ipv4.ip_forward 1
+sysctl_set net.ipv6.conf.all.forwarding 1
+
+sudo systemctl enable wg-quick@wg0.service
+sudo systemctl daemon-reload
+sudo systemctl start wg-quick@wg0
+
+echo "On Router, forward port: $PORT to $(network_get_default_address) ($(network_get_default_interface))"
diff --git a/install_ytdlp b/install_ytdlp
new file mode 100755
index 0000000..b0893f9
--- /dev/null
+++ b/install_ytdlp
@@ -0,0 +1,19 @@
+#!/bin/bash -e
+
+source ./script_lib/std.inc
+source ./script_lib/install.inc
+source ./script_lib/link.inc
+
+name="yt-dlp"
+version=2023.07.06
+filename="${name}.${version}.zip"
+remote="https://github.com/yt-dlp/yt-dlp/releases/download/${version}/yt-dlp_linux.zip"
+
+dirname="$(rootname "${filename}")"
+
+download "${remote}" "${filename}"
+install_ytdlp ${filename}
+
+link_bin_external "${HOME}/opt/${dirname}/yt-dlp_linux" "yt-dlp"
+
+yt-dlp -U
diff --git a/link_admin b/link_admin
deleted file mode 100755
index 3aeb813..0000000
--- a/link_admin
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash -e
-
-source ./script_lib/link.inc
-
-link_bin upgrayedd
diff --git a/old/bin/create_filedisk b/old/bin/create_filedisk
deleted file mode 100755
index 70f4abf..0000000
--- a/old/bin/create_filedisk
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-if [[ -z $3 ]] ; then
-    echo "$0 <file> <mount> <size in GB>"
-    exit
-fi
-
-file=$1
-mount=$2
-size=$3
-
-size=$((size * 1024 * 1024))
-
-dd if=/dev/zero of=$file bs=1024 count=$size
-
-mkfs.ext4 -F $file
-mkdir $mount &> /dev/null
-
-#mount -o loop $file $mount
-
-
-cat /etc/fstab | grep " $mount " &> /dev/null
-if [[ $? -ne 0 ]] ; then
-    echo "" >> /etc/fstab
-    echo "$file $mount ext4 loop 0 0" >> /etc/fstab
-fi
-
-mount -a
diff --git a/old/bin/create_swap b/old/bin/create_swap
deleted file mode 100755
index 0a7bad3..0000000
--- a/old/bin/create_swap
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-
-if [[ -z $2 ]] ; then
-    echo "$0 <file> <size in GB>"
-    exit
-fi
-
-file=$1
-size=$2
-size=$((size * 1024 * 1024))
-
-dd if=/dev/zero of=$file bs=1024 count=$size
-
-mkswap $file
-swapon $file
-
-cat /etc/fstab | grep swap &> /dev/null
-if [[ $? -ne 0 ]] ; then
-    echo "" >> /etc/fstab
-    echo "$file          swap            swap    defaults        0 0" >> /etc/fstab
-fi
-
-mount -a
diff --git a/old/bin/start_proxy b/old/bin/start_proxy
deleted file mode 100755
index cfa1927..0000000
--- a/old/bin/start_proxy
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-#set -x
-
-source ${HOME}/.proxy
-
-# socks5 proxy
-ssh ${PROXYID} -D 8000 ${PROXYHOST} -N &
-sleep 5
-curl ifconfig.me/ip
-curl --socks5-hostname localhost:8000 ifconfig.me/ip
diff --git a/old/dev/restartable b/old/dev/restartable
deleted file mode 100755
index c12ddd0..0000000
--- a/old/dev/restartable
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-f=$1
-
-
-$f &
-pid=$!
-while inotifywait -e close_write $f; do
-    kill $pid
-    wait
-    sleep 1
-    $f &
-    pid=$!
-done
-kill $pid
-wait
diff --git a/old/dev_go/gotest b/old/dev_go/gotest
deleted file mode 100755
index 7e8c9b0..0000000
--- a/old/dev_go/gotest
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-
-
-# it seems that return values from go * doesn't indicate success/failure of tests
-result=0
-
-echo "==== fmt ====="
-go fmt
-#for d in $(\ls) ; do pushd $d && go fmt ; popd &> /dev/null ; done
-for d in $(\ls) ; do (cd $d &> /dev/null && go fmt) ; done
-echo
-
-echo "==== test ===="
-ls *test.go &> /dev/null && go test
-echo
-
-echo "==== race ===="
-ls *test.go &> /dev/null && go test -race
-for f in $(\ls *.go) ; do grep "^package main" $f && go run -race $f $@ ; done
-echo
-
-echo "==== vet ====="
-go vet
-echo
-
-echo "==== lint ===="
-# go get github.com/golang/lint/golint
-for f in $(find . -name "*.go") ; do golint $f ; done
-echo
-
-
-# github.com/remyoudompheng/go-misc/deadcode
-# github.com/kisielk/errcheck
-# gocov || go test -cover
-
-
-# TODO: tests and examples should be in package: foo_test
-# TODO: remove panics, add new type of error. or if panic is the right decision, document why it can heppen
-# TODO: add benchmarks
-
-
-exit ${result}
diff --git a/old/dev_python/pylint-pep8 b/old/dev_python/pylint-pep8
deleted file mode 100755
index 5e2f6d2..0000000
--- a/old/dev_python/pylint-pep8
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-r=0
-PYLINT_PARAMS="-r n -d I"
-if [[ ${TERM} == "xterm-color" ]] ; then
-    pylint ${PYLINT_PARAMS} ${1} 2>&1 | grep -v "No config file found, using default configuration" | sed 's/\([0-9]\+\)/\x1B[31m\1\x1B[0m/'
-    if [[ ${PIPESTATUS#0} -ne 0 ]] ; then r=1; fi
-    pep8 ${1} 2>&1 | sed 's/\([0-9]\+\)/\x1B[31m\1\x1B[0m/'
-    if [[ ${PIPESTATUS#0} -ne 0 ]] ; then r=1; fi
-else
-    pylint ${PYLINT_PARAMS} ${1} 2>&1 | grep -v "No config file found, using default configuration"
-    if [[ ${PIPESTATUS#0} -ne 0 ]] ; then r=1; fi
-    pep8 ${1} 2>&1 | r=1
-fi
-exit ${r}
diff --git a/old/dev_python/pyvirt b/old/dev_python/pyvirt
deleted file mode 100755
index 17bcc92..0000000
--- a/old/dev_python/pyvirt
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-create=0
-if [[ "${1}" == "-c" ]] ; then
-    create=1
-    shift
-fi
-
-if [[ ! -f ~/.virtualenvs/${1}/bin/activate ]] ; then
-    if [[ ${create} -eq 1 ]] ; then
-        mkdir ~/.virtualenvs &> /dev/null
-        pushd . &> /dev/null
-        cd ~/.virtualenvs
-        unset PYTHONDONTWRITEBYTECODE
-        virtualenv --system-site-packages ${1}
-        popd &> /dev/null
-    else
-        echo "env \"${1}\" not found"
-        exit
-    fi
-fi
-
-source ~/.virtualenvs/${1}/bin/activate
-shift
-${@}
diff --git a/old/dev_python_win/numpy-1.8.1-win32-superpack-python2.7-auto.au3 b/old/dev_python_win/numpy-1.8.1-win32-superpack-python2.7-auto.au3
deleted file mode 100644
index c09ba29..0000000
--- a/old/dev_python_win/numpy-1.8.1-win32-superpack-python2.7-auto.au3
+++ /dev/null
@@ -1,24 +0,0 @@
-ConsoleWrite("installing numpy-1.8.1-win32-superpack-python2.7.exe" & @CRLF)
-if ($CmdLine[0] == 1) Then
-   ConsoleWrite("running: " & $CmdLine[1] & "\numpy-1.8.1-win32-superpack-python2.7.exe /S" & @CRLF)
-   Run($CmdLine[1] & "\numpy-1.8.1-win32-superpack-python2.7.exe /S")
-Else
-   ConsoleWrite("running: numpy-1.8.1-win32-superpack-python2.7.exe /S" & @CRLF)
-   Run("numpy-1.8.1-win32-superpack-python2.7.exe /S")
-EndIf
-
-ConsoleWrite("WinWaitActive(""Setup"")" & @CRLF)
-WinWaitActive("Setup")
-ConsoleWrite("!n" & @CRLF)
-Send("!n")
-Sleep(250)
-ConsoleWrite("!n" & @CRLF)
-Send("!n")
-Sleep(250)
-ConsoleWrite("!n" & @CRLF)
-Send("!n")
-Sleep(250)
-ConsoleWrite("WinWaitActive(""Setup"", ""Finish"")" & @CRLF)
-WinWaitActive("Setup", "Finish")
-ConsoleWrite("Send(""{ENTER}"")" & @CRLF)
-Send("{ENTER}")
diff --git a/old/dev_python_win/pygtk-all-in-one-2.24.2.win32-py2.7-auto.au3 b/old/dev_python_win/pygtk-all-in-one-2.24.2.win32-py2.7-auto.au3
deleted file mode 100644
index 6902ccc..0000000
--- a/old/dev_python_win/pygtk-all-in-one-2.24.2.win32-py2.7-auto.au3
+++ /dev/null
@@ -1,29 +0,0 @@
-ConsoleWrite("installing pygtk-all-in-one-2.24.2.win32-py2.7.msi" & @CRLF)
-if ($CmdLine[0] == 1) Then
-   ConsoleWrite("running: " & $CmdLine[1] & "\msiexec.exe /i pygtk-all-in-one-2.24.2.win32-py2.7.msi" & @CRLF)
-   Run($CmdLine[1] & "\msiexec.exe /i pygtk-all-in-one-2.24.2.win32-py2.7.msi")
-Else
-   ConsoleWrite("running: msiexec.exe /i pygtk-all-in-one-2.24.2.win32-py2.7.msi" & @CRLF)
-   Run("msiexec.exe /i pygtk-all-in-one-2.24.2.win32-py2.7.msi")
-EndIf
-
-ConsoleWrite("WinWaitActive(""Python 2.7 PyGTK 2.24.2 Setup"")" & @CRLF)
-WinWaitActive("Python 2.7 PyGTK 2.24.2 Setup")
-sleep(30000)
-ConsoleWrite("!n" & @CRLF)
-Send("!n")
-Sleep(250)
-ConsoleWrite("!n" & @CRLF)
-Send("!n")
-Sleep(250)
-
-ConsoleWrite("WinWaitActive(""Python 2.7 PyGTK 2.24.2 Setup"", ""Install"")" & @CRLF)
-WinWaitActive("Python 2.7 PyGTK 2.24.2 Setup", "Install")
-ConsoleWrite("!i" & @CRLF)
-Send("!i")
-Sleep(250)
-
-ConsoleWrite("WinWaitActive(""Python 2.7 PyGTK 2.24.2 Setup"", ""Finish"")" & @CRLF)
-WinWaitActive("Python 2.7 PyGTK 2.24.2 Setup", "Finish")
-ConsoleWrite("Send(""!f"")" & @CRLF)
-Send("!f")
diff --git a/old/dev_python_win/pyinstaller-win b/old/dev_python_win/pyinstaller-win
deleted file mode 100755
index 705f86b..0000000
--- a/old/dev_python_win/pyinstaller-win
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-pyinstaller_dir=$(dirname "$(readlink ~/bin/pyinstaller)")
-PYTHONPATH=${PYTHONPATH}:"${pyinstaller_dir}"
-wine "C:\\Python27\\python.exe" "${pyinstaller_dir}/pyinstaller.py" -F "${@}"
diff --git a/old/dev_python_win/python-win b/old/dev_python_win/python-win
deleted file mode 100755
index 1e30143..0000000
--- a/old/dev_python_win/python-win
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-wine "C:\\Python27\\python.exe" "${@}"
diff --git a/old/dev_python_win/pywin32-219.win32-py2.7-auto.au3 b/old/dev_python_win/pywin32-219.win32-py2.7-auto.au3
deleted file mode 100644
index 4cd0674..0000000
--- a/old/dev_python_win/pywin32-219.win32-py2.7-auto.au3
+++ /dev/null
@@ -1,24 +0,0 @@
-ConsoleWrite("installing pywin32-219.win32-py2.7.exe" & @CRLF)
-if ($CmdLine[0] == 1) Then
-   ConsoleWrite("running: " & $CmdLine[1] & "\pywin32-219.win32-py2.7.exe" & @CRLF)
-   Run($CmdLine[1] & "\pywin32-219.win32-py2.7.exe")
-Else
-   ConsoleWrite("running: pywin32-219.win32-py2.7.exe" & @CRLF)
-   Run("pywin32-219.win32-py2.7.exe")
-EndIf
-
-ConsoleWrite("WinWaitActive(""Setup"")" & @CRLF)
-WinWaitActive("Setup")
-ConsoleWrite("!n" & @CRLF)
-Send("!n")
-Sleep(250)
-ConsoleWrite("!n" & @CRLF)
-Send("!n")
-Sleep(250)
-ConsoleWrite("!n" & @CRLF)
-Send("!n")
-Sleep(250)
-ConsoleWrite("WinWaitActive(""Setup"", ""Finish"")" & @CRLF)
-WinWaitActive("Setup", "Finish")
-ConsoleWrite("Send(""{ENTER}"")" & @CRLF)
-Send("{ENTER}")
diff --git a/old/dev_python_win/scipy-0.14.0-win32-superpack-python2.7-auto.au3 b/old/dev_python_win/scipy-0.14.0-win32-superpack-python2.7-auto.au3
deleted file mode 100644
index 1f4268d..0000000
--- a/old/dev_python_win/scipy-0.14.0-win32-superpack-python2.7-auto.au3
+++ /dev/null
@@ -1,24 +0,0 @@
-ConsoleWrite("installing scipy-0.14.0-win32-superpack-python2.7.exe" & @CRLF)
-if ($CmdLine[0] == 1) Then
-   ConsoleWrite("running: " & $CmdLine[1] & "\scipy-0.14.0-win32-superpack-python2.7.exe /S" & @CRLF)
-   Run($CmdLine[1] & "\scipy-0.14.0-win32-superpack-python2.7.exe /S")
-Else
-   ConsoleWrite("running: scipy-0.14.0-win32-superpack-python2.7.exe /S" & @CRLF)
-   Run("scipy-0.14.0-win32-superpack-python2.7.exe /S")
-EndIf
-
-ConsoleWrite("WinWaitActive(""Setup"")" & @CRLF)
-WinWaitActive("Setup")
-ConsoleWrite("!n" & @CRLF)
-Send("!n")
-Sleep(250)
-ConsoleWrite("!n" & @CRLF)
-Send("!n")
-Sleep(250)
-ConsoleWrite("!n" & @CRLF)
-Send("!n")
-Sleep(250)
-ConsoleWrite("WinWaitActive(""Setup"", ""Finish"")" & @CRLF)
-WinWaitActive("Setup", "Finish")
-ConsoleWrite("Send(""{ENTER}"")" & @CRLF)
-Send("{ENTER}")
diff --git a/old/dev_win/autohotkey-win b/old/dev_win/autohotkey-win
deleted file mode 100755
index 2beae1b..0000000
--- a/old/dev_win/autohotkey-win
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-xvfb-run wine "C:\\Program Files\\AutoHotkey\\Compiler\\Ahk2Exe.exe" /in "${1}" 2> /dev/null
diff --git a/old/dev_win/autoit-win b/old/dev_win/autoit-win
deleted file mode 100755
index aaddb81..0000000
--- a/old/dev_win/autoit-win
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-xvfb-run wine "C:\\Program Files\\AutoIt3\\Aut2Exe\Aut2exe.exe" /in "${1}" /out "${1/%.au3/.exe}" /nopack 2> /dev/null
diff --git a/old/dev_win/xvfb-grab b/old/dev_win/xvfb-grab
deleted file mode 100755
index 2b918e4..0000000
--- a/old/dev_win/xvfb-grab
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-DISP=":99"
-if [[ -n $1 ]]; then
-    DISP=$1
-fi
-
-export XAUTHORITY=$(ls -d /tmp/xvfb-run* | head)/Xauthority
-
-mkdir ~/tmp &> /dev/null
-rm -f ~/tmp/image.xwd ~/tmp/image.png
-xwd -display $DISP -root -out ~/tmp/image.xwd
-convert ~/tmp/image.xwd ~/tmp/image.png
-cd ~/tmp
-python -m SimpleHTTPServer
diff --git a/old/setup_base b/old/setup_base
deleted file mode 100755
index d418d34..0000000
--- a/old/setup_base
+++ /dev/null
@@ -1,267 +0,0 @@
-#!/bin/bash -e
-
-# set up a base environment on centos or ubuntu
-
-
-if [[ -n "$SCRIPTS_SETUP_BASE" ]] ; then
-    return
-fi
-export SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-
-
-# global variables
-export DOWNLOADDIR="${HOME}/download"
-if [[ -z ${LOGFILE} ]] ; then
-    export LOGFILE=$(mktemp /tmp/setup.XXX.log)
-fi
-export RETURNVALUE=0
-export RETURNITEMS=""
-
-
-get_os() {
-    local info="$(cat /etc/redhat-release 2> /dev/null ; cat /etc/lsb-release 2> /dev/null ; uname -a)"
-
-    if echo "${info}" | grep -i -e centos -e "red hat" &> /dev/null ; then
-        echo 'centos'
-    elif echo "${info}" | grep -i -e ubuntu &> /dev/null ; then
-        echo 'ubuntu'
-    elif echo "${info}" | grep -i -e debian &> /dev/null ; then
-        echo 'debian'
-    fi
-}
-
-package_update() {
-    local os=$(get_os)
-
-    echo " update"
-    if [[ ${os} == 'centos' ]] ; then
-        sudo yum update &> /dev/null
-    elif [[ ${os} == 'ubuntu' || ${os} == 'debian' ]] ; then
-        sudo apt-get update &> /dev/null
-    fi
-}
-
-package_install() {
-    local os=$(get_os)
-
-    for package in $@ ; do
-        echo " ${package}" | tee -a "${LOGFILE}"
-        if [[ ${os} == 'centos' ]] ; then
-            sudo yum -y install ${package} &> /dev/null
-        elif [[ ${os} == 'ubuntu' || ${os} == 'debian' ]] ; then
-#            if [[ "${package}" == "ttf-mscorefonts-installer" ]] ; then
-#                sudo debconf-set-selections <<< "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true"
-#            fi
-            sudo apt-get -y install ${package} "${package}" >> "${LOGFILE}" 2>&1
-            dpkg --get-selections | grep "^${package}\s" >> "${LOGFILE}" 2>&1
-            set_rvalue "${package}"
-        fi
-    done
-}
-
-file_install() {
-    local file=${1}
-    local dest=${2-~/}
-    local tmpdir=
-
-    echo " ${file}"
-    # if file/directory doesn't exist, clone source
-    if [[ ! -e "${file}" ]] ; then
-        echo "  downloading..."
-        tmpdir=$(mktemp -d --tmpdir sds.XXXXXXXXXX)
-        pushd "${tmpdir}" &> /dev/null
-        git clone -n git@github.com:kbatten/scripts.git --depth 1 &> /dev/null
-        cd scripts &> /dev/null
-        git checkout HEAD "${file}" &> /dev/null
-    else
-        pushd . &> /dev/null
-    fi
-
-    mkdir -p "${dest}" &> /dev/null
-    cp -r -f "${file}" "${dest}" &> /dev/null || sudo cp -f -r "${file}" "${dest}" &> /dev/null
-    result=${?}
-
-    popd &> /dev/null
-    if [[ -n "${tmpdir}" ]] ; then
-        rm -rf "${tmpdir}"
-    fi
-}
-
-set_variable() {
-    local varname=${1}
-    local varval=${2}
-    grep "^export ${varname}=" ~/.bashrc &> /dev/null || echo "export ${varname}=" >> ~/.bashrc
-    sed --in-place="" -e "s/^\(export ${varname}\)=.*$/\1=${varval}/" ~/.bashrc
-}
-
-rootname() {
-    local filename="$(basename "${1}")"
-    local extension="$(extname "${filename}")"
-    echo "${filename%.${extension}}"
-}
-
-extname() {
-    local filename="$(basename "${1}")"
-    if [[ "$(echo "${filename}" | grep "\..*\." | sed 's/^.*\.\([^.]*\)\.[^.]*$/\1/')" == "tar" ]] ; then
-        echo -n "tar."
-    fi
-    echo "${filename##*.}"
-}
-
-extract() {
-    local filename=${1}
-    local directory=${2}
-    local extension=$(extname "${filename}")
-
-    case "${extension}" in
-        "tar.gz" | "tgz" | "tar.bz2")
-            echo "  extracting..."
-            tar xf "${filename}" &> /dev/null
-            local directory_orig=$(basename $(tar tf "${filename}" | head -n1))
-            if [[ "${directory_orig}" != "${directory}" ]]; then
-                mv "${directory_orig}" "${directory}" &> /dev/null
-            fi
-            ;;
-        "zip")
-            echo "  extracting..."
-            local tmpdir=$(mktemp -d --tmpdir sds.XXXXXXXXXX)
-            unzip -d "${tmpdir}" "${filename}" &> /dev/null
-            # if one directory in ${tmpdir}, move that to ${DOWNLOADDIR}/${directory}
-            # otherwise move ${tmpdir} ${DOWNLOADDIR}/${directory}
-            files=$(ls -A "${tmpdir}")
-            files_count=$(echo "${files}" | wc -l)
-            if [[ ${files_count} -eq 1 && -d "${tmpdir}/${files}" ]] ; then
-                mv "${tmpdir}/${files}" "${directory}" &> /dev/null
-                rm -rf "${tmpdir}" &> /dev/null
-            else
-                mv "${tmpdir}" "${directory}" &> /dev/null
-            fi
-            ;;
-    esac
-}
-
-fetch_and_install() {
-    local url=${1}
-    local filename=${2}
-    local directory=${3}
-    local installer=${4}
-    local finaldir=${5}
-
-    if [[ -z "${filename}" ]] ; then
-        filename=$(basename "${url}")
-    fi
-    if [[ -z "${directory}" ]] ; then
-        directory=$(rootname "${filename}")
-    fi
-    if [[ -z "${finaldir}" ]] ; then
-        finaldir="${HOME}/opt/${directory}"
-    fi
-
-    echo " ${filename}"
-
-    # download and extract if needed
-    mkdir -p "${DOWNLOADDIR}" &> /dev/null
-    pushd "${DOWNLOADDIR}" &> /dev/null
-    if [[ ! -e "${directory}" ]] ; then
-        if [[ ! -e "${filename}" ]] ; then
-            echo "  downloading..."
-            wget "${url}" -O "${filename}" &> /dev/null
-        fi
-        extract "${filename}" "${directory}"
-    fi
-    if [[ "$(extname "${filename}")" == "msi" ]] ; then
-        local auto=$(find "${SCRIPTPATH}" -name "$(rootname "${filename}")-auto.au3" | head -n1)
-        echo "  installing..."
-        if [[ -n "${auto}" ]] ; then
-            echo "xvfb-run wine \"C:/Program Files/AutoIt3/AutoIt3.exe\" \"${auto}\"" >> "${LOGFILE}" 2>&1
-            xvfb-run wine "C:/Program Files/AutoIt3/AutoIt3.exe" "${auto}" >> "${LOGFILE}" 2>&1
-            sleep 1
-        else
-            echo "xvfb-run wine msiexec.exe /q /i \"${filename}\"" >> "${LOGFILE}" 2>&1
-            xvfb-run wine msiexec.exe /q /i "${filename}" >> "${LOGFILE}" 2>&1
-            sleep 1
-        fi
-    elif [[ "$(extname "${filename}")" == "exe" ]] ; then
-        local auto=$(find "${SCRIPTPATH}" -name "$(rootname "${filename}")-auto.au3" | head -n1)
-        echo "  installing..."
-        if [[ -n "${auto}" ]] ; then
-            echo "xvfb-run wine \"C:/Program Files/AutoIt3/AutoIt3.exe\" \"${auto}\"" >> "${LOGFILE}" 2>&1
-            xvfb-run wine "C:/Program Files/AutoIt3/AutoIt3.exe" "${auto}" >> "${LOGFILE}" 2>&1
-            sleep 1
-        else
-            echo "xvfb-run wine \"${filename}\" ${installer}" >> "${LOGFILE}" 2>&1
-            xvfb-run wine "${filename}" ${installer} >> "${LOGFILE}" 2>&1
-            sleep 1
-        fi
-    else
-        if [[ ! -e "${finaldir}" ]] ; then
-            mkdir -p "${finaldir}" &> /dev/null
-            cp -r "${directory}"/* "${finaldir}" &> /dev/null
-        fi
-        cd "${finaldir}" &> /dev/null
-        if [[ -n "${installer}" ]] ; then
-            echo "  installing..."
-            eval "${installer}" >> "${LOGFILE}" 2>&1
-        fi
-    fi
-
-    popd &> /dev/null
-}
-
-function Xnpm_install {
-    for package in $@ ; do
-        echo " ${package}" | tee -a "${LOGFILE}"
-        npm install "${package}" >> "${LOGFILE}" 2>&1
-        ln -sf $(find "${HOME}/opt/" -type f -name "uglify*" 2> /dev/null) "${HOME}/bin/" >> "${LOGFILE}" 2>&1
-        uglifyjs --version >> "${LOGFILE}" 2>&1
-        set_rvalue
-    done
-}
-
-# sets global return value based on !?
-set_rvalue() {
-    local rvalue=$?
-    local itemname=${1}
-
-    if [[ $rvalue -ne 0 ]] ; then
-        RETURNVALUE=1
-        if [[ -n ${itemname} ]] ; then
-            RETURNITEMS=$(echo -e "${RETURNITEMS}\n${itemname}")
-        fi
-    fi
-    return ${rvalue}
-}
-
-cleanup() {
-    if [[ ${RETURNVALUE} -eq 0 ]] ; then
-        rm -f "${LOGFILE}" &> /dev/null
-    else
-        echo
-        echo "log: ${LOGFILE}"
-        echo "${RETURNITEMS}"
-    fi
-}
-
-
-cd "${SCRIPTPATH}"
-
-RUNALL=true
-if $RUNALL ; then
-echo "*packages"
-package_install git
-package_install wget
-
-echo "*config files"
-file_install "dotfiles/.bash_aliases"
-file_install "dotfiles/.bash_completion.d"
-file_install "dotfiles/.gitconfig"
-file_install "dotfiles/.gitignore"
-file_install "dotfiles/.vimrc"
-
-echo "*bin"
-file_install "dev/profile_dirs" ~/bin
-fi
-
-
-cleanup
-export SCRIPTS_SETUP_BASE=1
diff --git a/old/setup_dev_deluge b/old/setup_dev_deluge
deleted file mode 100755
index 48f7754..0000000
--- a/old/setup_dev_deluge
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash -e
-
-# set up a deluge dev environment
-
-
-if [[ -n "$SCRIPTS_SETUP_DEV_DELUGE" ]] ; then
-    return
-fi
-SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-
-
-# dependencies
-source "${SCRIPTPATH}/setup_dev_python"
-
-
-RUNALL=true
-if $RUNALL ; then
-echo "*packages"
-package_install subversion
-package_install python-gtk2
-package_install python-glade2
-package_install python-libtorrent
-
-echo "*pip"
-pip_install wheel
-pip_install twisted
-pip_install cryptography
-pip_install pyopenssl
-pip_install service_identity
-pip_install chardet
-pip_install mako
-pip_install pyxdg
-pip_install slimit
-fi
-
-
-cleanup
-export SCRIPTS_SETUP_DEV_DELUGE=1
diff --git a/old/setup_dev_deluge_win b/old/setup_dev_deluge_win
deleted file mode 100755
index 3002f26..0000000
--- a/old/setup_dev_deluge_win
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash -e
-
-# set up a deluge windows dev environment
-
-
-if [[ -n "$SCRIPTS_SETUP_DEV_DELUGE_WIN" ]] ; then
-    return
-fi
-SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-
-
-# dependencies
-source "${SCRIPTPATH}/setup_dev_python_win"
-
-
-RUNALL=true
-if $RUNALL ; then
-echo "*packages"
-package_install subversion
-
-echo "*pip"
-pip_install_win wheel
-pip_install_win twisted
-pip_install_win cryptography
-pip_install_win pyopenssl
-pip_install_win service_identity
-pip_install_win chardet
-pip_install_win mako
-pip_install_win pyxdg
-pip_install_win slimit
-
-echo "*other"
-fetch_and_install "http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.24/pygtk-all-in-one-2.24.2.win32-py2.7.msi"
-
-fi
-
-
-cleanup
-export SCRIPTS_SETUP_DEV_DELUGE_WIN=1
diff --git a/old/setup_dev_js b/old/setup_dev_js
deleted file mode 100755
index 3f2fe60..0000000
--- a/old/setup_dev_js
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-
-# set up a javascript dev environment
-
-
-# global variables should all match setup_base
-SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-#DOWNLOADDIR="${HOME}/download"
-
-
-# includes
-source "${SCRIPTPATH}/setup_base"
-
-
-if [[ "${BASH_SOURCE}" == "${0}" ]] ; then
-    echo "setting up..."
-
-
-    echo "*fetch and install"
-    fetch_and_install "http://nodejs.org/dist/v0.8.21/node-v0.8.21-linux-x86.tar.gz" "" "" "ln -sf \$(pwd)/bin/node ${HOME}/bin/ ; ln -sf \$(pwd)/bin/npm ${HOME}/bin/"
-
-    fetch_and_install "https://github.com/douglascrockford/JSLint/archive/master.zip" "JSLint-dev.zip" "JSLint-dev"
-    fetch_and_install "https://github.com/FND/jslint-reporter/archive/master.zip" "jslint-reporter-dev.zip" "jslint-reporter-dev" "\cp ../JSLint-dev/* ."
-    echo '#!/bin/bash
-if [[ ${TERM} == "xterm-color" ]] ; then
-    node ~/opt/jslint-reporter-dev/wrapper.js ${@} | sed '\''s/\([0-9]\+\)/\x1B[31m\1\x1B[0m/'\''
-    exit ${PIPESTATUS#0}
-else
-    node ~/opt/jslint-reporter-dev/wrapper.js ${@}
-fi' > ~/bin/jslint
-    chmod 755 ~/bin/jslint
-    echo '#!/bin/bash
-# run jslint on all html and js files in the git project
-# stop on failure
-cd $(git rev-parse --show-toplevel)
-for file in $(find . -name "*.js" -o -name "*.html") ; do
-    pushd $(dirname ${file})
-    echo "************************ $file ************************"
-    jslint $(basename ${file}) || exit 1
-    popd
-done' > ~/bin/jslint-project
-    chmod 755 ~/bin/jslint-project
-
-
-    echo "*npm packages"
-    npm_install uglify-js@2
-
-
-    cleanup
-fi
diff --git a/old/setup_dev_python b/old/setup_dev_python
deleted file mode 100755
index 61090b5..0000000
--- a/old/setup_dev_python
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/bash -e
-
-# set up a python dev environment
-
-
-if [[ -n "$SCRIPTS_SETUP_DEV_PYTHON" ]] ; then
-    return
-fi
-SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-
-
-# dependencies
-source "${SCRIPTPATH}/setup_base"
-
-
-pip_install() {
-    for package in $@ ; do
-        echo " ${package}" | tee -a "${LOGFILE}"
-        sudo pip install "${package}" >> "${LOGFILE}" 2>&1
-
-        local package_test=${package}
-        if [[ "${package}" == "pyopenssl" ]] ; then
-            package_test="OpenSSL"
-        elif [[ "${package}" == "pyxdg" ]] ; then
-            package_test="xdg"
-        fi
-
-        python -c "$(echo -e "try:\n  import ${package_test}\nexcept ImportError as e:\n  raise e\nexcept Exception:\n  pass\n")" >> "${LOGFILE}" 2>&1
-        set_rvalue "${package}"
-    done
-}
-
-
-RUNALL=true
-if $RUNALL; then
-echo "*packages"
-package_install python-pip
-package_install python-dev
-package_install python-pygame
-package_install python-opencv
-package_install python-scipy
-package_install python-numpy
-package_install python-imaging
-
-echo "*pip packages"
-pip_install virtualenv
-pip_install requests
-pip_install flask
-pip_install twisted
-pip_install sh
-pip_install pep8
-pip_install pylint
-
-echo "*other"
-fetch_and_install "https://pypi.python.org/packages/source/P/PyInstaller/PyInstaller-2.1.tar.gz" "" "" "ln -sfT \$(pwd)/pyinstaller.py ${HOME}/bin/pyinstaller &> /dev/null ; chmod 755 \$(pwd)/pyinstaller.py"
-
-echo "*bashrc"
-set_variable "PYTHONDONTWRITEBYTECODE" "true"
-
-echo "*bin"
-file_install "dev_python/pylint-pep8" ~/bin
-file_install "dev_python/pyvirt" ~/bin
-fi
-
-
-cleanup
-export SCRIPTS_SETUP_DEV_PYTHON=1
diff --git a/old/setup_dev_python_win b/old/setup_dev_python_win
deleted file mode 100755
index 0a6a94a..0000000
--- a/old/setup_dev_python_win
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/bash -e
-
-# set up a python windows dev environment
-
-
-if [[ -n "$SCRIPTS_SETUP_DEV_WIN" ]] ; then
-    return
-fi
-SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-
-
-# dependencies
-source "${SCRIPTPATH}/setup_dev_python"
-source "${SCRIPTPATH}/setup_dev_win"
-
-
-pip_install_win() {
-    local package=
-    for package in $@ ; do
-        echo " ${package}" | tee -a "${LOGFILE}"
-        xvfb-run wine "C:\\Python27\\python.exe" -m pip install "${package}" >> "${LOGFILE}" 2>&1
-
-        local package_test=${package}
-        if [[ "${package}" == "pillow" ]] ; then
-            package_test="PIL"
-        elif [[ "${package}" == "PyOpenGL" || "${package}" == "PyOpenGL_accelerate" ]] ; then
-           package_test="OpenGL"
-        elif [[ "${package}" == "pyopenssl" ]] ; then
-            package_test="OpenSSL"
-        elif [[ "${package}" == "pyxdg" ]] ; then
-            package_test="xdg"
-        elif [[ "${package}" == "twisted" ]] ; then
-            # fix a problem where pyinstaller doesn't pick up zope.interface
-            touch ${HOME}/.wine/drive_c/Python27/Lib/site-packages/zope/__init__.py
-        fi
-
-        wine "C:\\Python27\\python.exe" -c "$(echo -e "try:\n  import ${package_test}\nexcept ImportError as e:\n  raise e\nexcept Exception:\n  pass\n")" >> "${LOGFILE}" 2>&1
-        set_rvalue "${package}"
-    done
-}
-
-
-RUNALL=true
-if $RUNALL; then
-echo "*other"
-fetch_and_install "https://www.python.org/ftp/python/2.7.10/python-2.7.10.msi"
-fetch_and_install "http://downloads.sourceforge.net/project/pywin32/pywin32/Build%20219/pywin32-219.win32-py2.7.exe"
-fetch_and_install "http://downloads.sourceforge.net/project/numpy/NumPy/1.8.1/numpy-1.8.1-win32-superpack-python2.7.exe"
-fetch_and_install "http://downloads.sourceforge.net/project/scipy/scipy/0.14.0/scipy-0.14.0-win32-superpack-python2.7.exe"
-fetch_and_install "http://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi"
-
-echo "*bin"
-file_install "dev_python_win/python-win" ~/bin
-file_install "dev_python_win/pyinstaller-win" ~/bin
-
-echo "*pip"
-pip_install_win pillow
-pip_install_win ntfsutils
-pip_install_win speech
-pip_install_win PyOpenGL PyOpenGL_accelerate
-pip_install_win markdown
-pip_install_win twisted
-
-echo "*other"
-echo " freeglut"
-fetch_and_install "http://files.transmissionzero.co.uk/software/development/GLUT/freeglut-MSVC.zip"
-\cp ${HOME}/opt/freeglut-MSVC/bin/freeglut.dll ~/.wine/drive_c/Python27/Lib/site-packages/OpenGL/DLLS/ &> /dev/null
-fetch_and_install "http://pygame.org/ftp/pygame-1.9.1.win32-py2.7.msi"
-fi
-
-
-cleanup
-export SCRIPTS_SETUP_DEV_WIN=1
diff --git a/old/setup_dev_win b/old/setup_dev_win
deleted file mode 100755
index e29e905..0000000
--- a/old/setup_dev_win
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/bash -e
-
-# set up a windows dev environment
-
-
-if [[ -n "$SCRIPTS_SETUP_DEV_WIN" ]] ; then
-    return
-fi
-SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-
-
-# dependencies
-source "${SCRIPTPATH}/setup_base"
-
-
-winetricks_install() {
-    local trick=${@}
-
-    echo " ${trick}"
-    echo "xvfb-run winetricks -q ${trick}" >> ${LOGFILE}
-    # workaround -q not suppressing a mono related message
-    xvfb-run winetricks -q ${trick} >> ${LOGFILE} 2>&1 &
-    pid=$!
-    sleep 1
-    local i=0
-    while ps -p $pid &> /dev/null ; do
-        sleep 1
-        i=$((i+1))
-        if [[ $i -gt 40 ]] ; then
-            pkill -9 -f install_mono || true
-        else
-            pkill -f install_mono || true
-        fi
-    done
-    wait
-}
-
-
-RUNALL=true
-if $RUNALL; then
-echo "*packages"
-package_install xvfb
-#package_install ttf-mscorefonts-installer
-package_install wine
-package_install winetricks
-package_install imagemagick
-
-echo "*bin"
-file_install "dev_win/xvfb-grab" ~/bin
-file_install "dev_win/autoit-win" ~/bin
-file_install "dev_win/autohotkey-win" ~/bin
-
-echo "*winetricks"
-winetricks_install vcrun2008
-
-echo "*other"
-fetch_and_install "https://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe" "" "" "/S"
-fetch_and_install "http://ahkscript.org/download/ahk-install.exe" "" "" "/S"
-fi
-
-
-cleanup
-export SCRIPTS_SETUP_DEV_WIN=1
diff --git a/script_lib/install.inc b/script_lib/install.inc
index 7a72863..18d18d7 100644
--- a/script_lib/install.inc
+++ b/script_lib/install.inc
@@ -1,8 +1,12 @@
+TANQ_DOWNLOAD_DIR="${TANQ_DOWNLOAD_DIR:=$HOME/.tanq_downloads/}"
+
+source ./script_lib/std.inc
+
 function download() {
     local url=${1}
     local filename=${2}
     local directory=${3}
-    local downloaddir="./downloads/"
+    local downloaddir="${TANQ_DOWNLOAD_DIR}"
 
     if [[ -z "${filename}" ]] ; then
         filename=$(basename "${url}")
@@ -30,17 +34,28 @@ function download() {
 function install_msi() {
     local filename=${1}
     local directory=${2}
-    local downloaddir="./downloads/"
+    local downloaddir="${TANQ_DOWNLOAD_DIR}"
 
     local filepath="${downloaddir}${directory}/${filename}"
 
     xvfb-run wine msiexec.exe /q /i ${filepath}
 }
 
+function install_exe() {
+    local filename=${1}
+    local params="${2}"
+    local directory=${3}
+    local downloaddir="${TANQ_DOWNLOAD_DIR}"
+
+    local filepath="${downloaddir}${directory}/${filename}"
+
+    xvfb-run wine ${filepath} ${params}
+}
+
 function install_go() {
     local filename=${1}
     local directory=${2}
-    local downloaddir="./downloads/"
+    local downloaddir="${TANQ_DOWNLOAD_DIR}"
 
     local dirname="$(rootname ${filename})"
     local dirpath="${downloaddir}${directory}/${dirname}"
@@ -51,9 +66,9 @@ function install_go() {
     fi
 }
 
-function install_virtualbox() {
+function install_deb() {
     local filename=${1}
-    local downloaddir="./downloads/"
+    local downloaddir="${TANQ_DOWNLOAD_DIR}"
 
     local filepath="${downloaddir}${filename}"
 
@@ -64,10 +79,24 @@ function install_virtualbox() {
     fi
 }
 
+function install_ytdlp() {
+    local filename=${1}
+    local directory=${2}
+    local downloaddir="${TANQ_DOWNLOAD_DIR}"
+
+    local dirname="$(rootname ${filename})"
+    local dirpath="${downloaddir}${directory}/${dirname}"
+    local destpath=${HOME}/opt/
+
+    if [[ ! -e "${destpath}/${dirname}" ]]; then
+        cp -r $dirpath ${destpath}
+    fi
+}
+
 function run() {
     local filename=${1}
     local directory=${2}
-    local downloaddir="./downloads/"
+    local downloaddir="${TANQ_DOWNLOAD_DIR}"
 
     local filepath="${downloaddir}${directory}/${filename}"
 
@@ -75,4 +104,44 @@ function run() {
     wine ${filepath}
 }
 
-sudo apt-get install -y curl
+function run() {
+    local filename=${1}
+    local directory=${2}
+    local downloaddir="${TANQ_DOWNLOAD_DIR}"
+
+    local filepath="${downloaddir}${directory}/${filename}"
+
+    #xvfb-run wine ${filepath}
+    wine ${filepath}
+}
+
+function run_bash() {
+    local filename=${1}
+    local directory=${2}
+    local downloaddir="${TANQ_DOWNLOAD_DIR}"
+
+    local filepath="${downloaddir}${directory}/${filename}"
+
+    bash ${filepath}
+}
+
+function run_sudo_bash() {
+    local filename=${1}
+    local directory=${2}
+    local downloaddir="${TANQ_DOWNLOAD_DIR}"
+
+    local filepath="${downloaddir}${directory}/${filename}"
+
+    sudo bash ${filepath}
+}
+
+function apply_patch() {
+    local patchname="$1"
+    local patchdest="$2"
+    local patch="$(scriptpath)/${patchname}"
+    pushd "${patchdest}"
+    git apply "${patch}"
+    popd
+}
+
+sudo apt-get install -y curl || true
diff --git a/script_lib/link.inc b/script_lib/link.inc
index f352e3b..0b6e9d3 100644
--- a/script_lib/link.inc
+++ b/script_lib/link.inc
@@ -14,7 +14,7 @@ function link_dotfiles() {
 function link_bash_completion() {
   local filename="$1"
   [ ! -d "$HOME/.bash_completion.d" ] && mkdir "$HOME/.bash_completion.d"
-  ln -s -f "$PWD/dotfiles/.bash_completion.d/${filename}" "$HOME/.bash_completion.d/"
+  [ ! -f "$HOME/.bash_completion.d/${filename}" ]  && ln -s -f "$PWD/dotfiles/.bash_completion.d/${filename}" "$HOME/.bash_completion.d/"
   bashrc_source_script "link_bash_completion_${filename}" "$HOME/.bash_completion.d/${filename}"
 }
 
diff --git a/script_lib/network.inc b/script_lib/network.inc
new file mode 100644
index 0000000..0359c85
--- /dev/null
+++ b/script_lib/network.inc
@@ -0,0 +1,23 @@
+# get the default network interface
+function network_get_default_interface() {
+    ip route | awk '$1 == "default" {print $5}'
+}
+
+# get the default network address
+function network_get_default_address() {
+    ip route | awk '$1 == "default" {print $9}'
+}
+
+# modify /etc/sysctl.conf to source a script
+function sysctl_set() {
+  local key=$1
+  local value=$2
+  local file="/etc/sysctl.d/99-sysctl.conf"
+  if sudo grep "^$key\W*=.*" "$file" &> /dev/null ; then
+    sudo sed -i 's/^'"$key"'\W*=.*$/'"$key"'='"$value"'/g' "$file"
+  else
+    echo "$key=$value" | sudo tee -a "$file" > /dev/null
+  fi
+  sudo sysctl -p
+}
+
diff --git a/script_lib/std.inc b/script_lib/std.inc
index f0d84ca..a665644 100644
--- a/script_lib/std.inc
+++ b/script_lib/std.inc
@@ -12,6 +12,11 @@ function rootname() {
     echo "${filename%.${extension}}"
 }
 
+function scriptpath() {
+    local relativepath="$(dirname "$0")"
+    echo "$(cd "$relativepath" ; pwd)"
+}
+
 function extract() {
     local filename=${1}
     local directory=${2}
@@ -26,5 +31,9 @@ function extract() {
                 mv "${directory_orig}" "${directory}" &> /dev/null
             fi
             ;;
+        "zip")
+            echo "  extracting..."
+            unzip -d "${directory}" "${filename}"
+            ;;
     esac
 }
