Skip to content

Instantly share code, notes, and snippets.

View diginfo's full-sized avatar

Pure Manufacturing diginfo

View GitHub Profile
@diginfo
diginfo / vpas-docker.bat
Last active March 14, 2023 04:51
VPAS Docker Setup Script
:: ###################
:: ### VPAS DOCKER ###
:: ###################
:: wget -A "*.bat" - r <raw url>
@echo off
:: Define Vars
:: ###########
set "DIR=C:\docker\vpas"
@diginfo
diginfo / pimox.sh
Last active December 4, 2022 23:22
#!/bin/bash
## bash <(curl -Ls https://gist.github.com/diginfo/c4e6efb9f4f4824132f25046a9c3747b/raw/)
##
function _init {
rpi-update
apt install -y dpkg-dev raspberrypi-kernel-headers linux-image-generic
reboot
}
@diginfo
diginfo / ufw-nslookup
Last active November 23, 2022 09:13
Do a NS Lookup on all Allow from Anywhere entries in UFW
#!/bin/bash
## bash <(curl -Ls https://gist.github.com/diginfo/faac52654ee28992138c431da8383ba4/raw/)
##
IPS="$(ufw status | grep Anywhere.*ALLOW | awk '{print $3}')";
while IFS= read -r line; do
NS="$(dig +short +nocomments -x $line | tail -1)";
echo -e "$line\t\t: $NS";
done <<< "$IPS";
#!/bin/bash
HOSTNAME="$1"
LOGDIR="$HOME/.ufw";
LOGFILE=$LOGDIR/$HOSTNAME
if [ ! -d "$LOGDIR" ];then
mkdir $LOGDIR
fi
function _alert {
#!/bin/bash
#
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi
if [[ $# -lt 2 ]];
echo "Usage:"
@diginfo
diginfo / install-docker
Last active March 2, 2021 00:17
Install Docker on Debian
#!/bin/bash
## bash <(curl -Ls https://gist.github.com/diginfo/f8ff1025d256613913ea20835f921c88/raw/)
##
apt install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
#!/bin/bash
## bash <(curl -Ls https://gist.github.com/diginfo/62fa8ccc4277d80d9bbb4aee89d9e900/raw/)
##
## Requires private key with repo-name.key:i.e. pure3-bin.key, pure3.key
_ROOT="/usr/share/dis";
echo "This will clone the repository into your current folder.";
echo "You require a deploy key file in order to proceed.";
echo "If you are a DIS ADMIN you can use pure-keygen to generate the keys";
#!/bin/bash
#
# bash <(curl -Ls https://gist.github.com/diginfo/73f6eff45a714c856582855c6be4aba0/raw/)
#
## /etc/fstab
## NFS MOUNTS
# 192.168.42.35:/mnt/DroboFS/Shares/Public /nfs/drobo/Public nfs auto,_netdev,noatime,nolock,bg,intr,tcp,actimeo=1800 0 0
# 192.168.42.35:/mnt/DroboFS/Shares/FTPusers /nfs/drobo/FTPusers nfs auto,_netdev,noatime,nolock,bg,intr,tcp,actimeo=1800 0 0
# 192.168.42.35:/mnt/DroboFS/Shares/Backups /nfs/drobo/Backups nfs auto,_netdev,noatime,nolock,bg,intr,tcp,actimeo=1800 0 0
module.exports = {}
const mex = module.exports;
const cl = console.log;
mex.cl = cl;
mex._rl = require('readline');
mex._os = require('os');
mex._path = require('path');
mex._fs = require('fs');
#!/bin/bash
## bash <(curl -Ls https://gist.github.com/diginfo/68261e9709eb05046d473f9fc646389f/raw/)
###
if [ "$#" -lt 2 ]; then
echo "keyadd repo path/to/rsa/file"
exit 1;
fi
REPO=$1;