Skip to content

Instantly share code, notes, and snippets.

View mloskot's full-sized avatar
🏠
Working from home

Mateusz Łoskot mloskot

🏠
Working from home
View GitHub Profile

Hexagonal Architecture

From https://www.golinuxcloud.com/hexagonal-architectural-golang/

Hexagonal Architecture Components

  1. Core Business Logic: This is the central component of the architecture, and it contains the application's core domain logic. This component should be independent of any external systems and should not be affected by changes in the infrastructure or the user interface.
  2. Adapters: These are the components that connect the core business logic to the external systems. They can be thought of as the "ports" through which the application communicates with the outside world. Adapters can take many forms, including APIs, databases, user interfaces, and messaging systems.
@rnemeth90
rnemeth90 / getPodCountPerNode.sh
Created October 7, 2022 19:17
Kubernetes: Get Count of Pods per Node
nodes=$(kubectl get nodes --no-headers | awk '{print $1}')
for n in ${nodes[@]}; do
pods=$(kubectl get pod -A --field-selector spec.nodeName=$n --no-headers | awk '{print $2}')
echo $n = $(echo $pods | wc -w)
done
@nicolaskopp
nicolaskopp / killDocker.md
Last active February 28, 2025 01:02
How to delete `C:\ProgramData\Docker` and fixing "Access denied" errors

How to delete C:\ProgramData\Docker and fixing "Access denied" errors

I created this gist on May 25, 2021. It is still an issue as of February 7th, 2025. Welcome to the future of web development. Take this Gist to rest and calm down.

Here is how to delete C:\ProgramData\Docker.

  1. Uninstall docker the normal way (yeah you may have already done that)
  2. Copy this:
@dims
dims / README.md
Last active March 30, 2025 21:48
Kubernetes Resources
@maxkoshevoi
maxkoshevoi / download-latest-release.ps1
Created April 9, 2021 18:05
Download latest GitHub release via Powershell
$repoName = "PowerShell/PowerShell"
$assetPattern = "*-win-x64.msi"
$extractDirectory = "C:\Users\Public\Downloads"
$releasesUri = "https://api.github.com/repos/$repoName/releases/latest"
$asset = (Invoke-WebRequest $releasesUri | ConvertFrom-Json).assets | Where-Object name -like $assetPattern
$downloadUri = $asset.browser_download_url
$extractPath = [System.IO.Path]::Combine($extractDirectory, $asset.name)
@mrl22
mrl22 / README.md
Last active May 26, 2022 12:38
Install and run IBM SPSS Licensing Manager as a systemctl / systemd service on RHEL / Debian Linux

wget https://softy.cac.washington.edu/spss/new/spss28/SPSSCLT9.9_-_LicMgrLinuxx86-64_En.gz

tar xvfz SPSSCLT9.9_-_LicMgrLinuxx86-64_En.gz

mkdir -p /opt/IBM/SPSS/Concurrent_Licensing_Tools/9.9.0/License_Manager

@ebta
ebta / install db driver php.md
Last active January 29, 2023 16:59
Install database driver extension (PosgreSQL, MS SQL, Oracle) di PHP - Ubuntu Server

Proses-proses berikut awalnya (utamanya) dijalankan di Ubuntu 20.04 dengan PHP 7.4, tetapi harusnya bisa diterapkan di versi selainnya.

Install Driver PosgreSQL

  1. Install driver PDO PgSQL, Default akan menginstall sesuai versi php, misalnya berikut ini akan install php7.4-pgsql. Setelah install, biasanya langsung aktif tanpa perlu restart php
sudo apt install php-pgsql

Install Driver SQL Server

@berkant
berkant / cloud-init.cfg
Last active January 18, 2025 07:43
Cloud-init config to set up my Ubuntu dev machine.
## template: jinja
#cloud-config
{% if v1.distro_release == 'focal' %}
users:
- name: berkant
shell: /usr/bin/bash
ssh_import_id: gh:berkant
sudo: ALL=(ALL:ALL) NOPASSWD:ALL
@mattmahn
mattmahn / README.md
Last active December 4, 2024 18:16
Terraform: Get current Git commit SHA

This will return the full Git commit SHA of whichever branch is currently checkedout.

Dump the snippet into terraform console (run from within a Git repo) to see for yourself.

@JohnStrunk
JohnStrunk / rename-pvc.sh
Last active January 20, 2025 13:36
"Rename" a bound PVC
#! /bin/bash
set -e -o pipefail
function usage {
cat - <<USAGE
Usage:
$0 -n namespace -s source -d destination
USAGE
}