Skip to content

Instantly share code, notes, and snippets.

@felixgren
felixgren / phpconfig.md
Created June 4, 2021 04:38
PHP Dev Setup Config

Quick script to configure PHP for an ideal dev setting

ini_path=`php -i | grep php.ini | cut -f2- -d'>' | tail -1`

sudo sed -i'.bak' "s/error_reporting = .*/error_reporting = E_ALL/" $ini_path

sudo sed -i'.bak' "s/display_errors = .*/display_errors = On/" $ini_path

sudo sed -i'.bak' "s/upload_max_filesize = .*/upload_max_filesize = 8M/" $ini_path
@felixgren
felixgren / recover.md
Last active June 4, 2021 00:59
Git - Restore corrupt unpushed branch

Git - Restore corrupt unpushed branch

After an evening of happy coding I closed WSL2, a new branch with 3 commits waiting to be pushed the next day. Waking up, I am faced with.

Error message

error: object file .git/objects/6a/f509c42dcf23ca0d02292dbca8f1ba042b78db is empty
error: object file .git/objects/6a/f509c42dcf23ca0d02292dbca8f1ba042b78db is empty
error: object file .git/objects/6a/f509c42dcf23ca0d02292dbca8f1ba042b78db is empty
@felixgren
felixgren / guide.md
Last active July 10, 2024 19:12
Creating bootable Windows 10 Enterprise USB with custom drivers or packages (CAB)

Downloading Windows 10 Enterprise

Download Windows Media Creation Tool

Open Powershell and use it to launch the tool with these options. You can either use a relative or absolute path for the exe file. An easy way to get the path of a file is to hold in shift and right click, then select "Copy as path" in File Explorer.

# Make sure to change the language code to your liking, I have selected en-US. If you are on 32-bit you can use x84.
C:\Users\Felix\Downloads\MediaCreationTool_22H2.exe /Eula Accept /Retail /MediaLangCode en-US /MediaArch x64 /MediaEdition Enterprise

Select the ISO option if you want to continue and customize/preinstall drivers, if you simply want a bootable USB with stock Enterprise you can select it here and you are done!