Skip to content

Instantly share code, notes, and snippets.

View bigsnarfdude's full-sized avatar

BigsnarfDude bigsnarfdude

View GitHub Profile
@bigsnarfdude
bigsnarfdude / server_internal_flask.md
Created April 3, 2025 17:02
server_internal_flask.md

Running Flask on an Internal Network Interface

This guide explains how to configure a Flask application to run on a specific network interface on a macOS server with multiple NICs.

Prerequisites

  • macOS server with multiple network interfaces
  • Python installed
  • Flask installed (pip install flask)
@bigsnarfdude
bigsnarfdude / prune_worksops.py
Created March 31, 2025 14:53
prune_worksops.py
#!/usr/bin/env python3
import sys
import os
# --- Configuration ---
# Define prefixes of directory paths to exclude.
# Any file whose path starts with one of these prefixes will be removed.
# Add or remove prefixes as needed.
EXCLUDE_PREFIXES = (
@bigsnarfdude
bigsnarfdude / workshops.md
Last active March 30, 2025 13:17
workshops.md

How to get "Workshops" Rails application up and running on your local machine for development.

Goal: Set up a local development environment for the Workshops application using Docker.

1. Prerequisites:

  • Git: To clone the repository.
  • Docker: To build and run containerized applications. (Install Docker)
  • Docker Compose: To manage multi-container Docker applications. It's usually included with Docker Desktop.
@bigsnarfdude
bigsnarfdude / zoom_headless_linux_docker.md
Last active March 25, 2025 15:47
zoom_headless_linux_docker.md

Setting Up the Zoom Meeting SDK Linux Bot - Simple Guide for Beginners

Hey there! Let me walk you through setting up this Zoom bot on Linux in simple steps. This is perfect for someone who's just getting started with Linux.

What You'll Need

  • A computer running Linux
  • Docker installed
  • A Zoom account
  • Basic knowledge of the command line
@bigsnarfdude
bigsnarfdude / docker.md
Created March 22, 2025 03:45
installdocker ubuntu

Installing Docker on Ubuntu can be done in a few ways, but the most common and recommended method is through Docker's official apt repository. Here's a breakdown of the process, combining key information from the search results:

Installation Using the Apt Repository:

This method ensures you get the latest stable version and simplifies future updates. Here's a step-by-step guide:

  • 1. Update the package index and install necessary packages:
    • sudo apt-get update
    • sudo apt-get install ca-certificates curl gnupg
  • 2. Add Docker's official GPG key:
@bigsnarfdude
bigsnarfdude / title_editor.py
Created March 20, 2025 17:19
title_editor.py
import os
import subprocess
import sys
from pathlib import Path
def process_video(input_file, output_file):
"""Process a video file to remove seconds 4-15."""
cmd = [
'ffmpeg',
'-i', input_file,
@bigsnarfdude
bigsnarfdude / video_viz.py
Created March 19, 2025 16:42
video_viz.py
from flask import Flask, render_template
import altair as alt
import pandas as pd
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@bigsnarfdude
bigsnarfdude / vibe_coding3.7_browser.md
Created March 16, 2025 19:03
claude 3.7 coding in browser prompts and suggestions

I need to refactor my application to better separate concerns between functionality and API endpoints. The project is a Flask-based API that processes and analyzes data.

Currently, I have these related components that need to be decoupled:

  1. Data processing logic
  2. API endpoint handling
  3. Background task management

I'd like help with:

  1. Separating core processing functionality from API endpoint handling
  2. Creating cleaner interfaces between components
@bigsnarfdude
bigsnarfdude / gemma3onmac.py
Last active March 17, 2025 04:58
gemma3onmac.py
import torch
from transformers import pipeline
pipe = pipeline(
"image-text-to-text",
device="mps",
model="google/gemma-3-12b-it" # "google/gemma-3-27b-it"
)
@bigsnarfdude
bigsnarfdude / meetings.py
Last active March 15, 2025 07:17
meetings.py
import json
import pandas as pd
import plotly.graph_objects as go
from plotly.subplots import make_subplots
import numpy as np
import dash
from dash import dcc, html
from dash.dependencies import Input, Output
# Load the data