Skip to content

Instantly share code, notes, and snippets.

@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 May 5, 2024 03:14 — 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 / 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..!
@matt2005
matt2005 / _readme.md
Created September 13, 2017 19:46 — forked from ajfisher/_readme.md
Auto WiFi detection and hotspot creation in boot for RPI

Auto WiFi detection or wifi hostpot creation during boot for RPI

Note: These are rough notes and there may be some variance as versions of raspbian get updated but should be pretty reliable as a guide.

This gist provides some instructions and config in order to have your Raspberry PI automatically connect to a roamed network, however if it fails to discover an available network it will set itself up as a wireless access point for you to connect to.

@matt2005
matt2005 / add-function-with-param.ps1
Created June 23, 2017 09:17 — forked from sayedihashimi/add-function-with-param.ps1
PowerShell: Add a function with a parameter to an object
$result | Add-Member -MemberType ScriptMethod ExpandString -Value {
[cmdletbinding()]
param(
[Parameter(
Mandatory=$true)]
[string]
$unexpandedValue
)
process{
if($this.ProjectInstance){