Skip to content

Instantly share code, notes, and snippets.

View nwesterhausen's full-sized avatar

Nicholas Westerhausen nwesterhausen

  • Indiana, US
  • 06:43 (UTC -05:00)
View GitHub Profile
@nwesterhausen
nwesterhausen / .dockerignore
Created February 24, 2022 00:23
Dockerize nodejs, pnpm using distroless
# Ignore All
*
# Allow Some
!bin/www
!db/**
!public/**
!routes/**
!util/**
!views/**
@nwesterhausen
nwesterhausen / README.md
Created January 11, 2022 15:41
Perl-based "Simplistic" Dwarf Fortress Raw Parser

This was a quick and dirty solution to grabbing creature names and descriptions from my raw files so I could look up creature information while preparing carefully for my embark. It's redundant to do for just the vanilla raws since they are covered pretty well on the wiki, but I was playing with a few mods and those mods didn't include a beastiary so I was presented with some unfamiliar creature names and no idea what they were or how valuable they might be. This creates a json file that is an array of objects that describe the raws.

I took this idea and re-wrote it in rust and have continued work on it over at df-raw-lookup

@nwesterhausen
nwesterhausen / deploy_mkdocs_to_gh-pages.yml
Last active May 14, 2021 17:41
Github Actions script that takes a mkdocs repository, renders it, and pushes to gh-pages. A "manual" way of doing what I found an existing action to do. All the plugins and mkdocs are in the Install Packages step, edit to match your needs.
name: Deploy
on:
push:
branches:
- main
jobs:
build:
name: Deploy docs to GitHub Pages
runs-on: ubuntu-latest
steps:
@nwesterhausen
nwesterhausen / update_record.sh
Created September 30, 2020 23:31
Dynamic DNS using Digital Ocean DNS
#!/bin/bash
# Short script using the digital ocean API to update an A record with an IPV4 address
# from a specificed device.
#
# I simply have cron run this every 30m. Ideally I wanted to have it run when openvpn
# had to reconnect and either (a) change device or (b) change IP.
#
# Pre-requisites:
# 1. DNS set up through Digital Ocean for this domain
# 2. API Token created with write access
@nwesterhausen
nwesterhausen / stubby_alpine_3.8.md
Last active May 29, 2022 12:07
Stubby Installi instructions for Alpine 3.8

Stubby for Alpine 3.8

Install getdns

  1. Install Pre-requisites

    apk add gcc make openssl-dev unbound-dev musl-dev
    apk add libidn2-dev  --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
@nwesterhausen
nwesterhausen / apprise_notify.sh
Created October 9, 2019 15:57
Apprise Notifier Script for Radarr/Sonarr/Lidarr
#!/bin/bash
###
# This script utilizes apprise (https://github.com/caronc/apprise) to send notifications
# You need to have apprise available for the user sonarr operates under.
# I installed it via `sudo pip install --system apprise` although the python
# community really dislikes it when you do that. Recommended installation would be
# something along the lines of:
#
# sudo su sonarr -s /bin/bash
# pip install --user apprise
@nwesterhausen
nwesterhausen / node_exporter_setup.md
Last active October 12, 2024 06:02
node_exporter installation on ubuntu

Installing node_exporter

Steps to install node_exporter

  1. Add user for node_exporter

    sudo useradd --no-create-home --shell /bin/false node_exporter
@nwesterhausen
nwesterhausen / mca.py
Last active August 25, 2024 00:39
Python class to read minecraft region files.
"""Code to read .mca region files
I modified the javascript library mca-js to create this file.
mca-js: https://github.com/thejonwithnoh/mca-js
This is largely just a python interpretation of that script.
-----------
MIT License
Copyright (c) 2019 Nicholas Westerhausen