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 / 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
##
##
@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 / README.md
Created May 25, 2023 01:36 — forked from tomdaley92/README.md
Proxmox - SPICE Client setup for MacOS

Proxmox - SPICE client setup for MacOS

  1. Install a working (and compiled) version of virt-viewer. You may view the homebrew package's upstream source on GitHub.

    brew tap jeffreywildman/homebrew-virt-manager
    brew install virt-viewer
  2. Once that's installed should be able make a call remote-viewer with a pve-spice.vv file downloaded from proxmox web interface

@scriptsandthings
scriptsandthings / odbc_on_mac.md
Created April 14, 2023 17:08 — forked from erikvw/odbc_on_mac.md
mysql, ODBC, STATA 16 on MAC (M1 Silicon)
@scriptsandthings
scriptsandthings / odbc_on_mac.md
Created April 14, 2023 17:08 — forked from JonathanWillitts/odbc_on_mac.md
mysql, ODBC, STATA 16 on MAC (M1 Silicon and Intel-based)
@scriptsandthings
scriptsandthings / GPT4all-langchain-demo.ipynb
Created April 11, 2023 01:06 — forked from psychemedia/GPT4all-langchain-demo.ipynb
Example of running GPT4all local LLM via langchain in a Jupyter notebook (Python)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@scriptsandthings
scriptsandthings / Backup-and-Restore-GPG-and-SSH-keys.md
Created April 10, 2023 22:13 — forked from colematt/Backup-and-Restore-GPG-and-SSH-keys.md
[Backup and Restore GPG and SSH keys] #git #gpg #ssh

Backup

  1. Copy both id_rsa and id_rsa.pub from ~/.ssh/ to a USB drive. Identify the private key by executing the following command.
    gpg --list-secret-keys --keyid-format LONG
    
  2. It will show something similar to this.
    sec   4096R/3AA5C34371567BD2 2016-03-10 [expires: 2017-03-10]
    
@scriptsandthings
scriptsandthings / Download macOS Monterey in Background.zsh
Created July 13, 2022 20:01 — forked from talkingmoose/Download macOS Monterey in Background.zsh
Creates a launch daemon and script on target Macs in a Jamf Pro policy to download the specified macOS installer and update Jamf Pro's inventory. This is preferable to running a command directlt in policy, which can take 30+ minutes to complete, preventing other policies from running. The script self destructs once it sees the installer in the A…
#!/bin/zsh
:<<ABOUT_THIS_SCRIPT
-------------------------------------------------------------------------------
Written by:William Smith
Partner Program Manager
Jamf
[email protected]
https://gist.github.com/6b78ba3fc4a6623dbc8225e2df38d570
@scriptsandthings
scriptsandthings / pdf_conversions.md
Created June 27, 2022 10:35 — forked from stevekm/pdf_conversions.md
Commands to convert multi-page PDF to/from multiple PNG files with GhostScript & ImageMagick