Skip to content

Instantly share code, notes, and snippets.

@klo2k
klo2k / Windows Oracle ODBC "Test Connection" "SQORA32.dll" error (odbcad32.exe).md
Created June 16, 2022 06:10
Windows Oracle ODBC "Test Connection" "SQORA32.dll" error (odbcad32.exe)

For this error when running "Test Connection":

--------------------------- Testing Connection ---------------------------
Unable to connect
SQLState=IM003
Specified driver could not be loaded due to system error  127: The specified procedure could not be found. (Oracle in instantclient_21_6, C:\Oracle\instantclient_21_6\SQORA32.dll).
--------------------------- OK    ---------------------------

Make sure BOTH 32-bit and 64-bit Microsoft Visual Studio C++ Redistributable runtimes are intalled:

@klo2k
klo2k / git credential store https demo.md
Created April 28, 2022 08:17
Using git credential store for non-interactive operations over https, without exposing password in remote URL (save, retrieve passwords)
@klo2k
klo2k / generate_ssl_keys_csr_certificates.yml
Last active March 24, 2025 16:04
Ansible: Generate key, CSR, self-signed certificate with self-signed CA (simulate real-world process)
---
# Playbook generates key, CSR and self-signed SSL certificates for CA and domain of interest
#
# To run (replace with your own values):
# ```
# ansible-playbook \
# --extra-vars 'cert_common_name=domain.example.com' \
# --extra-vars '{"cert_subject_alt_name":["DNS:*.example.com","DNS:*.subdomain.example.com"]}' \
# generate_ssl_keys_csr_certificates.yml
# ```
@klo2k
klo2k / screenshare part of desktop as virtual monitor (xrandr).md
Last active March 26, 2022 08:47
Create virtual monitor - Screencast share portion of screen via Teams / Google Meet etc...

Create virtual monitor - Screencast share portion of screen via Teams / Google Meet etc...

  1. Create virtual monitor to share, say top-right quarter of my 4k screen
    xrandr --setmonitor CAST-1 1920/1x1080/1+1920+0 none
    
    i.e.
    -----------------------------------------
    |    4k monitor     |   Virtual screen   |
    

| | (to share) |

@klo2k
klo2k / ubuntu20-hyperv-enhanced-session.md
Created February 22, 2022 08:32 — forked from milnak/ubuntu20-hyperv-enhanced-session.md
Verified way of enabling enhanced session in Hyper-V for Ubuntu 20

Setup Hyper-V enhanced session for Ubuntu 20

I couldn't find instructions that were 100% complete, so I put this together.

These instructions worked fine for me. Follow each step carefully.

Download Ubuntu 20.04 desktop

Download Ubuntu Desktop 20.04 LTS from here.

@klo2k
klo2k / gist:fe794f107c11292ba47b4d052c547983
Created February 12, 2022 08:01
Install virt-manager in Windows 11 WSL (qemu, Windows Subsystem for Linux)
# Inside WSL...
# Install virt-manager
sudo apt install -y virt-manager
# Add youself to kvm and libvirt group
sudo usermod --append --groups kvm,libvirt "${USER}"
# Fix-up permission to avoid "Could not access KVM kernel module: Permission denied" error
sudo chown root:kvm /dev/kvm
@klo2k
klo2k / gist:a5032b58f87c4868f1aaec0d050c8bc2
Created March 17, 2018 14:03
Certbot automated certificate renew via DNS-01 method, with Duck DNS (and Stunnel) (SSL, let's encrypt, letsencrypt)
## Setup
certbot certonly --manual --preferred-challenges dns -m [email protected] --agree-tos --manual-public-ip-logging-ok -d example.com
## Renewal scripts
cat > /root/authhook.sh <<'EOF'
#!/bin/bash
/bin/echo url="https://www.duckdns.org/update?domains=${CERTBOT_DOMAIN}&token=YOUR_DUCKDNS_TOKEN&txt=${CERTBOT_VALIDATION}"|/usr/bin/curl -s -K -
EOF
chmod 700 /root/authhook.sh