Skip to content

Instantly share code, notes, and snippets.

View a-toms's full-sized avatar
🌱
Ecstatic!

Tom a-toms

🌱
Ecstatic!
View GitHub Profile
@a-toms
a-toms / _section_3_add_your_serverless_function_3_2_update_your_serverless_function_api_0.txt
Created September 14, 2023 17:27
# Section 3: Add your serverless function - ## 3.2 Update your serverless function API
yaml
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
sam-app
Sample SAM Template for sam-app
Globals:
Function:
@a-toms
a-toms / _section_3_add_your_serverless_function_3_1_install_sam_1.txt
Created September 14, 2023 17:27
# Section 3: Add your serverless function - ## 3.1 Install SAM
bash
sam init
@a-toms
a-toms / _section_3_add_your_serverless_function_3_1_install_sam_0.txt
Created September 14, 2023 17:27
# Section 3: Add your serverless function - ## 3.1 Install SAM
bash
pip install --upgrade aws-sam-cli
sam --version
@a-toms
a-toms / _sim_models_py_2_5_run_your_server_to_check_your_progress_0.txt
Created September 14, 2023 17:27
# sim/models.py - ## 2.5 Run your server to check your progress
bash
python manage.py runserver
@a-toms
a-toms / _sim_models_py_2_4_add_your_templates_0.txt
Created September 14, 2023 17:27
# sim/models.py - ## 2.4 Add your templates
html
<!DOCTYPE html>
<html>
<head>
<title>Dashboard</title>
<script src="https://unpkg.com/htmx.org"></script>
</head>
<body>
<h1>Welcome to the Mind Upload Dashboard</h1>
<button hx-post="/process-task/" hx-trigger="click" hx-swap="outerHTML">Initiate Mind Upload</button>
@a-toms
a-toms / _section_1_setup_your_django_app_1.txt
Created September 14, 2023 17:27
- ## Section 1: Setup your Django app
bash
django-admin startproject core .
python manage.py startapp sim
@a-toms
a-toms / _section_1_setup_your_django_app_0.txt
Created September 14, 2023 17:27
- ## Section 1: Setup your Django app
bash
pip install django requests
@a-toms
a-toms / _section_3_add_your_serverless_function_3_1_install_sam_1.txt
Created September 14, 2023 17:27
# Section 3: Add your serverless function - ## 3.1 Install SAM
bash
sam init
@a-toms
a-toms / _section_3_add_your_serverless_function_3_1_install_sam_0.txt
Created September 14, 2023 17:26
# Section 3: Add your serverless function - ## 3.1 Install SAM
bash
pip install --upgrade aws-sam-cli
sam --version
@a-toms
a-toms / _sim_models_py_2_5_run_your_server_to_check_your_progress_0.txt
Created September 14, 2023 17:26
# sim/models.py - ## 2.5 Run your server to check your progress
bash
python manage.py runserver