Skip to content

Instantly share code, notes, and snippets.

View dkdndes's full-sized avatar

Peter dkdndes

View GitHub Profile
#!/bin/sh
# check if pyenv is available
# edit: fixed redirect issue in earlier version
if which pyenv >/dev/null 2>&1; then
# assumes default location of brew in `/usr/local/bin/brew`
/usr/bin/env PATH="${PATH//$(pyenv root)\/shims:/}" /usr/local/bin/brew "$@"
else
/usr/local/bin/brew "$@"
fi
A-OLs - Administrators On-Line
AAMOF - As A Matter Of Fact
ADN - Any Day Now
AFAIC - As Far As I'm Concerned
AFAIK - As Far As I Know
AFAIR - As Far As I Remember
AFJ - April Fools Joke
AFK - Away From the Keyboard
AISI - As I See It
ANFAWFOS - And Now For A Word From Our Sponsor
@dkdndes
dkdndes / ascii_art_utf8
Created January 18, 2021 19:18
Ascii Art in one line (utf8)
©️ Copyright Sign
®️ Registered Sign
‼️ Double Exclamation Mark
⁉️ Exclamation Question Mark
™️ Trade Mark Sign
ℹ️ Information Source
↔️ Left Right Arrow
↕️ Up Down Arrow
↖️ North West Arrow
↗️ North East Arrow
"""Utils for the media files."""
from django.conf import settings
from django.contrib.sites.models import Site
from django.utils.functional import lazy
def generate_abs_media_url():
"""Return the absolute media URL.

API Gateway Definition

An API gateway is defined as an access management that is placed in front of an API (application programming interface) and is the single point of access for defined back-end APIs or even microservices (which can be internal or external).

Sitting in front of the APIs, the API Gateway acts as a "protector" that

a) enforces security and 

b) allows scalability and 
@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"]
@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.

ContainerD Commandline Quicktips

Quicktips for a containerd, ignite, k8s setup

ctr command, and usage with sudo

Containerd command line is called:

$ ctr

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.

@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: