Skip to content

Instantly share code, notes, and snippets.

View justynroberts's full-sized avatar
🏠
Working from wherever.

Justyn Roberts justynroberts

🏠
Working from wherever.
View GitHub Profile
@justynroberts
justynroberts / docker-compose.yml
Created February 11, 2025 13:02
Rundeck Deployment
version: '3.8'
services:
rundeck:
platform: linux/amd64
image: rundeck/rundeck:5.9.0
container_name: rundeck
restart: unless-stopped
ports:
- "4440:4440"
@justynroberts
justynroberts / main.py
Created February 2, 2025 16:08
Simple Webcam
import argparse
import asyncio
import json
import logging
import ssl
import uuid
import datetime
import socket
import cv2
from aiohttp import web
@justynroberts
justynroberts / analyze.sh
Last active November 9, 2024 17:01
OpenAI Image - Bash
#!/bin/bash
# www.fintonlabs.com
export OPENAI_API_KEY="ADD_KEY"
check_requirements() {
for cmd in curl base64 mktemp jq; do
if ! command -v "$cmd" > /dev/null; then
echo "Error: Required command '$cmd' is not installed." >&2
exit 1
fi
@justynroberts
justynroberts / sample.json
Created October 24, 2024 11:01
Sample Node-Red Flow for OPC-UA to PagerDuty Events
[
{
"id": "be12058e8765348e",
"type": "switch",
"z": "d7d5b52d.77f328",
"name": "Check Status",
"property": "payload.value",
"propertyType": "msg",
"rules": [
{
@justynroberts
justynroberts / readme.md
Last active June 26, 2024 10:29
Rundeck User Reporting

API Data Fetch and CSV Export Script

This script fetches user data from an API, processes it, writes it to a CSV file, and provides a summary of user activities. The API URL and headers have been sanitized for security purposes.

Features

  • Fetches data from an API.
  • Processes and fills missing data fields.
  • Writes data to a CSV file.
  • Parses datetime fields.
@justynroberts
justynroberts / config.py
Last active February 14, 2024 12:51
Scrape site for ChatGPT Training
# config.py
CONFIG = {
"url": ["https://docs.rundeck.com"], # Assuming list format to potentially handle multiple starting URLs
"match": "https://docs.rundeck.com",
"selector": "*",
"maxPagesToCrawl": 1000,
"outputFileName": "output.json"
}
@justynroberts
justynroberts / main.py
Last active December 5, 2023 08:58
Rundeck Job Governance. (Look for risky patterns and highlight)
import requests
import re
import time
base_url = "https://YOURURL"
headers = {
'X-Rundeck-Auth-token': 'ADDTOKEN',
'Content-Type': 'application/json',
'accept': 'application/json',
}
import socket
import json
import time
from pycololight import PyCololight
from pdpyras import APISession
# Initialize API session
api_key = "ENTERKEY"
session = APISession(api_key)
@justynroberts
justynroberts / DockerFile
Last active September 8, 2023 03:44
Sample Deploy/Customise/Create Runner
ARG RUNNER_VERSION=latest
FROM rundeckpro/runner:${RUNNER_VERSION}
USER root
RUN apt-get update && \
apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
curl \
python3-pip && \
pip3 install --upgrade pip && \
@justynroberts
justynroberts / fireduty.html
Created October 5, 2022 11:31
Big Red Button - Crux edition
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body>
<div class="jumbotron">
<h1 class="display-4">PagerDuty Events 🔥</h1>