Skip to content

Instantly share code, notes, and snippets.

View stewartadam's full-sized avatar

Stewart Adam stewartadam

View GitHub Profile
@stewartadam
stewartadam / install-google-chrome.ps1
Last active July 22, 2019 18:49
Install Google Chrome from PowerShell (i.e. how to avoid IE on Windows Server)
# Credits to @nicolaigj: https://gist.github.com/kurokikaze/350fe1713591641b3b42#gistcomment-2074156
$Path = $env:TEMP; $Installer = "chrome_installer.exe"; Invoke-WebRequest "http://dl.google.com/chrome/install/375.126/chrome_installer.exe" -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args "/silent /install" -Verb RunAs -Wait; Remove-Item $Path\$Installer
@stewartadam
stewartadam / macos-network-servicelist.sh
Last active November 9, 2022 08:45
Obtain list of active network services on MacOS
# improvement of answer https://apple.stackexchange.com/a/223446/183406
# fixes issue where multiple services may have the same hardware port (e.g. USB Ethernet)
get_interfaces() {
while read -r line; do
sname="$(echo "$line" | sed -E 's|(.*) \(Hardware Port: (.+), Device: (.+)\)|\1|')"
hname="$(echo "$line" | sed -E 's|(.*) \(Hardware Port: (.+), Device: (.+)\)|\2|')"
sdev="$(echo "$line" | sed -E 's|(.*) \(Hardware Port: (.+), Device: (.+)\)|\3|')"
#echo "Current service: $sname, $sdev, $currentservice"
if [ -n "$sdev" ]; then
ifout="$(ifconfig "$sdev" 2>/dev/null)"
Homebrew build logs for [email protected] on macOS 13
Build date: 2022-12-10 18:50:44
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.