Skip to content

Instantly share code, notes, and snippets.

View Vertikar's full-sized avatar

Karl von Muller Vertikar

View GitHub Profile
@Vertikar
Vertikar / autorsi.py
Created September 11, 2024 02:01 — forked from XioNoX/autorsi.py
Generate then download Juniper RSI and logs. Optionally uploads them to the matching JTAC case.
#!/usr/bin/env python3
# usage: autorsi.py [-h] [--username USERNAME] [--sshconf SSHCONF] [--case CASE]
# hostname
#
# Generate then download RSI and logs. Optionally upload them to the matching
# JTAC case.
#
# positional arguments:
# hostname Device to connect to
#
@Vertikar
Vertikar / 1. setup local APRS website.md
Last active April 13, 2022 07:04
Setup local APRS web site

Intro

I recently discovered I could pick up some APRS packets with a really basic setup of just running ionosphere and a NoElec , and thought it'd be more useful to be able to view this in a website, rather than just looking at a stream of data in a console.

Notes:

This document is still in progress, this is just the first draft I wanted to get saved.

I'm currently running two docker-compse stacks to do this, but ideally you'd run one containing all the services. If/when I get around to doing this, I'll share the combined compose file here

Track Direct

APRS track direct needs to run on port 9000 for websockets and port 80 for the web interface. Port 9000 clashes with Portainer, and port 80 will obviously clash with any local web servers already running.

[Unit]
Description=Redis In-Memory Data Store
After=network.target
[Service]
User=redis
Group=redis
ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf
RestartSec=5s
Restart=on-success
@Vertikar
Vertikar / python-virtual-environment-howto.md
Created October 21, 2018 13:12 — forked from simonw/python-virtual-environment-howto.md
How to set up a Python virtual environment

How to set up a Python development environment

A Python development environment is a folder which you keep your code in, plus a "virtual environment" which lets you install additional library dependencies for that project without those polluting the rest of your laptop.

mkdir my-new-python-project
cd my-new-python-project
virtualenv --python=python2.7 venv

This will create a my-new-python-project/venv folder

@Vertikar
Vertikar / 0migrator.md
Created July 4, 2018 14:32 — forked from OttoWinter/0migrator.md
Lovelace Migration Script

Home Assistant Lovelace Migrator

Do you want to try out this experimental (!) new lovelace UI stuff in Home Assistant but don't want to migrate your entire configuration? This script is here to help! It reads in your Home Assistant configuration (specifically the group: section) and creates a matching ui-lovelace.yaml file in your Home Assistant configuration folder (of course backing up any previous file at that path).

To use this script, you first need to have python and home assistant installed where you plan to run this script. Do so using virtual environments and the pip3 install -U homeassistant command. Then copy below file to lovelace_migrate.py (any location should work) and run:

python3 lovelace_migrate.py -c <PATH_TO_HASS_CONFIG_DIR>
@Vertikar
Vertikar / container_config.yml
Created June 11, 2018 01:56
Home Lab CoreOS Ignition
passwd:
users:
- name: core
password_hash: "$6$wXQZxh8d0BU4Eg$lVJQdLN08erJvBBgA0kS30yq5x8.gx1VKffmtjtD2GAgRdAzcpn1xO.3alXeOvSX92L72pGmx1EnSUTJvomLy1"
ssh_authorized_keys:
- "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAgEA1AJonpQaUOGKJKY/EOBOaMGYaHDdI6WPOLtVPgcmJhG/lb7lAT+YbUdn/7xAz0dbJhAh2XlJK++LQehhw4q7MnJ5ckgS5yoCx2VkJY//56T/Gv+q1cAxBcsq/5CF8rj8+cNR1Ztpf2Kq3gKZTdhvOytBjr7mh3Ui8bAMGBMf/KYWLbPCTybEam9BbyZeM5edf9N6q4vKSsx1SbpAOGEdnDjz2ttEJ8aaCWDvFbYOzjJwlgVXhRtbUvkjuct3/d72OpBRBhY0jlzwh4LSK1WGD6TbWOpZZP+RxvUTiKAGaMufmc6VKuN+jQQdxodyq9p/1DT8O9gspgolfVQpV0n7Lg+/FtGEh7Aq/eOB0VIRA7FCrvk38q4EZIatS7QaqdreIRtOUjCiu8EyOlnRuI5Ow7qIqWyAcZC9b5yi+q0LHuuDujmxBu9OdXPjZzj9EZl9OfPeHrhbNoRun6+CsRtBRh2rTjf2lPU5H0MLFZ3bZKNMxgnyxqoHQKCfim+4b1TTdv6Bengr4hN28IxIWW35vEBd0I1TQ6TKjOnvR3evjuHYefEtdAJqSo0QrKfPwzdL57VELre7JaCe4qZocTcCxOu/1hrkhlT1bX3QguB9/PL/m+kh7dEneajs6sVi3ewGXch9Sa3qEwKuiCisC6zumDQMcn+9VoYqXlr8igaziZ8= rsa-key-20180428"
storage:
files:
- filesystem: root
path: /etc/hostname
[Unit]
Description=Strayacoin's distributed currency daemon
After=network.target
[Service]
User=strayacoin
Group=strayacoin
Type=forking
PIDFile=/var/lib/strayacoind/strayacoind.pid

Instructions

The files are made for systems with systemd. The instructions are written with Ubuntu 16.04 in mind. Your file locations may vary.

Installation

  1. Become root
  2. Create the service files in lib/systemd/system
  3. Change <user> in the Sonarr service file to the approriate user.
@Vertikar
Vertikar / Dockerfile
Created April 19, 2017 01:40
simple Alpine based docker with basic network tools
FROM alpine:latest
RUN apk update
RUN apk upgrade
RUN apk add curl wget bash tcptraceroute mtr netcat-openbsd nmap lsof jwhois
@Vertikar
Vertikar / Dockerfile
Created April 19, 2017 01:39
Simple dockerfile for ubuntu and some basic network tools
FROM ubuntu:latest
RUN apt-get -y update && apt-get install -y traceroute mtr-tiny netcat nmap lsof grc iputils-tracepath whois dnsutils