Skip to content

Instantly share code, notes, and snippets.

View shakahl's full-sized avatar
:electron:

Soma Szelpal shakahl

:electron:
  • Platform whisperer @ Shakahl Ltd. • Made GitLab AutoDevOps work on GitHub • DevOps’d the hell out of DiNG • Metaverse pipelines @ nextearth.io • Used to scrub fraud on Jasmin at Docler
  • Budapest, Hungary
  • 12:41 (UTC +02:00)
  • LinkedIn in/somaszelpal
  • X @szelpalsoma
  • Facebook szelpalsoma
  • Instagram szelpalsoma
View GitHub Profile
@shakahl
shakahl / base_test.ps1
Created August 13, 2025 14:35 — forked from Luiz-Monad/base_test.ps1
how-to-normalize-a-path-in-powershell
# Clear-Host
Import-Module Pester
# New-Item -ItemType Directory 'a/b' -Force -ErrorAction Ignore
# New-Item -ItemType Directory 'c' -Force -ErrorAction Ignore
# New-SmbShare -Name "Shared" -Path "./shared" -FullAccess "Everyone"
$ErrorActionPreference = 'Stop'
$PesterPreference = [PesterConfiguration]::Default
$PesterPreference.Output.StackTraceVerbosity = 'None'
@shakahl
shakahl / clients.md
Created July 25, 2025 14:32 — forked from defunkt/clients.md
A list of Gist clients.

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

@shakahl
shakahl / WSL2GUIWSLg-XWayland-en.md
Created July 25, 2025 14:32 — forked from tdcosta100/WSL2GUIWSLg-XWayland-en.md
A tutorial to use GUI in WSL2/WSLg replacing original Xorg by Xwayland, allowing WSL to work like native Linux, including login screen

Full desktop shell in WSL2 using WSLg (XWayland)

Note

If you want to use Wayland in WSLg in a simpler setup, you can try the WSLg (Wayland) tutorial.

In this tutorial, we will setup GUI in WSL2. No additional software outside WSL (like VcXsrv or GWSL) is required. You will find this tutorial very similar to the one that replaces Xorg with Xvnc. Indeed, it's pretty much the same tutorial, with some few changes.

The key component we need to install is the desktop metapackage you want (GNOME, KDE, Xfce, Budgie, etc), and after that, replace the default Xorg by a script that calls Xwayland instead.

For this setup, I will use Ubuntu 24.04, and install GNOME Desktop. Unfortunately older versions of Ubuntu lack some fundamental things, so we cannot reproduce it in older versions (at least not fully). Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the [Sample screenshot

@shakahl
shakahl / download_chromedriver.py
Created July 23, 2025 14:16 — forked from jslay88/download_chromedriver.py
Download Latest chromedriver. Win/Linux/Mac. 32/64bit
import os
import re
import zipfile
import logging
import requests
import xml.etree.ElementTree as ET
from io import BytesIO
@shakahl
shakahl / upload_file_ftp.py
Created July 23, 2025 14:16 — forked from jslay88/upload_file_ftp.py
Simple utility to upload a file via FTP - Python
#!/usr/bin/env python
import ntpath
import argparse
from ftplib import FTP
def upload_file(host, port,
username, password,
file_path, remote_path):
@shakahl
shakahl / k8s-etcd-backup.yaml
Created July 23, 2025 14:16 — forked from jslay88/k8s-etcd-backup.yaml
k8s cronjob for doing daily backups of etcd from a master.
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: etcd-backup
namespace: kube-system
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
@shakahl
shakahl / gen_kube_secret.py
Created July 23, 2025 14:16 — forked from jslay88/gen_kube_secret.py
Create k8s Secret YAML
#!/usr/bin/env python3
import base64
from getpass import getpass
def create_secret_yaml(secret_name, **kwargs):
"""
Create k8s Secret Yaml with key: value
Value must already be base64 encoded and in utf-8 encoded bytes
@shakahl
shakahl / docker-tls.yml
Created July 23, 2025 14:15 — forked from jslay88/docker-tls.yml
Ansible Playbook for configuring Docker TLS
---
- name: Setup Docker engine with specific configuration and secure TCP socket
hosts: all
become: yes
vars:
ca_key: /etc/docker/ssl/ca-key.pem
ca_cert: /etc/docker/ssl/ca.pem
server_key: /etc/docker/ssl/server-key.pem
server_cert: /etc/docker/ssl/server-cert.pem
client_key: /etc/docker/ssl/client-key.pem
@shakahl
shakahl / install_openlens.sh
Created July 23, 2025 12:52 — forked from teefax/install_openlens.sh
Build and Install OpenLens
#!/bin/bash
install_deps_windows() {
echo "Installing Build Dependencies (Windows)..."
choco install -y make visualstudio2019buildtools visualstudio2019-workload-vctools
}
install_deps_darwin() {
echo "Installing Build Dependencies (Darwin)..."
xcode-select --install
@shakahl
shakahl / install_openlens.sh
Created July 23, 2025 12:52 — forked from jslay88/install_openlens.sh
Build and Install OpenLens
#!/bin/bash
install_deps_windows() {
echo "Installing Build Dependencies (Windows)..."
choco install -y make visualstudio2019buildtools visualstudio2019-workload-vctools
}
install_deps_darwin() {
echo "Installing Build Dependencies (Darwin)..."
xcode-select --install