Skip to content

Instantly share code, notes, and snippets.

View thecodesmith's full-sized avatar

Brian Stewart thecodesmith

  • Jamf
  • United States
View GitHub Profile
@bradschm
bradschm / selective-caspershare-sync.sh
Created October 12, 2016 18:18
Use rsync to sync Casper distribution points and restrict packages to specific subnets.
#!/bin/bash
##########################################
### Script to rsync Caspershare points
### Name site based packages SB-###-Package name
### All pacakges with SB-* will be ignored and SB-<matching octet>-filename will be synced
### Author B. Schmidt 12-31-2012
##########################################
# Get IP Subnet
ipsub=$(ifconfig | grep 10. | grep inet | cut -f2 -d " " | cut -f2 -d "." | head -1)
@esycat
esycat / PrettyPrinter.groovy
Last active November 5, 2024 13:54
A simple way to pretty print nested lists and maps in Groovy.
import static groovy.json.JsonOutput.*
def config = ['test': 'lalala']
println prettyPrint(toJson(config))
@pmuellr
pmuellr / unzip-recurse.py
Created November 19, 2010 15:41
tool to recursively unzip .zip and .jar files
#!/usr/bin/env python
import os
import sys
import subprocess
#-----------------------------------------------------------------------------
def main():
fileNames = sys.argv[1:]