From 5036ea5d8aadd0bb398ace2bf2862da57bd2e0dd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Feb 2026 17:43:58 +0000 Subject: [PATCH 1/2] Initial plan From 07f1d36f2a762d2bd21790cd941d3ff51d58416e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Feb 2026 17:47:13 +0000 Subject: [PATCH 2/2] Create simple file-sharing repository for hands-on lab Co-authored-by: samuel-bohman <13782601+samuel-bohman@users.noreply.github.com> --- README.md | 156 ++++++++++++++++++++- files/lab-01-starter.txt | 19 +++ files/lab-02-intermediate.txt | 18 +++ files/lab-03-advanced.txt | 19 +++ files/reference-materials.txt | 27 ++++ files/tutorial-videos.txt | 27 ++++ index.html | 256 ++++++++++++++++++++++++++++++++++ server.py | 54 +++++++ 8 files changed, 575 insertions(+), 1 deletion(-) create mode 100644 files/lab-01-starter.txt create mode 100644 files/lab-02-intermediate.txt create mode 100644 files/lab-03-advanced.txt create mode 100644 files/reference-materials.txt create mode 100644 files/tutorial-videos.txt create mode 100644 index.html create mode 100755 server.py diff --git a/README.md b/README.md index cf271ef..71ea2b5 100644 --- a/README.md +++ b/README.md @@ -1 +1,155 @@ -# jam \ No newline at end of file +# šŸŽÆ JAM - File Repository for Hands-on Lab + +A simple, lightweight file-sharing repository designed for educational hands-on labs and workshops. + +## šŸš€ Quick Start + +### Option 1: Run with Python (Recommended) + +```bash +# Clone the repository +git clone https://github.com/samuel-bohman/jam.git +cd jam + +# Start the server +python3 server.py +``` + +Then open your browser to: **http://localhost:8000** + +### Option 2: Use any HTTP server + +If you prefer another HTTP server: + +```bash +# Using Python's built-in server +python3 -m http.server 8000 + +# Using Node.js http-server (requires npm install -g http-server) +http-server -p 8000 + +# Using PHP's built-in server +php -S localhost:8000 +``` + +## šŸ“ Repository Structure + +``` +jam/ +ā”œā”€ā”€ index.html # Main landing page with file browser +ā”œā”€ā”€ server.py # Simple Python HTTP server +ā”œā”€ā”€ files/ # Directory containing lab files +│ ā”œā”€ā”€ lab-01-starter.txt +│ ā”œā”€ā”€ lab-02-intermediate.txt +│ ā”œā”€ā”€ lab-03-advanced.txt +│ ā”œā”€ā”€ reference-materials.txt +│ └── tutorial-videos.txt +└── README.md # This file +``` + +## šŸ“ Adding Your Own Files + +1. Place your lab files in the `files/` directory +2. Update `index.html` to list your new files +3. Customize the descriptions and icons as needed + +### Example: Adding a New Lab File + +```html +
  • +
    + šŸ“„ +
    +
    your-file.zip
    +
    Your file description
    +
    +
    + Download +
  • +``` + +## šŸŽØ Customization + +### Branding +Edit `index.html` to change: +- Title and description in the header +- Color scheme (CSS variables in the ` + + +
    +
    +

    šŸŽÆ JAM

    +

    File Repository for Hands-on Lab

    +
    + +
    +
    +

    šŸ“š Getting Started

    +
    +

    Welcome to the JAM hands-on lab file repository!

    +
      +
    1. Browse the available files below
    2. +
    3. Click the download button to get the files you need
    4. +
    5. Follow the lab instructions provided with each file
    6. +
    7. Have fun learning!
    8. +
    +
    +
    + +
    +

    šŸ“ Available Files

    +
      +
    • +
      + šŸ“„ +
      +
      lab-01-starter.txt
      +
      Lab 1: Getting Started - Starter files and instructions
      +
      +
      + Download +
    • + +
    • +
      + šŸ“„ +
      +
      lab-02-intermediate.txt
      +
      Lab 2: Intermediate Concepts - Practice exercises
      +
      +
      + Download +
    • + +
    • +
      + šŸ“„ +
      +
      lab-03-advanced.txt
      +
      Lab 3: Advanced Topics - Challenge yourself
      +
      +
      + Download +
    • + +
    • +
      + šŸ“š +
      +
      reference-materials.txt
      +
      Quick reference guide and cheat sheet
      +
      +
      + Download +
    • + +
    • +
      + šŸŽ„ +
      +
      tutorial-videos.txt
      +
      Links to video tutorials and walkthroughs
      +
      +
      + Download +
    • +
    +
    + +
    +

    šŸ’” Need Help?

    +
    +

    If you encounter any issues:

    +
      +
    • Check that you've downloaded the correct file for your lab
    • +
    • Make sure you have the required software installed
    • +
    • Refer to the reference materials for additional guidance
    • +
    • Ask your instructor or lab assistant for help
    • +
    +
    +
    +
    + + +
    + + diff --git a/server.py b/server.py new file mode 100755 index 0000000..a18f071 --- /dev/null +++ b/server.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python3 +""" +Simple HTTP server for the JAM file repository. +Serves files from the current directory for hands-on lab purposes. +""" + +import http.server +import socketserver +import os +import sys + +PORT = 8000 + +class MyHTTPRequestHandler(http.server.SimpleHTTPRequestHandler): + def end_headers(self): + # Add CORS headers to allow file downloads + self.send_header('Access-Control-Allow-Origin', '*') + self.send_header('Access-Control-Allow-Methods', 'GET, OPTIONS') + self.send_header('Access-Control-Allow-Headers', 'Content-Type') + super().end_headers() + + def log_message(self, format, *args): + # Custom log format + sys.stderr.write("%s - - [%s] %s\n" % + (self.address_string(), + self.log_date_time_string(), + format % args)) + +def main(): + """Start the HTTP server.""" + # Change to the script's directory + os.chdir(os.path.dirname(os.path.abspath(__file__))) + + try: + with socketserver.TCPServer(("", PORT), MyHTTPRequestHandler) as httpd: + print(f"šŸš€ JAM File Repository Server") + print(f"šŸ“‚ Serving files from: {os.getcwd()}") + print(f"🌐 Server running at: http://localhost:{PORT}") + print(f"šŸ“‹ Open your browser to: http://localhost:{PORT}") + print(f"\nāš ļø Press Ctrl+C to stop the server\n") + httpd.serve_forever() + except KeyboardInterrupt: + print("\n\nšŸ‘‹ Server stopped. Goodbye!") + sys.exit(0) + except OSError as e: + if e.errno == 48 or e.errno == 98: # Address already in use + print(f"āŒ Error: Port {PORT} is already in use.") + print(f"šŸ’” Try closing other applications or use a different port.") + sys.exit(1) + else: + raise + +if __name__ == "__main__": + main()