Skip to content

Instantly share code, notes, and snippets.

View RocketRene's full-sized avatar

René Kuhn RocketRene

  • Berlin
View GitHub Profile
@RocketRene
RocketRene / hpi_wifi.sh
Created January 9, 2025 13:38
Connect to HPI Wifi
#!/bin/bash
# Function to check if nmcli is available
check_requirements() {
if ! command -v nmcli &> /dev/null; then
echo "Error: nmcli is not installed. Please install NetworkManager."
exit 1
fi
}
@RocketRene
RocketRene / configure-eduroam-with-easyroam.sh
Created January 8, 2025 20:21
HTW Berlin: eduroam/easyroam setup script for Linux (Ubuntu/Fedora) using NetworkManager and PKCS12 certificates
#!/bin/bash
# This script is generating an eduroam network configuration using NetworkManager.
# At first, you have to generate an easyroam profile on https://www.easyroam.de/ that
# is generating an pkcs12 file as input for this script.
# Usage: bash configure-eduroam-with-easyroam.sh <YOUR-PKCS12-File>
set -e
3024-09-14 10:15:27,345 INFO: Debugging script for s2idle on AMD systems
2024-09-14 10:15:27,346 INFO: 💻 LENOVO 21MDS00D00 (ThinkPad T14 Gen 5) running BIOS 1.5 (R2LET24W (1.05 )) released 05/15/2024 and EC 1.3
2024-09-14 10:15:27,346 INFO: 🐧 Fedora Linux 40 (KDE Plasma)
2024-09-14 10:15:27,346 INFO: 🐧 Kernel 6.10.6-200.fc40.x86_64
2024-09-14 10:15:27,352 DEBUG: BAT0 energy level is 43960000 µWh
2024-09-14 10:15:27,352 INFO: 🔋 Battery BAT0 (Sunwoda 5B11H56418) is operating at 101.43% of design
2024-09-14 10:15:27,352 INFO: Checking prerequisites for s2idle
2024-09-14 10:15:27,352 INFO: ✅ Logs are provided via systemd
2024-09-14 10:15:27,353 INFO: ✅ AMD Ryzen 5 PRO 8540U w/ Radeon 740M Graphics (family 19 model 7c)
2024-09-14 10:15:27,353 DEBUG: SMT control: on
2024-09-14 10:15:57,295 INFO: Debugging script for s2idle on AMD systems
2024-09-14 10:15:57,296 INFO: 💻 LENOVO 21MDS00D00 (ThinkPad T14 Gen 5) running BIOS 1.7 (R2LET26W (1.07 )) released 06/18/2024 and EC 1.3
2024-09-14 10:15:57,296 INFO: 🐧 Fedora Linux 40 (Sway)
2024-09-14 10:15:57,296 INFO: 🐧 Kernel 6.9.12-200.fc40.x86_64
2024-09-14 10:15:57,308 DEBUG: BAT0 energy level is 43080000 µWh
2024-09-14 10:15:57,308 INFO: 🔋 Battery BAT0 (Celxpert 5B11H56416) is operating at 100.29% of design
2024-09-14 10:15:57,308 INFO: Checking prerequisites for s2idle
2024-09-14 10:15:57,309 INFO: ✅ Logs are provided via systemd
2024-09-14 10:15:57,309 INFO: ✅ AMD Ryzen 5 PRO 8540U w/ Radeon 740M Graphics (family 19 model 7c)
2024-09-14 10:15:57,309 DEBUG: SMT control: on
@RocketRene
RocketRene / sysinfo
Created September 11, 2024 19:18
❯ fpaste --sysinfo --printonly|wl-copy
=== fpaste 0.5.0.0 System Information ===
* OS Release (lsb_release -ds):
"Fedora Linux 40 (Sway)"
* CPU Model (grep 'model name' /proc/cpuinfo | awk -F: '{print $2}' | uniq -c |
sed -re 's/^ +//' ):
12 AMD Ryzen 5 PRO 8540U w/ Radeon 740M Graphics
* 64-bit Support (grep -q ' lm ' /proc/cpuinfo && echo Yes || echo No):
Yes
#!/bin/bash
# Find the commit hash of the last user commit before any Atlantis merge commits.
# Adjust "atlantis-merge" if Atlantis uses a different commit message.
atlantis_commit_pattern="atlantis-merge"
# Get the hash of the first Atlantis merge commit looking backwards from HEAD.
# The "^!" ensures we only get commits with messages not matching the Atlantis pattern.
atlantis_commit=$(git log --pretty=format:'%H %s' | grep -m 1 -B 1 "$atlantis_commit_pattern" | head -n1 | cut -d' ' -f1)

Guide: Setting Up Atlantis PR Automation with Terramate

This concise guide will walk you through setting up Atlantis for pull request (PR) automation in combination with Terramate, facilitating a more collaborative and automated workflow for managing infrastructure as code (IaC) via GitHub. We assume a working knowledge of Terraform, GitHub, and basic CI/CD principles. Overview

Integrating Atlantis with Terramate enhances your team's ability to review, plan, and apply Terraform changes directly from GitHub PRs. This process ensures infrastructure changes are executed securely and efficiently, with all changes codified and subject to peer review. Prerequisites

  • Terraform, Terramate, and Atlantis installed.
  • A GitHub account and repository for your infrastructure code.

Übersicht des Repo-Management-Tools

Kurzbeschreibung

Dieses Tool ermöglicht es Benutzern, Repositories für ihre Programmierprojekte effizient auf GitHub und GitLab zu initialisieren. Es wurde entwickelt, um den Prozess der Repository-Erstellung zu vereinfachen, indem es eine interaktive Command-Line-Schnittstelle bietet. Benutzer können Kurse auswählen, Projektnamen definieren, Beschreibungen eingeben und entscheiden, auf welchen Plattformen das Repository veröffentlicht werden soll.

Konfigurationsfile

Das Tool verwendet ein YAML-Konfigurationsfile, um Benutzerdaten, API-Schlüssel und Informationen zu Kursen zu speichern. Hier ist ein Beispiel für das Format dieses Files:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mein Urlaub</title>
<style>
h1 {color: aqua;
}