Skip to content

Instantly share code, notes, and snippets.

View itsolver's full-sized avatar

Angus McLauchlan itsolver

View GitHub Profile
@itsolver
itsolver / enforce-security-key-signin.cmd
Last active November 24, 2023 02:58
This batch script enables Security Key and disables the Windows Password and PIN sign-in options by modifying specific registry settings. It's designed for easy deployment across multiple Windows 10 and Windows 11 machines. Users need to run this script with administrative privileges and restart their computers for the changes to take effect. Th…
@echo off
echo Starting to modify credential providers.
:: Self-elevate the script if required
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto :gotAdmin ) else ( goto :UACPrompt )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
@itsolver
itsolver / intune-onboard-joined-devices.ps1
Last active November 8, 2023 11:38
PowerShell Script for Auto-Enrollment of Azure AD Joined Devices into Intune
# PowerShell script for auto MDM enrollment of Azure AD joined devices
# This script should be run with administrative privileges
# Set MDM Enrollment URL's
$key = 'SYSTEM\CurrentControlSet\Control\CloudDomainJoin\TenantInfo\*'
$keyinfo = Get-Item "HKLM:\$key"
$url = $keyinfo.name
$url = $url.Split("\")[-1]
$path = "HKLM:\SYSTEM\CurrentControlSet\Control\CloudDomainJoin\TenantInfo\$url"
@itsolver
itsolver / aiday2.txt
Last active October 1, 2022 11:42
Tesla AI Day 2 transcription with OpenAI's Whisper. ``whisper aiday2.mp3 --language English --model small --device cuda``
[14:30.000 --> 14:41.480] All right welcome everybody give everyone a moment to get back in the audience and
[14:43.720 --> 14:49.900] All right great welcome to Tesla AI day 2022
[14:49.900 --> 15:02.380] We've got some really exciting things to show you I think you'll be pretty impressed
[15:02.380 --> 15:07.700] I do want to set some expectations with respect to our
[15:08.620 --> 15:14.580] Optimus robot as as you know last year was just a person in a robot suit
[15:14.580 --> 15:22.580] But we've now we've come a long way and it's I think we you know compared to that it's going to be very impressive
[15:23.700 --> 15:25.700] and
[15:26.260 --> 15:27.980] We're going to talk about
[15:27.980 --> 15:36.580] The advancements in AI for full self-driving as well as how they apply to more generally to real-world AI problems like a humanoid robot
[15:36.580 --> 15:38.580] And and even going beyond that
@itsolver
itsolver / fixclick2run.bat
Created September 18, 2022 22:05
Registry patch for Zinkuba (Mbox to PST) on Outlook 2016/365 32 or 64 bit
@echo off
setlocal enabledelayedexpansion
echo.
net session >nul 2>&1
if NOT %errorLevel% == 0 (
echo You do not have sufficient rights to execute this command
echo Please execute as Administrator
exit /B 1
# REQUIREMENTS
# brew install parallel trash
# APPROACH
# While FLAC has been around longer and is more broadly supported than ALAC,
# Apple doesn't seem to see that as an important factor when choosing what
# encoding formats to support in their music players. So we have to make do and
# convert FLAC to ALAC for their benefit.
# 1. Convert a single file
find ./ -name "*.webp" -exec dwebp {} -o {}.jpg \;
@itsolver
itsolver / create-gsuite-migration-service-account.sh
Last active April 20, 2020 11:29
Script for creating G Suite service account for data migration, e.g. CloudMigrator or MigrationWiz.
# Prerequisites:
# - Subscription to Google Cloud Platform.
# - G Suite Super Admin account to set up a service account on the G Suite tenant.
# - gcloud cli tool installed https://cloud.google.com/sdk/docs/downloads-versioned-archives
echo Step 1: Setup gcloud console project.
gcloud init
@itsolver
itsolver / convert-png-to-jpg.sh
Last active March 23, 2020 08:46
Convert all .png in a folder to .jpg using guetzli - https://github.com/google/guetzli
find ./ -name "*.png" -exec guetzli --quality 85 {} {}.jpg \;
function moveFiles(source, dest){
var source_folder = DriveApp.getFolderById(source);
var dest_folder = DriveApp.getFolderById(dest);
var files = source_folder.getFiles();
while (files.hasNext()) {
var file = files.next();
dest_folder.addFile(file);
}