Skip to content

Instantly share code, notes, and snippets.

View tarasowski's full-sized avatar
:electron:

Dimitri (Dimi) Tarasowski tarasowski

:electron:
View GitHub Profile
@tarasowski
tarasowski / post-user.js
Created November 8, 2024 09:44
post user js lambda function
import { randomUUID } from 'crypto'
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
import { PutCommand, DynamoDBDocumentClient } from "@aws-sdk/lib-dynamodb";
const client = new DynamoDBClient({});
const docClient = DynamoDBDocumentClient.from(client);
const TABLE_NAME = "Techstarter"
const addToDB = async (entry) => {
const command = new PutCommand({
@tarasowski
tarasowski / get-users.js
Created November 8, 2024 08:50
dynamodb scan operation
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
import { DynamoDBDocumentClient, ScanCommand } from "@aws-sdk/lib-dynamodb";
const client = new DynamoDBClient({});
const docClient = DynamoDBDocumentClient.from(client);
const TABLE_NAME = "Techstarter"
const scanOperation = async () => {
const command = new ScanCommand({
/* style.css */
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f0f0f0;
}
// script.js
document.addEventListener("DOMContentLoaded", function() {
var character = document.getElementById("character");
var container = document.getElementById("container");
// Aktuelle Position des Charakters
var position = {
left: 0,
top: 0
};
describe('Newsletter Subscribe Form', () => {
beforeEach(() => {
cy.visit('http://localhost:3000')
})
it('allows users to subscribe to the email list', () => {
const email = "[email protected]"
cy.getByData("email-input").type(email)
cy.getByData("submit-button").click()
cy.getByData("success-message").contains(email)
})
@tarasowski
tarasowski / pipeline.yml
Created March 5, 2024 11:51
React app test pipeline
name: Selenium Tests
on:
push
jobs:
test:
runs-on: ubuntu-latest
steps:
@tarasowski
tarasowski / App.css
Created March 5, 2024 11:15
Bulletin board css
.App {
text-align: center;
}
.box {
position: absolute;
cursor: move;
color: black;
background-color: white;
max-width: 215px;
@tarasowski
tarasowski / App.js
Created March 5, 2024 11:13
Bulletin board project
import React, { useState, useEffect } from "react";
import "./App.css";
import Draggable from "react-draggable";
import { v4 as uuidv4 } from "uuid";
var randomColor = require("randomcolor");
function App() {
const [item, setItem] = useState("");
const [items, setItems] = useState(JSON.parse(localStorage.getItem("items")) || []);
@tarasowski
tarasowski / tf-codepipeline-flask.md
Created February 14, 2024 09:52
Infra as code für Pipeline + App

CodePipeline Übung #1

  • Erstelle eine Pipeline mit zwei Stages (terraform .tf)
    • Stage #1: Source (get data from github)
    • Stage #2: Prod innerhalb von Prod haben wir zwei Actions:
      • Build: build a simple python app -> flask / django sollen die requirement installiert werden
      • Test: hier soll dann der Unit test -> für die flask / django laufen
    • Stage #3: Manual approval
  • Stage #4: Deploy -> noch nicht machen
@tarasowski
tarasowski / pull-request-fix.md
Created February 7, 2024 11:21
Let my mates fix the issues

Here's a step-by-step breakdown:

  1. Your teammate will first fetch the changes from the remote repository to ensure they have the latest code.

    git fetch origin
  2. They will then create a new branch based on your feature branch.