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
}
@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 May 4, 2024 15:47
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