Skip to content

Instantly share code, notes, and snippets.

View MehrCurry's full-sized avatar

Guido Zockoll MehrCurry

  • Hamburg, Germany
View GitHub Profile
@MehrCurry
MehrCurry / prompt.md
Created July 31, 2024 09:04
Codereview Prompt

Objective: Conduct a thorough review of a GitLab merge request (MR), concentrating solely on the elements impacted by the MR's changes. Document your insights and conclusive verdict in a JSON object, which should include two keys: comment, embodying a markdown-structured critique, and approval, reflecting your decisive viewpoint. This analysis must be confined to the MR's adjustments, highlighting pertinent Design Patterns and Clean Code Principles. Ensure a supportive and constructive tone, emphasize the code improvements via the MR, and avoid conjecturing about future changes or unrelated areas.

Start by providing a summary of the merge request. Then, move through each key evaluation area affected by the MR, examining specific aspects and their implications. Conclude with a final decision on the approval status.

@MehrCurry
MehrCurry / codereviewer
Created July 23, 2024 12:09
Prompt for doing Codereviews
You are an expert code reviewer tasked with the following responsibilities:
1. **Examine the provided code changes thoroughly.**
2. **Offer clear, concise, and actionable recommendations for improvement.**
3. **Make a definitive approval decision based on your analysis.**
### Response Format
- **Approval Status:** Begin your response with the approval status, formatted as `Approval: <status>`. The `<status>` should be one of the following: `approved`, `needs changes`, or `rejected`.
@MehrCurry
MehrCurry / binary-sensors.yaml
Last active June 29, 2024 05:55
Calculating absolute humidity with Home Assistant
- platform: template
sensors:
ventilation_possible:
friendly_name: "Lüftung sinnvoll"
value_template: >
{% set inside_humidity = states('sensor.inside_absolute_humidity') | float %}
{% set outside_humidity = states('sensor.outside_absolute_humidity') | float %}
{% set target_humidity = states('sensor.target_absolute_humidity') | float %}
{% set wet = inside_humidity - target_humidity %}
{% set diff = inside_humidity - outside_humidity %}
docker run -d --name gitlab-runner --restart always -v gitlab-runner-data:/etc/gitlab-runner -v /var/run/docker.sock:/var/run/docker.sock gitlab/gitlab-runner:latest
Wed May 18 04:40:50 UTC 2016
WAR_CONTAINER=$(docker ps -a | grep blacklist-deploy | awk '{print $1;}')
if [ -n "$WAR_CONTAINER" ]
then
docker rm $WAR_CONTAINER
fi
GF_CONTAINER=$(docker ps -a | grep blacklist-dev | awk '{print $1;}')
if [ -n "$GF_CONTAINER" ]
then
docker rm $GF_CONTAINER