Skip to content

Instantly share code, notes, and snippets.

View tarasowski's full-sized avatar
:electron:

Dimitri (Dimi) Tarasowski tarasowski

:electron:
View GitHub Profile
describe('Newsletter Subscribe Form', () => {
beforeEach(() => {
cy.visit('http://localhost:3000')
})
it('allows users to subscribe to the email list', () => {
const email = "dimitri@techstarter.de"
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.

@tarasowski
tarasowski / trunk-based.md
Created February 7, 2024 05:09
trunk-based development simple workflow

In trunk-based development, developers typically work on small changes directly in the main branch or on short-lived feature branches. The goal is to integrate changes to the main branch as frequently as possible to avoid large merge conflicts and integration issues.

Here's the general workflow:

  1. Update your local main branch with the latest changes from the remote main branch:
git checkout main
git pull origin main

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@tarasowski
tarasowski / students.md
Created February 6, 2024 07:01
Case study trunk-based development

Sure, here's a simple simulation of how a trunk-based development might work with 5 students working on a simple Python application. We'll assume that each student is working on a different feature of the application.

  1. Initial Setup: The instructor (or one of the students) creates a new repository on GitHub for the Python application. This repository contains the main branch (trunk).

  2. Clone the Repository: Each student clones the repository to their local machine.

    git clone https://github.com/instructor/python-app.git
@tarasowski
tarasowski / feature-flag.md
Last active February 6, 2024 06:55
Trunk-based development feature flag

In a trunk-based development approach with short-lived feature branches, the process would be similar, but with a slight difference in the workflow. Here's how it would look:

  1. Create a Short-Lived Feature Branch: You start by creating a new branch for your feature from the main branch (trunk).

    git checkout -b dark-mode-feature
  2. Introduce the Feature Flag: In your new branch, you introduce a new feature flag in your code: