This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Example Ansible Playbook | |
hosts: all | |
become: true | |
vars: | |
paketname: "htop" | |
quellpfad: "/pfad/zur/datei" | |
zielpfad: "/pfad/zum/ziel" | |
tasks: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pods [] { kubectl get pods -o yaml | from yaml | get items } | |
pods | get metadata.name | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- layouts/shortcodes/chart.html --> | |
<div id="{{ .Get "id" }}" style="width:{{ .Get "width" }}px;height:{{ .Get "height" }}px;"> | |
</div> | |
<script> | |
let data = JSON.parse({{ .Inner }}) | |
console.log(data) | |
canvas = document.getElementById('{{ .Get "id" }}'); | |
Plotly.newPlot( canvas, [{x: data.ord, y: data.absz}], { margin: { t: 0 } } ); | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Return the number of days the given certificate file is still valid | |
# | |
if [ "$#" -eq 0 ]; then | |
echo "Usage: crt_valid_days <certificate>" | |
exit 1 | |
fi | |
if ! command -v openssl &> /dev/null; then | |
echo "ERROR: OpenSSL not installed." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package functional | |
func Map[TValue any](values []TValue, f func(TValue) TValue) { | |
for i, value := range values { | |
values[i] = f(value) | |
} | |
} | |
func Reduce[TValue, TResult any](values []TValue, f func(TValue, TResult) TResult) TResult { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
running_vms=($(VBoxManage list runningvms | awk '{print $1}' | tr -d '"')) | |
# Create Ansible inventory file | |
GROUP_NAME="local_vms" | |
for vm in $running_vms | |
do | |
vboxmanage guestproperty get "$vm" "/VirtualBox/GuestInfo/Net/0/V4/IP" | |
done | | |
awk -v group="$GROUP_NAME" ' | |
BEGIN { printf("[%s]\n", group)} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const spinner = document.getElementById('spinner') | |
document.getElementById('userinput').addEventListener('submit', function(event) { | |
event.preventDefault(); // Verhindert, dass das Formular die Seite neu lädt | |
spinner.style.visibility = 'visible' | |
var textbox = document.getElementById('usermessage') | |
var actor = document.createElement('dt') | |
actor.textContent = "You" | |
var actorMessage = document.createElement('dd') | |
actorMessage.textContent = textbox.value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: docker_hosts | |
tasks: | |
- name: Identifiziere ein ungenutztes Laufwerk | |
community.general.lvol: | |
# Befehle zum Finden und Validieren des ungenutzten Laufwerks | |
# Dies kann komplex sein und erfordert möglicherweise benutzerdefinierte Logik | |
- name: Füge das Laufwerk als Physical Volume hinzu | |
community.general.pvcreate: | |
device: /dev/sdX |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="de"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>{{ title }}</title> | |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" rel="stylesheet"> | |
<link href="/static/style.css" rel="stylesheet"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"net/http" | |
"time" | |
) |