Skip to content

Instantly share code, notes, and snippets.

Random Product Hunt Redirect Page

A single-page web application that automatically redirects users to a random product from Product Hunt's homepage.

Live Demo: https://shouse.brave/ (Web3 only)

Overview

This lightweight HTML page fetches Product Hunt's homepage, extracts all the numbered product links, randomly selects one, and redirects the user to that product page. Perfect for discovering new products serendipitously!

@bmshouse
bmshouse / debian-gateway-route-between-networks.md
Created November 2, 2025 03:08
Configure a gateway host to route between two different subnets

Debian Network Gateway Setup Script

A bash script to configure a Debian server as a network gateway to route traffic between two separate networks.

Overview

This script automates the configuration of a Debian server with two network interfaces to act as a gateway/router between two networks:

  • Network A: 192.168.1.0/24 (eth0 → renamed to net0)
  • Network B: 192.168.2.0/24 (eth1 → renamed to net1)

Route Docker Container Traffic Through WireGuard VPN (with Local Network Access)

This guide shows how to route all Docker container internet traffic through a WireGuard VPN on the host, while preserving access to the local network. This is useful for containers that need VPN protection but must remain accessible from your LAN.

The Problem

Standard approaches have limitations:

  • Host network mode (network_mode: host): No network isolation, container shares host's network stack
  • VPN in container: Requires VPN client in every container, complex configuration
  • Simple iptables forwarding: Routes traffic through default gateway instead of VPN
@bmshouse
bmshouse / inspecting-pvc.md
Created August 26, 2019 16:58
Inspecting a Kubernetes PVC

Backstory

I had a PVC claim that had the wrong permissions (for whatever magical reason). I needed to mount the PVC and fix it.

Solution

Create a simple busybox container with the PVC mounted at /data

Create the claim

Be sure to replace $PVC_NAME with the name of the PVC you wish to access

  1. Create a pod using the PVC
@bmshouse
bmshouse / linux-kind-helm-jupyterhub-install.sh
Last active October 18, 2019 18:28
A basic script to install JupyterHub on Linux using KinD and Helm (Assumes Go, Helm, and Kubectl are already installed)
#!/bin/bash
#
# Install Kind
#
go get -u sigs.k8s.io/kind
#
# Install Helm
#