Biometric Cabinet Lock

February 4th, 2021

Wall Mount Android Tablet for Home Assistant

February 3rd, 2021

Open Cygwin at a specific folder

February 3rd, 2021

The easiest way to do this is open up a Cygwin terminal (as an administrator) and type the command:

chere -i -t mintty -s bash

If the icon doesn't show, you can use the following (Windows 10) from within a cygwin window:

regtool -w -s set /HKCU/Software/Classes/Drive/Shell/cygwin64_bash/Icon 'C:\cygwin64\Cygwin-Terminal.ico'
regtool -w -s set /HKCU/Software/Classes/Drive/Background/Shell/cygwin64_bash/Icon 'C:\cygwin64\Cygwin-Terminal.ico'
regtool -w -s set /HKCU/Software/Classes/Directory/Shell/cygwin64_bash/Icon 'C:\cygwin64\Cygwin-Terminal.ico'
regtool -w -s set /HKCU/Software/Classes/Directory/Background/Shell/cygwin64_bash/Icon 'C:\cygwin64\Cygwin-Terminal.ico'

And to remove the icon:

regtool -w unset /HKCU/Software/Classes/Directory/Shell/cygwin64_bash/Icon
regtool -w unset /HKCU/Software/Classes/Directory/Background/Shell/cygwin64_bash/Icon
regtool -w unset /HKCU/Software/Classes/Drive/Shell/cygwin64_bash/Icon
regtool -w unset /HKCU/Software/Classes/Drive/Background/Shell/cygwin64_bash/Icon

If you don't have admin privileges, you can do the following:

Go to your "Send To" folder

C:\Users\<your_user_name>\AppData\Roaming\Microsoft\Windows\SendTo

Create a shortcut "Bash Here" with this target:

C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico C:\cygwin\bin\bash.exe -l -c "cd \"$0\" ; exec bash"

OpenVPN Certificates

February 2nd, 2021

Suddenly all my OpenVPN connections stopped working.  Turns out that the signing certificate expired (took some doing to figure this out).  Here are some links dealing with OpenVPN certificates (and certificates in general)

How to change CA certificate validity period
OpenVPN - expired certificates
Dumping SSL certificate information
Extend validity of a OpenVPN certificate
Easy-RSA v3 OpenVPN Howto
Easy-TLS
How to decrypt an OpenVPN EasyRSA Encrypted Private Key
Generate OpenVPN Certificates and Keys

For PEM, use the following:

openssl x509 -text -in cert.pem

For PKCS#12, use this:

openssl pkcs12 -info -in cert.pfx

To dump a CSR (Certificate Signing Request), use this:

openssl req -text -in request.csr

To dump/check a private key:

openssl rsa -text -noout -in key.pem

Ford F250 Wiring Information

February 2nd, 2021

I added a backup camera to the truck and to do so, I needed to hook into the reverse switch to make it automatically switch to the camera when put in reverse.  Here are a couple links to wiring diagrams that helped out.  

1993 F150XLT 5.8L info on backup wiring
'93 Bronco Firewall Connectors