Skip to content

Instantly share code, notes, and snippets.

View daryltucker's full-sized avatar

Daryl Tucker daryltucker

  • Neo-Retro Group
  • Salem, Or
View GitHub Profile
@daryltucker
daryltucker / build-python3-wsl.mkd
Last active July 15, 2022 22:47
Build latest stable Python 3.x for WSL (Windows Subsystem for Linux)

The WSL OpenSSL libraries are missing headers, preventing actually using them to compile anything.

  1. Grab OpenSSL source and checkout latest stable version (1.*)
  2. Build and Install OpenSSL
  3. Grab Python source and checkout latest stable version (3.*)
  4. Build and Install Python w. OpenSSL available.

TIP: Be sure to use the \\wsl$\ filesystem, and link out from that, vs creating a sym-link from Windows into WSL. If your git or other operations are slow, look into this.

@daryltucker
daryltucker / vcgencmd.mkd
Created July 8, 2022 15:54
Build vcgencmd

Build/Install Raspberry Pi userland binary & libraries

sudo apt install linux-headers-arm64
git clone https://github.com/raspberrypi/userland.git
cd userland
./buildme --aarch64

cat /etc/profile.d/vc.sh 
PATH="/opt/vc/bin:$PATH"
@daryltucker
daryltucker / FFS Microsoft
Last active June 8, 2022 00:54
Microsoft Thumbprint
# Microsoft "Thumbprint" is just SHA1 Fingerprint.
openssl x509 -noout -fingerprint -sha1 -inform pem -in cert.pem | grep SHA1 | cut -d "=" -f 2 | sed 's/://g'
@daryltucker
daryltucker / av_stream_get_first_dts.patch
Last active May 17, 2022 20:46
/usr/lib/chromium/chromium: symbol lookup error: /usr/lib/chromium/chromium: undefined symbol: av_stream_get_first_
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1128,6 +1128,10 @@ struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
*/
int64_t av_stream_get_end_pts(const AVStream *st);
+// Chromium: We use the internal field first_dts vvv
+int64_t av_stream_get_first_dts(const AVStream *st);
+// Chromium: We use the internal field first_dts ^^^
+
@daryltucker
daryltucker / azure_devops.conf
Created January 3, 2022 16:49
Azure Devops SSH Configuration
Host vs-ssh.visualstudio.com
Hostname vs-ssh.visualstudio.com
User ORGANIZATION_NAME
PubKeyAuthentication yes
IdentityFile ~/.ssh/ORGANIZATION_NAME
IdentitiesOnly yes
PubkeyAcceptedKeyTypes +ssh-rsa
# Azure Devops uses ORGANIZATION_NAME vs git for login
# debug1: send_pubkey_test: no mutual signature algorithm
@daryltucker
daryltucker / node_swap_kubernetes.mkd
Created October 3, 2021 22:00
Allow Node Swap in Kubernetes
@daryltucker
daryltucker / sstp-compile.sh
Last active September 14, 2021 02:44
sstp on Linux for Microsoft Azure VPN Gateway
#!/bin/bash
# Install dependencies
sudo apt install -y git build-essential libevent-dev ppp-dev libssl-dev libevent-dev intltool automake autoconf libglib-dev libglib2.0-dev gnutls gnutls-bin gnutls-dev libgtk3-dev libgtkd-3-dev libgtk-3-dev libnma-dev libsecret1-dev libsecret-1-dev libppp-dev
# Determine pppd version
pppd_version="$(pppd --version 2>&1 | awk '{print $3}')"
# Compile sstp-client
mkdir -p ~/src; cd ~/src
@daryltucker
daryltucker / MTP_Transfer_Issues.mkd
Created March 22, 2021 15:38
LIBUSB_ERROR_TIMEOUT

Error

2021/03/21 13:07:07 FUSE mounted
2021/03/21 13:07:14 0 bytes in 4.118971ms: 0 mb/s
2021/03/21 13:07:30 fatal error LIBUSB_ERROR_TIMEOUT; closing connection.
2021/03/21 13:07:38 AndroidSendPartialObject failed: LIBUSB_ERROR_TIMEOUT
2021/03/21 13:07:38 AndroidSendPartialObject failed: mtp: cannot run operation ANDROID_SEND_PARTIAL_OBJECT, device is not open
2021/03/21 13:07:38 327680 bytes in 24.204842524s: 0 mb/s
2021/03/21 13:07:38 AndroidEndEditObject failed: mtp: cannot run operation ANDROID_END_EDIT_OBJECT, device is not open
@daryltucker
daryltucker / filterwin2k.txt
Created March 15, 2021 17:07
filterwin2k filters out SRV records
Just a note that filterwin2k of dnsmasq nulls out SRV requests.
@daryltucker
daryltucker / LetsEncrypt_FreeIPA_Certificate_Chaining.sh
Last active February 26, 2021 21:43
Add LetsEncrypt chains to FreeIPA for transition to proper CA (Feb 2021)
# Add LetsEncrypt chains to FreeIPA for transition to proper CA (Feb 2021)
# > The full certificate chain is not present in /etc/letsencrypt/live/${DOMAIN}/privkey.pem ...
# > The ipa-server-certinstall command failed.
# Grab Certificates from FreeIPA ( https://letsencrypt.org/certificates/ )
cd /tmp/
wget https://letsencrypt.org/certs/isrgrootx1.pem
wget https://letsencrypt.org/certs/letsencryptauthorityx3.pem
wget https://letsencrypt.org/certs/trustid-x3-root.pem