| # MIT License, see below | |
| # | |
| # These are some helpers for figuring out the derivations attributes of runtime | |
| # dependencies of a derivation, in particular the function `runtimeReport`. At | |
| # the bottom of the file you can see it used on `hello`. Spoiler: glibc is a | |
| # runtime dependency. | |
| # For more info see | |
| # | |
| # https://nmattia.com/posts/2019-10-08-runtime-dependencies.html |
| # Installation of appropriate script from https://www.powershellgallery.com/packages/Upload-WindowsAutopilotDeviceInfo/ | |
| Install-Script -Name Upload-WindowsAutopilotDeviceInfo -Force:$true | |
| Upload-WindowsAutopilotDeviceInfo -TenantName osmec.onmicrosoft.com -OrderIdentifier 'AssignedPC' -Confirm:$false | |
| # Upload-WindowsAutopilotDeviceInfo -TenantName osmec.onmicrosoft.com -OrderIdentifier 'SharedPC' -Confirm:$false | |
| # Upload-WindowsAutopilotDeviceInfo -TenantName osmec.onmicrosoft.com -OrderIdentifier 'SharedEduPC' -Confirm:$false | |
| # Start-Process -FilePath '%WINDIR%\system32\sysprep\sysprep.exe /generalize /shutdown /oobe' | |
According to Apple, the only way to remove an unknown firmware password from a MacBook (2011 and later) is to take it to the Apple Store with the original proof-of-purchase. However, I've found that there is another way, which I've been successful with for the unibody MacBook Pro--it's essentially just modifying a couple bytes in the EFI ROM, which should be simple. What's not simple, however, is figuring out how to read and write to the EFI chip. In this post, I'll talk about the process that I figured out and what worked for me.
Apple's method of resetting the firmware password is not reproducible, as Apple generates an SCBO file that unlocks the EFI using their private key. You can read more about this process here. The problem with this system is that, if you are in the unfortunate situation of neither having the firmware unlock pass
| Function Install-Scoop { | |
| New-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" ` | |
| -propertyType ExpandString ` | |
| -name "SCOOP_GLOBAL" ` | |
| -value "${ENV:PROGRAMDATA}\scoop" | |
| Invoke-WebRequest 'https://get.scoop.sh' | Invoke-Expression | |
| 'scoop install Git-with-OpenSSH Sudo Which --global' | Set-Content -path temp_script.ps1 |
| #!/usr/bin/env python | |
| import random | |
| prefix = ["{}2", "{}6", "{}A", "{}E"] | |
| random.shuffle(prefix) | |
| hex_digits = list("0123456789ABCDEF" * 11) | |
| random.shuffle(hex_digits) |
| CFGUTIL(1) BSD General Commands Manual CFGUTIL(1) | |
| NAME | |
| cfgutil -- Command-line iOS device management | |
| SYNOPSIS | |
| cfgutil [-C ] [-K ] | |
| [-e | -f | --foreach] | |
| [--format JSON | plist | text] [-v] command [ ...] |
This document describes how to set up Windows 10 for cross-platform development (Go, NodeJS, etc) with Windows Subsystem for Linux (WSL).
Most of the information here is collected from
| // This script shows how to use M language (Power Query Formula Language) | |
| // to read data from GitHub API v4 using a POST request. | |
| // This can come in handy when building PowerBI reports that utilize GraphQL endpoints for loading data. | |
| let | |
| vUrl = "https://api.github.com/graphql", | |
| vHeaders =[ | |
| #"Method"="POST", | |
| #"Content-Type"="application/json", | |
| #"Authorization"="Bearer <your_personal_token_here>" |
| @echo off | |
| :: GetAdmin | |
| :------------------------------------- | |
| :: Verify permissions | |
| >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" | |
| :: On Error No Admin | |
| if '%errorlevel%' NEQ '0' ( | |
| echo Getting administrative privileges... |