Skip to content

Instantly share code, notes, and snippets.

View ryanhoskin's full-sized avatar

Ryan Hoskin ryanhoskin

View GitHub Profile
@ryanhoskin
ryanhoskin / snooze
Last active February 11, 2016 17:03
$pd_headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$pd_headers.Add("Authorization", 'Token token=<rest_api_token>')
$pd_url = "https://<subdomain>.pagerduty.com/api/v1"
$requester_id = "<requester_id>"
$incident_id = "<incident_id>"
$duration = "900" //in seconds
$data = @{
requester_id="$requester_id"
@ryanhoskin
ryanhoskin / get_users.py
Last active February 20, 2025 19:16
Export a list of your PagerDuty users to a CSV file
#Export a list of all users to a CSV file.
#This script is not supported by PagerDuty.
#!/usr/bin/env python
import datetime
import requests
import sys
import csv
:loop
@echo off
date /t >> test_mx.log
time /t >> test_mx.log
nslookup -type=MX foo.pagerduty.com >> test_mx.log
time /t >> test_mx.log
nslookup -type=MX foo.pagerduty.com 8.8.8.8 >> test_mx.log
time /t >> test_mx.log
nslookup -type=MX -d2 foo.pagerduty.com >> test_mx.log
time /t >> test_mx.log
#!/bin/bash
while true; do
dig foo.pagerduty.com mx >> ./test_mx.log
dig @8.8.8.8 foo.pagerduty.com mx >> ./test_mx.log
dig foo.pagerduty.com mx +trace >> ./test_mx.log
sleep 5
done
#!/usr/bin/python
import requests
import sys
import json
from datetime import date
import pprint
#Your PagerDuty API key. A read-only key will work for this.
auth_token = 'API_KEY_HERE'
@ryanhoskin
ryanhoskin / Sampleapp.swift
Created April 22, 2022 17:18
A basic integration to Instabug
import SwiftUI
import Instabug
@main
struct Test_6App: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
var body: some Scene {
WindowGroup {
ContentView()
}