Skip to content

Instantly share code, notes, and snippets.

View andrewpsp's full-sized avatar

Andrew Thompson andrewpsp

View GitHub Profile
function main {
clear;
if [[ "$(uname)" == "Darwin" ]]; then
echo "Sorry this is not a linux machine - it's Mac OS computer.";
echo "See: https://interfaceware.atlassian.net/wiki/x/RYDan";
echo "For step by step instructions on how to get a linux machine.";
return;
fi
@andrewpsp
andrewpsp / schema_config.json
Created September 18, 2023 17:33
YAML schema validation
{
"definitions": {
"AchievementDetail": "https://static.docs.com/ui/latest/schemas/AchievementDetail.schema.json",
"Achievements": "https://static.docs.com/ui/latest/schemas/Achievements.schema.json",
"AppliedSkills": "https://static.docs.com/ui/latest/schemas/AppliedSkills.schema.json",
"Architecture": "https://static.docs.com/ui/latest/schemas/Architecture.schema.json",
"Assessment": "https://static.docs.com/ui/latest/schemas/Assessment.schema.json",
"AssessmentsHome": "https://static.docs.com/ui/latest/schemas/AssessmentsHome.schema.json",
"AzureCLIGroup": "https://static.docs.com/ui/latest/schemas/AzureCLIGroup.schema.json",
"Banner": "https://static.docs.com/ui/latest/schemas/Banner.schema.json",
@andrewpsp
andrewpsp / Dockerfile
Created August 30, 2023 05:16
Build of the Dockerfile for the webscript driver environment certififcation condiitons.
FROM openfaas/classic-watchdog:latest as watchdog
FROM selenium/standalone-chrome:latest
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog
COPY business_object_certification.py .
CMD ["fwatchdog"]
@andrewpsp
andrewpsp / Vagrantfile
Created July 13, 2023 20:56
Kubernetes 1.27 VagrantFile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/jammy64"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.provision "shell", inline: <<-SHELL
#!bin/sh
-x
echo "Single Node Cluster With Monitoring"
curl -X POST -H 'Content-Type: application/json' \
-H 'Authorization: Bearer '$TOKEN'' \
-d '{"name":"ubuntu-s-4vcpu-8gb-amd-nyc1-01",
"size":"s-4vcpu-8gb-amd",
"region":"nyc1",
did:3:kjzl6cwe1jw149e5mcwi1c2ebrrcqwd4wu4opnjrcq0j93eqk38vf2bqgm4xeww
gcloud services enable \
compute.googleapis.com \
container.googleapis.com \
iam.googleapis.com \
servicemanagement.googleapis.com \
cloudresourcemanager.googleapis.com \
ml.googleapis.com \
meshconfig.googleapis.com
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/Untittled
@andrewpsp
andrewpsp / jq to filter by value.md
Created September 9, 2019 03:18 — forked from ipbastola/jq to filter by value.md
JQ to filter JSON by value

JQ to filter JSON by value

Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'

Example: To get json record having _id equal 611

cat my.json | jq -c '.[] | select( ._id | contains(611))'

Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)

@andrewpsp
andrewpsp / gist:c0c01cca5acd6364bbefc1068e662c7a
Created August 12, 2019 21:25
2019 release - binance API - python
python-binance Documentation
Release 0.2.0
Sam McHardy
Aug 12, 2019
Contents
1 Note 1
2 Features 3
3 Quick Start 5
4 Donate 7