This file contains 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 debian:stable | |
RUN apt-get update && \ | |
DEBIAN_FRONTEND=noninteractive \ | |
apt-get install -y \ | |
sudo time git-core subversion build-essential gcc-multilib \ | |
libncurses5-dev zlib1g-dev gawk flex gettext wget unzip \ | |
grep rsync python3 python3-distutils file && \ | |
apt-get clean |
This file contains 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 | |
#Need to attach to a docker network for pip to function | |
NET=docker_bridge | |
if [[ -f "requirements.txt" ]]; then | |
docker run --network $NET -it --rm -v "$PWD":/usr/src/app -w /usr/src/app python:3 sh -c "python -m pip --disable-pip-version-check -qqq install -r requirements.txt ; python $*" | |
else | |
docker run --network $NET -it --rm -v "$PWD":/usr/src/app -w /usr/src/app python:3 python $@ | |
fi |
This file contains 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
[Unit] | |
Description=docker-hc | |
Wants=docker-hc.timer | |
[Service] | |
Type=oneshot | |
ExecStart=/usr/local/sbin/docker-hc.sh | |
User=root | |
Group=root |
This file contains 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 | |
WG=/usr/bin/wg | |
WGCONF=/etc/wireguard/wg0.conf # The line prior to AllowedIPs in each [Peer] should be # Name = Xyz | |
OUTPUT=$(script --flush --quiet /dev/null --command $WG) | |
if [[ $# -gt 0 ]]; then | |
$WG $@ | |
exit | |
fi | |
if [[ ! -z $OUTPUT ]]; then |
This file contains 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
The current nvidia-driver package in Debian 12 is designed for desktop systems and has dependencies to install Xorg | |
and other desktop packages. There is no package similar to the nvidia-headless package provided by Ubuntu. These were | |
the minimal packages (and their dependencies) I had to install to get a Quadro P400 running on a headless Debian 12 | |
box for transcoding use. | |
install dkms nvidia-kernel-dkms libnvcuvid1 libnvidia-encode1 nvidia-smi linux-headers-amd64 nvidia-driver-bin | |
rmmod nouveau | |
modprobe nvidia |
This file contains 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 | |
BASE=`date -I`-mariabackup | |
CONT=mariadb | |
DEST=/home/matt/_gdrive/mariabackup/ | |
MAGE=365 | |
OWNER=matt:matt | |
TGZ=$DEST$BASE.tgz | |
# check if the container is running | |
if [ "$( docker container inspect -f '{{.State.Running}}' $CONT )" == "true" ]; then |
This file contains 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
Set objShell = WScript.CreateObject("WScript.Shell") | |
Do While True | |
objShell.SendKeys("{SCROLLLOCK}") | |
WScript.Sleep(100) | |
objShell.SendKeys("{SCROLLLOCK}") | |
WScript.Sleep(24000) | |
Loop |
This file contains 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 | |
VERBOSE=false | |
ec() { | |
if $VERBOSE; then echo -en $1; fi | |
} | |
for IMAGE in $(docker images | grep -v '^REPOSITORY' | cut -f1 -d' ') | |
do | |
ec "Fetching Docker Hub token...\n" |
This file contains 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
' Visio objects attached to more than one layer will stay visible as long as any layer they are a member of is visible. | |
' This was undesireable behavior for the drawing I was creating and this is the solution I came up with. Suggestions and | |
' improvements are welcome as I rarely touch VBA code and prior to last week had only ever used Visio for about 5 minutes :) | |
' The ToggleLayer sub will toggle the visibility of a named layer in Visio. After updating the layer visibility it | |
' then calls the UpdateShapes sub to iterate through all objects and show/hide them by setting | |
' Geometry1.NoShow and Misc.HideText values based on the layer visibility. | |
Option Explicit |