Skip to content

Instantly share code, notes, and snippets.

View PixelJunkie33's full-sized avatar
🎯
Focusing

Kadeem Pratt PixelJunkie33

🎯
Focusing
View GitHub Profile
@PixelJunkie33
PixelJunkie33 / gist:70e87cde4ffd10702446571cbd3f2ba8
Created December 12, 2023 22:57
functional lambda function that triggers and event AWS Node.js Runtime
exports.handler = async (event) => {
const data = {
name: "mike",
}
return {
statusCode: 200,
body: JSON.stringify(data)
};
@PixelJunkie33
PixelJunkie33 / gist:8d72e999b1cfcaccb827b23bf53a139c
Created September 20, 2023 13:44
This code is a JSX snippet within a JavaScript map function. It iterates over an array called yogaPosesData and generates a series of HTML elements
{yogaPosesData.map((yogaPose) => (
<div
id={yogaPose.id} // Ensure this is a unique identifier
className="card"
draggable={true}
onDrag={dragHandler}
onDragStart={dragStartHandler}
dataYogaPose={JSON.stringify(yogaPose)}
key={yogaPose.id} // Use a unique key
>
@PixelJunkie33
PixelJunkie33 / gist:6961a19de911c8e49331d6f953932eec
Created July 22, 2023 22:24
Generating Testing Data, Pushing the Mock Data to DynomoDB
import boto3
import random
import uuid
from faker import Faker
fake = Faker()
# Replace with your AWS credentials
aws_access_key_id = 'YOUR_ACCESS_KEY'
aws_secret_access_key = 'YOUR_SECRET_KEY'
import random
import string
def generate_password(length=10):
"""Generate a random password of specified length."""
characters = string.ascii_letters + string.digits + string.punctuation
password = ''.join(random.choice(characters) for _ in range(length))
return password
# Example usage