Skip to content

Instantly share code, notes, and snippets.

View loicyannou's full-sized avatar

Loïc YANNOU loicyannou

  • Dailymotion
  • Paris
View GitHub Profile
@MattHodge
MattHodge / Save-Download.ps1
Created April 11, 2021 13:03
Save-Download.ps1
function Save-Download {
<#
.SYNOPSIS
Given a the result of WebResponseObject, will download the file to disk without having to specify a name.
.DESCRIPTION
Given a the result of WebResponseObject, will download the file to disk without having to specify a name.
.PARAMETER WebResponse
A WebResponseObject from running an Invoke-WebRequest on a file to download
.EXAMPLE
# Download Microsoft Edge
@paulgalow
paulgalow / get-macos-build.sh
Last active April 18, 2022 00:38
Extract macOS release and build versions from a macOS Big Sur installer. Pass it a path to an InstallAssistant app, like so: ./get-macos-build.sh "/Applications/Install macOS Big Sur.app/"
#!/bin/sh
readonly installAssistant="$1"
# Display error messages and exit script
error() {
echo "[ERROR] $*"
exit 1
}
@talkingmoose
talkingmoose / Match Version Number or Higher.bash
Last active July 9, 2024 18:28
Generates a regular expression (regex) that matches the provided version number or higher. Useful for Jamf Pro's "matches regex" operator in searches and smart groups where the results need to be the current version of an app or higher.
#!/bin/bash
<<ABOUT_THIS_SCRIPT
-------------------------------------------------------------------------------
Written by:William Smith
Professional Services Engineer
Jamf
bill@talkingmoose.net
https://gist.github.com/2cf20236e665fcd7ec41311d50c89c0e
@mrpnelson
mrpnelson / mac-wipri.sh
Last active November 16, 2022 15:22
Mac WiFi Preferred Network Refresh Script
#!/bin/bash
# ------------------------------------------------------------------------------------------
# May 4, 2021 Update
# This is maintained here for reference, but it seems like the networksetup script
# is capable of doing this, at least in Big Sur. I haven't tested this on older versions.
# See https://gist.github.com/mrpnelson/c65302efed6c18300fb28c8da87bc69a#gistcomment-3731567
# for details on using the native tooling
# ------------------------------------------------------------------------------------------
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active June 29, 2024 01:12
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@haircut
haircut / rename-computer.py
Last active February 1, 2023 09:57
Rename a computer using the Jamf binary and a Google Sheet - full details: https://www.macblog.org/post/automatically-renaming-computers-from-a-google-sheet-with-jamf-pro/
#!/usr/bin/python
'''
Rename computer from remote CSV using Jamf binary
Pass in the URL to your remote CSV file using script parameter 4
The remote CSV could live on a web server you control, OR be a Google Sheet
specified in the following format:
https://docs.google.com/spreadsheets/u/0/d/<document ID>/export?format=csv&id=<document ID>&gid=0