Skip to content

Instantly share code, notes, and snippets.

View scriptsandthings's full-sized avatar

Scripts and Things scriptsandthings

  • Columbus, OH
View GitHub Profile
@scriptsandthings
scriptsandthings / migrateAdlistToAdguard.py
Created February 13, 2024 16:29 — forked from Kapujino/migrateAdlistToAdguard.py
This script adds a plain list of adlists to the adguard configuration AdGuardHome.yaml
#!/usr/bin/python3
import yaml
# load AdGuardHome.yaml
with open('AdGuardHome.yaml', 'r') as file:
data = yaml.load(file, Loader=yaml.FullLoader)
# load file with adlist sources
with open('adlists.txt', 'r') as file:
@scriptsandthings
scriptsandthings / sync_jcds_local_dp.zsh
Created May 23, 2024 21:49 — forked from lazymacadmin/sync_jcds_local_dp.zsh
A script to sync an on-premise distribution from your JCDS
#!/bin/zsh
## Bits shamelessly borrowed from Graham Pugh - https://gist.github.com/grahampugh/836547859c18fefe1dba6ba8c093accc
## Then reversed to only pull down files which either do not exist in the DP or whose md5 doesn't match
##
## This script relies on a Jamf API role/client and a local identity file of the following format:
## {"client_name":"test_for_screenshot","client_id":"a7682e67-a276-448b-83af-9c83be5e02f4","client_secret":"ubPrXqRRyc0jRLFOY9iJYGpCjHiJc1M-tRLlCFb9aWZhtqf7iC9UpQG_dO1ZkvNF","grant_type":"client_credentials"}
##
## This is most easily obtained by creating an api client, enabling it and copying the data from the popup, then pasting it into a file
##
##