Skip to content

Instantly share code, notes, and snippets.

View JuryA's full-sized avatar

Jiří Altman JuryA

View GitHub Profile
@nmattia
nmattia / default.nix
Last active January 27, 2025 16:54
Report for runtime dependencies of a derivation
# 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
@JuryA
JuryA / AutoPilot.ps1
Last active October 12, 2019 14:29
Microsoft AutoPilot automatic registration script - to run it use:RAW content of **`AutoPilot.ps1`**: [https://git.io/OAP](https://git.io/OAP)Automatic WebInstaller (_works with Internet Explorer or special add-ones_): [https://cutt.ly/osmec](htt
# 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'
@Raymo111
Raymo111 / SSH Over 443.md
Last active November 8, 2024 07:03
How to SSH over 443 while Apache runs SSL with socat, stunnel4 and sslh

Removing a Mac's Firmware Password By Reflashing EFI ROM

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.

The Official Method

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

@JuryA
JuryA / Install-ChocoAndScoop.ps1
Created August 16, 2019 15:40 — forked from Jeff-Lewis/Install-ChocoAndScoop.ps1
Install Chocolatey and Scoop package managers for Windows + basic set of utilities and software
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
@ffosilva
ffosilva / macgen
Created August 12, 2019 13:35
Locally Administered MAC Address generator
#!/usr/bin/env python
import random
prefix = ["{}2", "{}6", "{}A", "{}E"]
random.shuffle(prefix)
hex_digits = list("0123456789ABCDEF" * 11)
random.shuffle(hex_digits)
@AloPress
AloPress / cfgutil
Last active October 18, 2023 20:02
Command-line iOS device management, cfgutil performs various management tasks on one or more attached iOS devices. It can be used manually and as part of automated workflows. Source: https://configautomation.com/cfgutil-man-page.html
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 [ ...]
@roustem
roustem / Setting-up-Windows-WSL1.md
Last active March 22, 2025 17:18
Setting-up-Windows-WSL1
@petrsvihlik
petrsvihlik / GitHub-GraphQL-PowerBI.m
Last active March 31, 2025 21:26
Loading GraphQL data (GitHub API v4) into PowerBI
// 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>"
@whoamiTM
whoamiTM / killswitch.bat
Last active December 3, 2021 22:09
VPN Kill Switch For Windows | Terminal User Interface | route.exe
@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...