Skip to content

Instantly share code, notes, and snippets.

View allen-munsch's full-sized avatar
⁉️

James allen-munsch

⁉️
View GitHub Profile
@allen-munsch
allen-munsch / install_fail2ban_nginx.sh
Last active July 7, 2025 22:18
install fail2ban bash script nginx
#!/bin/bash
# Enhanced Fail2Ban Installation Script (Idempotent)
# Save this as install_fail2ban.sh and run with: bash install_fail2ban.sh
set -e # Exit on any error
echo "Starting Fail2Ban installation and configuration..."
# Install fail2ban if not already installed
if ! command -v fail2ban-client &> /dev/null; then
@allen-munsch
allen-munsch / doc.md
Last active June 26, 2025 18:51
RAG 7 Failure Points Remediation Steps

Reference: https://arxiv.org/abs/2401.05856

The Seven Failure Points from "Seven Failure Points When Engineering a Retrieval Augmented Generation System"

The seven critical failure points identified by Barnett et al. in their paper are:

1. Missing Content - The foundation of any RAG system is its knowledge base. An incorrect or incomplete knowledge base can lead to erroneous or insufficient information retrieval, ultimately affecting the quality of generated outputs.

@allen-munsch
allen-munsch / ma-ribbon-volume-profile.pine
Last active April 8, 2025 20:39
tradingview all in one MA ribbon and volume profile
//@version=6
indicator(title="All-in-One MA Ribbon + Volume Profile", shorttitle="AIO-MAR-VP", overlay=true, max_boxes_count=500, max_bars_back=1000)
//=============================================================================
// Input Parameters
//=============================================================================
tab_selection = input.string("MA Ribbon", "Settings", options=["MA Ribbon", "Volume Profile", "Visual Settings"])
//-----------------------------------------------------------------------------
// MA Ribbon Settings
@allen-munsch
allen-munsch / bashbox.sh
Created March 18, 2025 05:23
bashbox - a git / ssh implemention sort of like dropbox
#!/usr/bin/env bash
#
# BashBox - Git-based File Synchronization Tool
# A lightweight solution for bi-directional file synchronization using Git
#
# Author: James Munsch <[email protected]>
# License: MIT
set -euo pipefail # Strict mode: exit on error, unbound variable, and piping failures

Software Engineering Interview Comprehensive Cheatsheet

Interview 1 - Pair Programming Analysis

Thinking Aloud Techniques

  • Verbalize your thought process: "I'm thinking we should check for edge cases here..."
  • Explain trade-offs: "We could use a hash map for O(1) lookup, but it would cost O(n) space..."
  • Articulate assumptions: "I'm assuming the input array is not sorted..."
  • Narrate your debugging process: "Let's trace through with this example input..."
@allen-munsch
allen-munsch / example.md
Created February 25, 2025 22:35
quantum support vector machine

Step 1: Install QuASK

First, ensure you have QuASK installed. You can install it via pip:

pip install quask

Step 2: Prepare Your Dataset

@allen-munsch
allen-munsch / css-methodology.md
Created November 7, 2024 15:20
Cascading Stytle Sheets ( CSS ) methodology

Complete CSS Methodologies and Modern Practices Guide

This guide aims to be a high level panoply of methodologies, methods, practices related to CSS.

Feel free to make a comment if you find anything you'd really like added to it.

Table of Contents

Complete CSS Methodologies and Modern Practices Guide

Table of Contents

@allen-munsch
allen-munsch / 3d-ux.js
Created February 26, 2024 14:57
quick 3js example of directory tree file browsing
// Import Three.js
import * as THREE from "three";
import { OrbitControls } from "three/addons/controls/OrbitControls";
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
var renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
@allen-munsch
allen-munsch / list-installed.py
Created February 2, 2024 20:53
list all installed packages using importlib python
import importlib.metadata
def list_installed_packages():
distributions = importlib.metadata.distributions()
installed_packages = []
for dist in distributions:
args = (dist.metadata['Name'], dist.version)
installed_packages.append(args)
installed_packages.sort() # Sort the packages by name
for package_name, version in installed_packages:
@allen-munsch
allen-munsch / clear-gcp.sh
Last active October 22, 2023 05:13
generate a list of resources to destroy in google cloud project
#!/bin/bash
set -eux
# Thanks to: https://github.com/paulczar/gcp-cleaner/blob/master/delete-all.sh
export __region=$1
FAIL=0
waitfor() {