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!

@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active July 3, 2024 20:33
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@redmcg
redmcg / kubedf
Last active July 3, 2024 20:55
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 June 7, 2024 14:57
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/"