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 ( | |
"encoding/json" | |
"fmt" | |
"net/http" | |
"os" | |
"time" | |
) |
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
## Get cloud image | |
cd /storage | |
wget https://cloud-images.ubuntu.com/lunar/current/lunar-server-cloudimg-amd64.img | |
## Create and configure Machine | |
qm create 101 --name ubuntu-lunar-template --memory 512 --net0 virtio,bridge=vmbr0 | |
qm importdisk 101 /storage/lunar-server-cloudimg-amd64.img VDI -format qcow2 | |
qm set 101 --scsihw virtio-scsi-pci --scsi0 VDI:vm-101-disk-0 | |
qm set 101 --ide2 local:cloudinit --boot c --bootdisk scsi0 --serial0 socket --vga serial0 |
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
# Windows: | |
cd C:\Users\kkroesch\AppData\Local\BraveSoftware\Brave-Browser\User Data\Default | |
# Linux | |
cd $HOME/.config/BraveSoftware/Brave-Browser/Default/ | |
jq '[recurse(.[]?) | select(type == "object" and .children != null) | .children[] | {date_added, name, url}] | {bookmark: .}' Bookmarks > bookmarks.json | |
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
FROM ubuntu:latest | |
# Setzen Sie die Umgebungsvariablen für den Proxy (falls erforderlich) | |
#ENV HTTP_PROXY=http://httpproxy.ag.ch:8080 | |
#ENV HTTPS_PROXY=http://httpproxy.ag.ch:8080 | |
RUN apt-get update && \ | |
DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-pip python3-venv python3-nose python3-dev python3-numpy python3-plotly python3-ipython ipython3 \ | |
vim exa git build-essential zsh curl \ | |
net-tools dnsutils nmap mtr iftop |
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
DOMAIN=$1 | |
certbot certonly \ | |
--standalone -d "$DOMAIN" \ | |
--email "helpdesk@$DOMAIN" | |
--non-interactive \ | |
--agree-tos \ | |
--http-01-port=8899 | |
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
#!/bin/bash | |
COPYRIGHT="© Karsten Kroesch - www.kroesch.ch" | |
for file in *.jpeg | |
do | |
# Get the height of the image | |
height=$(identify -format "%h" "$file") | |
# Calculate the pointsize as 5% of the image height |
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
# in /etc/fail2ban/jail.conf | |
# ... | |
[nginx-4xx] | |
enabled = true | |
port = http,https | |
filter = nginx-4xx | |
logpath = /var/log/nginx/access.log | |
bantime = 3600 |
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
a# /etc/systemd/system/webconsole.service | |
# | |
# Install with: | |
# # install https://github.com/yudai/gotty | |
# # systemctl daemon-reload | |
# # systemctl enable --now patchstatus.service | |
# | |
[Unit] | |
Description=Provide an ephemeral container with web console |
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
global | |
log /dev/log local0 | |
log /dev/log local1 notice | |
chroot /var/lib/haproxy | |
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners | |
stats timeout 30s | |
user haproxy | |
group haproxy | |
daemon |
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
### Requests for Kix API | |
@base_url = http://localhost:20000/api/v1 | |
### Authorization | |
# @name request_auth_token | |
POST {{base_url}}/auth | |
{ |