Skip to content

Instantly share code, notes, and snippets.

View jdiverp's full-sized avatar

Jonathan Pass jdiverp

View GitHub Profile
@jdiverp
jdiverp / gws_search.py
Created January 29, 2019 08:01
GWS search widget with time output
#!/usr/bin/python
import httplib
import xml.dom.minidom
import sys
import time
GWS_HOST = 'eval.groups.uw.edu'
GWS_HOST = 'groups.uw.edu'
GWS_HOST = 'iam-ws.u.washington.edu'
GWS_PORT = 7443
#!/usr/bin/python
import httplib, ssl, socket
import datetime
import urllib2
import json
import sys
PWS_PORT = 443
PWS_HOST = 'wseval.s.uw.edu'
PWS_HOST = 'ws.admin.washington.edu'
@jdiverp
jdiverp / nws_sub-status.py
Created February 6, 2020 16:16
Use NWS to get subscription status and permit for a given uw netid
#!/usr/bin/python
import argparse
import httplib
import sys
import time
import json
NWS_HOST = 'uwnetid.washington.edu'
NWS_PORT = '443'
NWS_BASE = '/nws/v1'
#!/usr/bin/python
"""Set moderator settings for UW Medicine HR Lists
This script takes a predefined csv file of mail lists and
a seperate config file of important people and adjusts
settings accordingy
Usage: %(PROGRAM)s [options]
@jdiverp
jdiverp / uforward_dental.py
Last active November 7, 2023 15:35
SOD compliance report
#!/usr/bin/python
import fileinput, string, sys, re, httplib, json
import time, datetime, os
GWS_HOST = 'groups.uw.edu'
GWS_PORT = '443'
GWS_BASE = '/group_sws/v3'
KEY_FILE = '/usr/local/ssl/certs/email-compliance-report.cac.washington.edu.key'
@jdiverp
jdiverp / reset_identity_tests.sh
Last active August 12, 2020 18:58
Retest script for Identity.UW
#!/bin/bash
#https://gist.github.com/jdiverp/9d27e77aba4c9d0e2b5a11ddbe0f3748
MU='/usr/local/etc/mu -c /dd01/pass/.cconfig -h mango-eval.u.washington.edu -v -y'
clear_netids () {
REG=$1
echo Looking at NetID for RegID: $REG
NETID=`echo "seluwn reg=$REG" | $MU | sed -r 's/[[:alnum:]_]+=/\n&/g ; s/[()]//g'|egrep '^uwnetid=' |cut -d "=" -f 2`
echo Deleting NETID\(s\): $NETID
STAT=`for ids in $NETID; do echo "deluwn uwnetid=$ids -force" |$MU; done`
USE [UABilling]
GO
/****** Object: Table [dbo].[Rates] Script Date: 8/7/2020 17:28:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
#!/usr/bin/python
"""Set moderator settings for UW Medicine HR Lists
This script takes a predefined csv file of mail lists and
a seperate config file of important people and adjusts
settings accordingy
Usage: %(PROGRAM)s [options]
#!/usr/bin/python2
import httplib
import sys
import time
import json
import argparse
import urllib
import csv
GWS_HOST = 'eval.groups.uw.edu'
@jdiverp
jdiverp / stilpo_compare.sh
Last active March 7, 2023 23:06
check all 5 stilpos
#!/bin/bash
HOSTBASE=stilpo31
HOSTLIST='stilpo32 stilpo33 stilpo34 stilpo35 stilpo36 stilpo37'
export LDAPRC=.ldaprc_grp
export HOME=~pass
LDAPSEARCH='/usr/bin/ldapsearch -Q -LLL -o ldif-wrap=no'
SEARCH="$1 $2 $3"
echo ldapsearch $SEARCH