Skip to content

Instantly share code, notes, and snippets.

View e-cite's full-sized avatar

Andreas Dolp e-cite

View GitHub Profile
@e-cite
e-cite / yubikey-ssh-authentication.md
Last active November 11, 2020 19:55
Yubikey SSH authentication

Authenticate to OpenSSH-Server with either public key or with YubiKey OTP + password

When you have access to your private key file, use it for quick login. When you are on the go, use your Yubikey OTP and your password.

Tutorial: https://developers.yubico.com/yubico-pam/YubiKey_and_SSH_via_PAM.html

  1. Install yubico pam module:
    sudo apt-get install libpam-yubico
    
@e-cite
e-cite / IAMRole-VMOperator.json
Created December 6, 2020 13:32
Azure IAM Role "VM operator" (Only start and stop VM)
{
"Name": "VM Operator",
"IsCustom": true,
"Description": "Can start, restart and stop (deallocate) virtual machines.",
"Actions": [
"Microsoft.Compute/*/read",
"Microsoft.Compute/virtualMachines/start/action",
"Microsoft.Compute/virtualMachines/restart/action",
"Microsoft.Compute/virtualMachines/deallocate/action"
],
@e-cite
e-cite / kvm-installation.md
Last active October 15, 2024 21:26
Debian KVM installation tutorial

Debian KVM installation tutorial

https://wiki.debian.org/KVM

  1. Update system, install KVM (server without graphical tools) and additional tools
    sudo apt-get update && sudo apt-get dist-upgrade
    sudo apt-get install --no-install-recommends qemu-system libvirt-clients libvirt-daemon-system
    sudo apt-get install qemu-utils dnsmasq-base bridge-utils iptables netcat-openbsd
    sudo apt-get install ovmf  # For UEFI-Support in VMs (Aber aufgrund eines Bugs sind mit UEFI-VMs keine Snapshots möglich!)
    
@e-cite
e-cite / docker-installation.md
Last active May 22, 2024 11:47
Debian Docker installation tutorial

Debian Docker installation tutorial

https://docs.docker.com/engine/install/debian/

  1. Remove old docker, update and install requirements
    sudo apt-get remove docker docker-engine docker.io containerd runc
    sudo apt-get update
    sudo apt-get install \
        apt-transport-https \
        ca-certificates \
        curl \
    
@e-cite
e-cite / gitlab-and-runner-installation.md
Last active September 13, 2024 08:30
Debian gitlab and gitlab-runner installation tutorial

Debian gitlab and gitlab-runner installation tutorial

https://about.gitlab.com/install/?version=ce#debian

Gitlab (Community Edition)

  1. Install dependencies
    sudo apt-get install -y curl openssh-server ca-certificates perl
    (sudo apt-get install -y postfix)
    
  2. Add official gitlab repository and install gitlab community edition
@e-cite
e-cite / wiki_industrielle-bussysteme.md
Created July 7, 2021 12:49
Wiki: Industrielle Bussysteme

Bussysteme

Verbindungstechniken

Um dezentrale Feldgeräte (Sensoren und Aktoren) anzusteuern gibt es verschiedene Verbindungstechniken:

  • Konventionelle Verdrahtung
    • Direkte Verdrahtung von der SPS zu jedem Bauelement im Feld
    • Eine Leitung je Feldgerät erfordert einen hohen Ressourcenbedarf
    • Unflexibel bei Änderungen
    • Herausforderungen bei Analogsignalen (Spannungsabfall proportional zur Leitungslänge)
  • Dezentrale Peripherie
  • Serielles Bussystem zwischen Zentraleinheit (SPS) und mehreren Remote-IO-Einheiten
@e-cite
e-cite / wiki_industrial-ethernet.md
Created July 7, 2021 16:25
Wiki: Industrial Ethernet

Industrial Ethernet

Grundlagen

Industrial Ethernet dient dazu, den vorhandenen Ethernet-Standard um die Anforderungen aus der Prozessdatenkommunikation zu erweitern.

Es sind insbesondere folgende Anforderungen zu berücksichtigen:

  • Industrielle Umgebungsbedingungen (Temperaturbereiche; Beständigkeit gegen Öl, Säuren, etc.; Vibrationen; EMV)
  • Schutzarten (IPxx)
  • Hutschienenmontage
  • Spannungsversorgung, typ. 24 V DC
  • Topologien (Häufig Ring, eher selten Stern bzw. Baum)
@e-cite
e-cite / wiki_industrielle-netzwerk-protokolle.md
Created July 7, 2021 16:30
Wiki: Industrielle Netzwerk-Protokolle
@e-cite
e-cite / debian-vm-settings.md
Last active May 6, 2023 18:10
Debian VM settings
  • Locales
  • Timezone
  • Hostname
  • Domainname
  • apt-get install open-vm-tools open-vm-tools-desktop terminator wipe virt-manager ssh-askpass dnsutils auto-apt-proxy
  • apt-get install firmware-linux-nonfree xserver-xorg-input-synaptics
  • Mac Book Pro: add non-free to packet sources
  • Install VS Code
  • Einstellungen / Session and Startup / Application Autostart / Activate SSH Key Agent (GNOME Keyring: SSH Agent)
  • Einstellungen / Erscheinungsbild / Schriften / DPI-Wert auf 96
@e-cite
e-cite / LGT92-v1.6.4_decoder_TTN_ecite.js
Last active January 9, 2022 17:05
Dragino TTN Decoders
// From: https://www.dragino.com/downloads/index.php?dir=LGT_92/Decoder/
// But roll, pitch and altitude are wrong due to <<24>>16.
// Better: <<8
//The function is :
function Decoder(bytes, port) {
// Decode an uplink message from a buffer
// (array) of bytes to an object of fields.
var latitude;//gps latitude,units: °