Skip to content

Instantly share code, notes, and snippets.

View benjaminlukeclark's full-sized avatar
:octocat:

Benjamin Clark benjaminlukeclark

:octocat:
View GitHub Profile
@benjaminlukeclark
benjaminlukeclark / sudoblark.py
Last active March 28, 2022 19:55
Silly little summary of myself made for sudoblark.com
class Me(object):
name = "Benjamin Luke Clark"
occupation = "DevOps Engineer"
finished_university = False
university = "Open University"
degree = "Bsc(Honours) Computing and Software (Software)"
hobbies = [
"cycling",
@benjaminlukeclark
benjaminlukeclark / recurring_maintenance_windows.py
Created July 23, 2021 14:44 — forked from lfepp/recurring_maintenance_windows.py
Script to create a number of recurring maintenance windows in PagerDuty
#!/usr/bin/env python
#
# Copyright (c) 2016, PagerDuty, Inc. <info@pagerduty.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
@benjaminlukeclark
benjaminlukeclark / user.log
Last active January 20, 2021 15:34
PagerDuty-PUT-bug-logs
```log
021-01-20T11:33:25.238Z [DEBUG] plugin.terraform-provider-pagerduty_v1.8.0: -----------------------------------------------------
2021-01-20T11:33:25.238Z [DEBUG] plugin.terraform-provider-pagerduty_v1.8.0: 2021/01/20 11:33:25 [DEBUG] PagerDuty - Preparing PUT request to /users/xxxx with body: {"user":{"color":"brown","description":"User account, managed by Terrraform","email":"xxxx","job_title":"xxxx","name":"xxxx","role":"owner","time_zone":"Europe/London"}}
2021-01-20T11:33:25.238Z [DEBUG] plugin.terraform-provider-pagerduty_v1.8.0: 2021/01/20 11:33:25 [DEBUG] PagerDuty API Request Details:
2021-01-20T11:33:25.238Z [DEBUG] plugin.terraform-provider-pagerduty_v1.8.0: ---[ REQUEST ]---------------------------------------
2021-01-20T11:33:25.238Z [DEBUG] plugin.terraform-provider-pagerduty_v1.8.0: PUT /users/xxxx HTTP/1.1
2021-01-20T11:33:25.238Z [DEBUG] plugin.terraform-provider-pagerduty_v1.8.0: Host: api.pagerduty.com
2021-01-20T11:33:25.238Z [DEBUG] plugin.terraform-provider-pagerduty_v1.8.0: User-
#Run this every 1/2 hour and in an 8 hour work day there will be approximately 3 times per day that your victim hears a cat fact
if ((Get-Random -Maximum 10000) -lt 1875) {
Add-Type -AssemblyName System.Speech
$SpeechSynth = New-Object System.Speech.Synthesis.SpeechSynthesizer
$Random = Get-Random -Maximum 200
$CatFact = (ConvertFrom-Json (Invoke-WebRequest -Uri http://www.catfact.info/api/v1/facts.json?per_page=200)).Facts[$Random]
$SpeechSynth.Speak("did you know?")
$SpeechSynth.Speak($CatFact.details)
}