Skip to content

Instantly share code, notes, and snippets.

View dkdndes's full-sized avatar

PR dkdndes

View GitHub Profile
@dkdndes
dkdndes / my_mac_addr.sh
Last active October 25, 2024 11:14
Get MAC address of your computer; don't forget to replace "eth0" network interface with yours.
#!/bin/bash
# Find the primary IPv4-connected interface
ipv4_interface=$(ip -4 route | grep default | awk '{print $5}')
if [ -n "$ipv4_interface" ]; then
ipv4_address=$(ip -4 addr show "$ipv4_interface" | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
ipv4_mac=$(cat /sys/class/net/"$ipv4_interface"/address)
echo "IPv4 Interface: $ipv4_interface"
echo "IPv4 Address: $ipv4_address"
echo "IPv4 MAC Address: $ipv4_mac"
@dkdndes
dkdndes / sdg_goals_hex_and_rgb_code.txt
Last active September 17, 2024 13:00
Hex and RGB Code for SDG Goals by Number
sdg-goal-1: #E5233D
rgb(229,35,61)
sdg-goal-2: #DDA73A
rgb(221,167,58)
sdg-goal-3: #4CA146
rgb(76,161,70)
sdg-goal-4: #C5192D
@dkdndes
dkdndes / color_list.py
Last active February 20, 2022 21:15
Python Color List with RGB Code and Color Name (w/o) Hex
"""Code for handling color names and RGB codes.
This module is part of Swampy, and used in Think Python and
Think Complexity, by Allen Downey.
http://greenteapress.com
Copyright 2013 Allen B. Downey.
Distributed under the GNU General Public License at gnu.org/licenses/gpl.html.
"""

How to use Firecracker with Weaveworks Ignite

Installation-Tutorial

You find a good tutorial with all the basics at the Weaveworks

it introduces

Upgrade Debian 10 to Debian 11 Bullseye

The procedure is as follows: Backup, Update sources list, update packages accordingly, upgrade, followed by fullupgrade and reboot.

a) Backup the system.

b) Update existing packages and reboot

$ sudo apt update

@dkdndes
dkdndes / rpi-configure-locales.md
Created February 10, 2022 14:10 — forked from tomysmile/rpi-configure-locales.md
Raspberry Pi: Reconfigure Locales

Reconfigure your RPi Locales

First you need to install the locales you want:

sudo dpkg-reconfigure locales

Then refresh your current environment:

Raspberry Pi 3 &4 64bit ARM Kernel Update

All newer Raspberry Pi models, like the 3/3+ series, the 4 and also the 400 all have a 64-bit CPU, but the Raspberry Pi OS still works with 32-bit by default for compatibility reasons.

What is the benefit of 64-bit?

To take full advantage of the capabilities of a 64-bit CPU, you should also run a 64-bit operating system on it. This can speed up some calculations considerably.

A 64-bit operating system can also run 32-bit programs without any problems, so you usually don't have any disadvantages due to software that doesn't run anymore or similar.

ContainerD Commandline Quicktips

Quicktips for a containerd, ignite, k8s setup

ctr command, and usage with sudo

Containerd command line is called:

$ ctr
@dkdndes
dkdndes / DDD Bounded Context.md
Created January 5, 2022 12:49
DDD Bounded Context in Hexagonal/Onion architecture views

Bounded Context defines the scope of a domain model, i.e., it encompasses the business logic for a particular domain.

The inner core is assumed to remain consistent as long as the business use case does not change.

All outer layers are always assumed to change over time, i.e., they are only binding for the current point in time, e.g., when the technology used has reached its final stage of maturity and/or is overtaken by new innovations.

The interfaces/connectors define the interaction between the relevant (data, technology, business, etc.) layers of the domain model.

@dkdndes
dkdndes / Docker Compose + NATS example
Created January 3, 2022 13:40 — forked from wallyqs/Docker Compose + NATS example
NATS Docker blog post/HTTP Server
FROM golang:1.6.2
COPY . /go
RUN go get github.com/nats-io/nats
RUN go build api-server.go
EXPOSE 8080
ENTRYPOINT ["/go/api-server"]