Skip to content

Instantly share code, notes, and snippets.

View PackeTsar's full-sized avatar

John W Kerns PackeTsar

View GitHub Profile
@PackeTsar
PackeTsar / Add_Netbox_User.sh
Created February 18, 2023 17:35
Add Netbox User via Script
#!/usr/bin/env bash
# Set API key env variable like:
# export NETBOX_API_KEY="blahblahblah"
# Usage: ./Add_Netbox_User NETBOX_HOST USERNAME FIRST_NAME LAST_NAME EMAIL GROUP_ID PASSWORD
# Example: ./Add_Netbox_User netbox.example.com will.riker William Riker will.riker@example.com 1 TroiFan1
if [[ -z "$NETBOX_API_KEY" ]]; then
echo "Must provide NETBOX_API_KEY in environment" 1>&2
echo " Example: export NETBOX_API_KEY='blahblahblah'" 1>&2
@PackeTsar
PackeTsar / zabbix-server-6.0-setup.md
Last active March 11, 2024 07:08
Zabbix Server 6.0 Setup

Zabbix 6.0 Setup Steps

My standard steps for setting up a new Zabbix server

This example is tuned for an install on Ubuntu 20.04 Server, but can be adapted to any Linux box

All commands are being run while logged in as root

@PackeTsar
PackeTsar / zabbix-server-5.0-setup.md
Last active April 26, 2022 17:28
Zabbix Server 5.0 Setup

Zabbix 5.0 Setup Steps

My standard steps for setting up a new Zabbix server

This example is tuned for an install on a Raspberry Pi, but can be adapted to any Linux box

All commands are being run while logged in as root

@PackeTsar
PackeTsar / newuser.sh
Created October 12, 2021 16:30
Use a different user on each login
# /root/newuser.sh
#
# Create and use a new user every time you log in.
#
# Setup:
# ~$ nano newuser.sh
# *paste contents of this file and save*
# ~$ chmod +x newuser.sh
# ~$ echo "bash newuser.sh" >> ~/.profile
@PackeTsar
PackeTsar / byobu-ssh-cheatsheet.md
Last active March 28, 2024 01:36
Byobu (over SSH) Cheat Sheet

Byobu (over SSH) Cheat Sheet

I often find myself using Byobu on a Linux machine when connected to it over SSH. In doing so, I've noticed that many of the documented keyboard shortcuts don't work. This can be due to the native PC's OS intercepting certain keys, or possibly other reasons.

Below is a cheatsheet with Byobu features I have found usually work when run over a SSH connection.

Action Windows + Putty to Ubuntu MacOS + Terminal to Ubuntu
Help menu BASH: byobu-config FN-F1
Create new window CTRL-a c CTRL-a c or FN-F2