Skip to content

Instantly share code, notes, and snippets.

@matt2005
matt2005 / Event Error Sample
Created July 12, 2023 22:24
ZED-FULL not opening and creating Event log entry The process was terminated due to an unhandled exception. Exception Info: System.Xml.XmlException
Application: Zed-FULL.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Xml.XmlException
at System.Xml.XmlTextReaderImpl.Throw(System.Exception)
at System.Xml.XmlTextReaderImpl.Throw(System.String, System.String[])
at System.Xml.XmlTextReaderImpl.ParseText(Int32 ByRef, Int32 ByRef, Int32 ByRef)
at System.Xml.XmlTextReaderImpl.ParseText()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
@matt2005
matt2005 / ChromeWebDriver.py
Last active June 10, 2022 12:28 — forked from bcarroll/ChromeWebDriver.py
Selenium Python - Get HTTP Status Code
"""
Implementation of the Selenium Chrome WebDriver
with HTTP Response data included via the ChromeDriver performance logging capability
https://sites.google.com/a/chromium.org/chromedriver/logging/performance-log
The ChromeWebDriver response attribute(s) contain a dict with information about the response
{
"connectionId": [Integer],
"connectionReused": [Boolean],
"encodedDataLength": [Integer],
@matt2005
matt2005 / qtrpi-cross-compile.md
Created December 8, 2021 20:32 — forked from kelixlabs/qtrpi-cross-compile.md
Cross-compiling Qt for HW accelerated OpenGL with eglfs on Raspbian and setting up Qt Creator

QT-Raspi Cross Compile

Prepare the Raspberry Pi:

Install raspbian

Get the latest raspbian image here

Enable deb-src repos

@matt2005
matt2005 / README.md
Created February 9, 2020 23:02 — forked from squidpickles/README.md
Multi-platform (amd64 and arm) Kubernetes cluster

Multiplatform (amd64 and arm) Kubernetes cluster setup

The official guide for setting up Kubernetes using kubeadm works well for clusters of one architecture. But, the main problem that crops up is the kube-proxy image defaults to the architecture of the master node (where kubeadm was run in the first place).

This causes issues when arm nodes join the cluster, as they will try to execute the amd64 version of kube-proxy, and will fail.

It turns out that the pod running kube-proxy is configured using a DaemonSet. With a small edit to the configuration, it's possible to create multiple DaemonSets—one for each architecture.

Steps

Follow the instructions at https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/ for setting up the master node. I've been using Weave Net as the network plugin; it see

@matt2005
matt2005 / docker-compose.yml
Created November 29, 2019 14:46 — forked from odinserj/docker-compose.yml
ProGet using docker compose
version: '2'
services:
nginx:
image: jwilder/nginx-proxy
container_name: nginx-proxy
environment:
- DEFAULT_HOST=nuget.hangfire.io
links:
- proget
ports:
@matt2005
matt2005 / lambda_function.py
Last active November 10, 2024 13:01 — forked from awarecan/lambda_function.py
Alexa Smart Home Skill Adapter for Home Assistant
"""
Copyright 2019 Jason Hu <awaregit at gmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@matt2005
matt2005 / greenhouse-v2.ino
Created April 15, 2019 13:01 — forked from rupl/greenhouse-v2.ino
Så Ett Frö — Greenhouse v2, June 2017
/**
* Code to run a basic automatic greenhouse.
*
* - Temp/humidity sensor
* - Soil moisture sensor
* - Water pump
* - Ventilation fan
*
* @see http://saettfro.com/vaxthus/
*/
@matt2005
matt2005 / Hydroponicsmeasure.ino
Created November 9, 2018 21:49 — forked from pingud98/Hydroponicsmeasure.ino
Hydroponics measurement system for Arduino
/*
* Hydroponics system monitor
* J. Devine
* Runs on Arduino Pro 5V
* Sensors:
* DFRobot pHmeter V1.1
* Waterproof DS18B20 water temperature sensor
* TMP36 air temperature sensor
* HC-SR04 distance sensor (for water level..)
* A european two pin plug for EC measurements
@matt2005
matt2005 / LookupO365Sku.ps1
Created July 4, 2018 16:01
Lookup for O365 SKU to display name
function LookupO365Sku
{
[CmdletBinding()]
param
(
[string]
$Sku
)
$skus = [Ordered] @{
@matt2005
matt2005 / rtsp-rtp-sample.py
Created June 13, 2018 22:15 — forked from jn0/rtsp-rtp-sample.py
Sample Python script to employ RTSP/RTP to play a stream from an IP-cam (from stackoverflow)
"""
http://stackoverflow.com/questions/28022432/receiving-rtp-packets-after-rtsp-setup
A demo python code that ..
1) Connects to an IP cam with RTSP
2) Draws RTP/NAL/H264 packets from the camera
3) Writes them to a file that can be read with any stock video player (say, mplayer, vlc & other ffmpeg based video-players)
Done for educative/demonstrative purposes, not for efficiency..!