Skip to content

Instantly share code, notes, and snippets.

View Msouza91's full-sized avatar
🤓

Marcos Souza Msouza91

🤓
View GitHub Profile
@Yukaii
Yukaii / README.md
Created May 24, 2020 16:41
GNU Pass to Bitwarden migration

GNU Pass to Bitwarden migration

  1. Use pass2csv to export generic csv
  2. Add header folder,name,password,comments to first line of that csv file
  3. Use the script to convert file
  4. Import password with "Bitwarden (csv)" format

Remeber to delete your csv file safely once it's imported!

@riccardomc
riccardomc / oidc-thumbprint-regions.sh
Created November 28, 2019 11:19
Extract OIDC provider thumbprint for all AWS Region with EKS support
#!/bin/bash
set -e
if [ ! -z "$DEBUG" ] ; then
set -x
fi
REGIONS="us-east-2
us-east-1
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution.md
Last active June 9, 2025 17:07
Fix DNS resolution in WSL2

Permanent WSL DNS Fix (WSL 2.2.1+)

If you're encountering ping github.com failing inside WSL with a Temporary failure in name resolution, you're not alone — this has been a long-standing issue, especially when using VPNs or corporate networks.

This issue is now fixed robustly with DNS tunneling, which preserves dynamic DNS behavior and avoids limitations like WSL’s former hard cap of 3 DNS servers in /etc/resolv.conf.

DNS tunneling is enabled by default in WSL version 2.2.1 and later, meaning that if you're still seeing DNS resolution issues, the first and most effective fix is simply to upgrade WSL. Upgrading WSL updates the WSL platform itself, but does not affect your installed Linux distributions, apps, or files.

To upgrade WSL, follow these steps,

@redmcg
redmcg / kubedf
Last active May 5, 2025 22:26
Bash script to show k8s PVC usage
#!/usr/bin/env bash
NODESAPI=/api/v1/nodes
function getNodes() {
kubectl get --raw $NODESAPI | jq -r '.items[].metadata.name'
}
function getPVCs() {
jq -s '[flatten | .[].pods[].volume[]? | select(has("pvcRef")) | '\
@kiasaki
kiasaki / readme.md
Last active January 3, 2025 04:59
ubuntu: vboxdrv module signing for secureboot to load it

Since kernel version 4.4.0-20, it was enforced that unsigned kernel modules will not be allowed to run with Secure Boot enabled. Because you want to keep Secure Boot, then the next logical step is to sign those modules.

So let's try it.

Create signing keys

openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=Descriptive name/"