Skip to content

Instantly share code, notes, and snippets.

View gottaloveit's full-sized avatar

Joe Passavanti gottaloveit

View GitHub Profile
@gottaloveit
gottaloveit / _etc_default_gpsd
Created December 27, 2025 11:20
my HAOS, RPI OS, RPI, GPSD, GPS, MQTT config files
# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
DEVICES="/dev/ttyACM0"
# Other options you want to pass to gpsd
GPSD_OPTIONS="-Gn"
# Automatically hot add/remove USB GPS devices via gpsdctl
USBAUTO="true"
@gottaloveit
gottaloveit / x735v25install.sh
Created January 21, 2023 17:33
x735 v 2.5 rpi heatsink fan software install script
#!/bin/bash
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install -y git
sudo apt-get install -y pigpio python3-pigpio
sudo apt-get install -y python3-smbus python3-rpi.gpio
git clone https://github.com/geekworm-com/x735-v2.5
cd x735-v2.5
sudo chmod +x *.sh
@gottaloveit
gottaloveit / README.md
Last active April 26, 2021 16:16
Trouble with iptables, nat, port forwarding? Hope this will help.

I was having trouble getting NAT working on a Debian server which was going to act as a gateway for my private physical network. I tried to many different versions of tips and none got all the pieces right.

Until I found this amazing generator script. The questions were easy to answer and very robust in terms of understanding what I wanted. The best part, it created this script which ran totally perfect. It created a perfect firewall, blocks everything except what I want open, provides NAT and port forwarding for incoming services.

The link to this amazing script, for which I am not the author, is http://easyfwgen.morizot.net/gen/

@gottaloveit
gottaloveit / termux_setup.sh
Last active August 29, 2021 12:22
Script to setup my termux in Android.
#!/bin/bash
## run in termux by issuing
## curl -s -L https://bit.ly/2S8s4D0 | bash
## updated 1818
BASE_PATH='/data/data/com.termux/files'
LOG_FILE='./setup_log.txt'
function cmmd()
#!/bin/sh
### BEGIN INIT INFO
# Provides: disable-transparent-hugepages
# Required-Start: $local_fs
# Required-Stop:
# X-Start-Before: mongod mongodb-mms-automation-agent
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Disable Linux transparent huge pages
# Description: Disable Linux transparent huge pages, to improve
# Ubuntu upstart file at /etc/init/mongodb.conf
pre-start script
mkdir -p /MongoData/data
mkdir -p /MongoData/log
ln -s /MongoData/data/ /var/lib/mongodb/
ln -s /MongoData/log/ /var/log/mongodb/
end script
start on runlevel [2345]
@gottaloveit
gottaloveit / cisco_switch2_backup.sh
Created January 14, 2016 13:01
Storing for in case of future need. This runs to pull configs from network cisco switches and compares and saves config file to a local network file share location using CIFS and a network file server to store the confgs. It work for the situation it is in, they may not work for every situation, I do not take liability for anything that might go…
#!/bin/bash
# written for a Cisco WS-C2960S-48TD-L
# example usage ./cisco_switch2.sh "DEVICE_NAME" DEVICE_IP TFTPD_SERVER_IP "COLO_FACILITY_SHORTNAME"
# Storing for in case of future need. This runs to pull configs from network cisco switches and compares and saves config file
# to a local network file share location using CIFS and a network file server to store the confgs. It work for the situation
# it is in, they may not work for every situation, I do not take liability for anything that might go wrong, nor do I support
# these scripts outside of my own usage.
host=$1
@gottaloveit
gottaloveit / cisco_switch_backup.sh
Created January 14, 2016 13:01
Storing for in case of future need. This runs to pull configs from network cisco switches and compares and saves config file to a local network file share location using CIFS and a network file server to store the confgs. It work for the situation it is in, they may not work for every situation, I do not take liability for anything that might go…
#!/bin/bash
# written for a Cisco WS-C2960S-48TD-L
# example usage ./cisco_switch.sh "DEVICE_NAME" DEVICE_IP TFTPD_SERVER_IP "COLO_FACILITY_SHORTNAME"
# Storing for in case of future need. This runs to pull configs from network cisco switches and compares and saves config file
# to a local network file share location using CIFS and a network file server to store the confgs. It work for the situation
# it is in, they may not work for every situation, I do not take liability for anything that might go wrong, nor do I support
# these scripts outside of my own usage.
host=$1
@gottaloveit
gottaloveit / dell_switch_backup.sh
Created January 14, 2016 12:58
Storing for in case of future need. This runs to pull configs from network dell switches and compares and saves config file to a local network file share location using CIFS and a network file server to store the confgs. It work for the situation it is in, they may not work for every situation, I do not take liability for anything that might go …
#!/bin/bash
# written for dell network N2048 switch
# example usage ./dell_switch_telnet.sh "DEVICE_NAME" DEVICE_IP TFTPD_SERVER_IP "COLO_FACILITY_NICKNAME"
# Storing for in case of future need. This runs to pull configs from network dell switches and compares and saves config file
# to a local network file share location using CIFS and a network file server to store the confgs. It work for the situation
# it is in, they may not work for every situation, I do not take liability for anything that might go wrong, nor do I support
# these scripts outside of my own usage.
host=$1
@gottaloveit
gottaloveit / cisco_asa_backup.sh
Last active January 14, 2016 12:56
Storing for in case of future need. This runs to pull configs from network Cisco ASA and compares and saves config file to a local network file share location using CIFS and a network file server to store the confgs. It work for the situation it is in, they may not work for every situation, I do not take liability for anything that might go wron…
#!/bin/bash
# written for Cisco ASA 5500
# example usage ./asa_ssh.sh "DEVICE_NAME" DEVICE_IP TFTPD_SERVER_IP "COLO_FACILITY_SHORTNAME" "ASA_OUTBOUND_INTERFACE"
# Storing for in case of future need. This runs to pull configs from network Cisco ASA and compares and saves config file
# to a local network file share location using CIFS and a network file server to store the confgs. It work for the situation
# it is in, they may not work for every situation, I do not take liability for anything that might go wrong, nor do I support
# these scripts outside of my own usage.
host=$1