Skip to content

Instantly share code, notes, and snippets.

View bigsnarfdude's full-sized avatar

BigsnarfDude bigsnarfdude

View GitHub Profile
@bigsnarfdude
bigsnarfdude / image_segmentation_gemini_api.html
Created April 18, 2025 15:30
image_segmentation_gemini_api.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gemini API Image Mask Visualization</title>
<script type="module">
import { GoogleGenerativeAI } from "https://esm.run/@google/generative-ai";
import { marked } from "https://esm.run/marked";
@bigsnarfdude
bigsnarfdude / image_segmentation.py
Created April 16, 2025 15:23
image_segmentation.py
# Copyright 2024 Big Vision Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@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