Skip to content

Instantly share code, notes, and snippets.

View tomaustin700's full-sized avatar
🏠
Working from home

Tom Austin tomaustin700

🏠
Working from home
View GitHub Profile
export default {
async fetch(request, env, ctx) {
const cacheUrl = new URL(request.url);
const response = await fetch(request.url, { method: 'HEAD' })
async function gatherResponse(response) {
return response.status;
{
"mode": "All",
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.SQL/servers/databases"
},
{
/*
* For this example, connect your X9C103P (or the like) as follows:
* 1 - INC - Arduino pin 2
* 2 - U/D - Arduino pin 3
* 3 - VH - 5V
* 4 - VSS - GND
* 5 - VW - Output: Arduino pin A0 for analogRead
* 6 - VL - GND
* 7 - CS - Arduino pin 4
@tomaustin700
tomaustin700 / controller.json
Created August 28, 2023 15:21
Midi Controller Json Example
{
"Channel": 11,
"Presets": [
{
"Name": "Test1",
"Switch1": {
"CC": [
{
"CC": 1,
"Value": 127
#include <MIDI.h>
// Define the MIDI input pin, MIDI out channel, and the two relay output pins
#define RELAY_PIN_1 3
#define RELAY_PIN_2 2
// Create MIDI, relay, and MIDI out objects
MIDI_CREATE_DEFAULT_INSTANCE();
const int relay_pins[] = { RELAY_PIN_1, RELAY_PIN_2 };
@tomaustin700
tomaustin700 / gist:af3a11fb4434e29d8ac85c8e9a4027bc
Created December 14, 2021 11:42 — forked from metaskills/gist:893599
A Copy Of sp_MSforeachtable Stored Procedure For Azure, Uses sp_MSforeach_worker
CREATE proc [dbo].[sp_MSforeachtable]
@command1 nvarchar(2000), @replacechar nchar(1) = N'?', @command2 nvarchar(2000) = null,
@command3 nvarchar(2000) = null, @whereand nvarchar(2000) = null,
@precommand nvarchar(2000) = null, @postcommand nvarchar(2000) = null
AS
declare @mscat nvarchar(12)
select @mscat = ltrim(str(convert(int, 0x0002)))
if (@precommand is not null)
exec(@precommand)
@tomaustin700
tomaustin700 / deployment.yaml
Created March 13, 2021 16:03
GridMaxSessions
apiVersion: apps/v1
kind: Deployment
metadata:
name: selenium-hub
labels:
app: selenium-hub
spec:
replicas: 1
selector:
matchLabels:
@tomaustin700
tomaustin700 / ingress.yaml
Created March 27, 2020 16:05
Basic ingress configuration for an AKS instance
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress
namespace: ingress-basic
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/use-regex: "true"
spec:
rules:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress
namespace: ingress-basic
annotations:
kubernetes.io/ingress.class: nginx
certmanager.k8s.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/use-regex: "true"
# nginx.ingress.kubernetes.io/rewrite-target: /$2
import (
"fmt"
"time"
)
const INTERVAL_PERIOD time.Duration = 24 * time.Hour
const HOUR_TO_TICK int = 23
const MINUTE_TO_TICK int = 00
const SECOND_TO_TICK int = 03