This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1- install net framework 3.5 | |
# E:\ this path of mounted windows iso file | |
Add-WindowsCapability -Online -Name NetFx3~~~~ -Source E:\Sources\SxS | |
2- remove quick assist | |
Remove-WindowsCapability -Online -Name $(Get-WindowsCapability -Online -Name *quickassist*).Name | |
2.2 turn off useless windows "Features" | |
2.5 - Disable mitigation and useless security | |
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 3 /f | |
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create bootable windows vhd/vhdx image and maybe even linux | |
1- you need an intermediate virtual disk to write the acronis backup image | |
2- create a fat32 partition at the beginning of the disk --BUT DO NOT SET THE TYPE TO EFI PARTITION JUST YET-- | |
3- write the acronis image to the partition after the fat32 partition | |
4- use easy uefi to put efi boot files inside the fat32 partition | |
5- change the fat32 partition type to efi partition | |
6- create an empty vhd/vhdx image and add the vhd file as a virtual disk to the virtual machine. you can not add vhdx as virtual disk to the virtual machine. so just create vhdx disk | |
7- copy the intermediate virtual disk to the virtual vhd/vhdx disk using MiniTool Partition | |
8- mount the vhd/vhdx disk image and rebuild the EFI partition inside the disk image using easyuefi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#break the service so that it can never start | |
$registryPath = "HKLM:\SYSTEM\CurrentControlSet\Services\WinDefend" | |
Set-ItemProperty -Path $RegistryPath -Name ImagePath -Value null | |
$key = Get-Item -Path $registryPath | |
$users = @("TrustedInstaller", "ALL APPLICATION PACKAGES", "CREATOR OWNER", "SYSTEM", "Administrators", "Users") | |
foreach ($user in $users) { | |
$acl = Get-Acl -Path $registryPath | |
$rule = New-Object System.Security.AccessControl.RegistryAccessRule($user, "FullControl", "Deny") | |
$acl.AddAccessRule($rule) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this the first option. if it didn't work. go to option 2 | |
adb shell cmd overlay disable com.android.internal.systemui.navbar.gestural | |
adb shell cmd overlay enable com.android.internal.systemui.navbar.threebutton | |
# install any a launcher you like before option 2 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
STEP 4 AND 5 ARE VERY IMPORTANT. I REPEAT STEP 4 AND 5 ARE VERY IMPORTANT | |
THE CUSTOM IS ISO WILL NOT BOOT WITHOUT STEP 5 AND WITHOUT STEP 4 THE INSTALLER WILL NOT FINISH THE INSTALLATION PROCESS. | |
0-disable screen saver | |
disable start up programs | |
show trash on desktop | |
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | |
dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge | |
sudo apt install bleachbit | |
Customize nemo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Replace anything inside the dom jquery is required | |
$("body").html($("body").html().replace(/\?a=view/g,'')); | |
#Replace anything inside the dom | |
document.body.innerHTML = document.body.innerHTML.replace(/\?a=view/g,'') | |
#Remove div with a particular text in it jquery is required | |
$("div:contains('Example')").remove() | |
#select element by attribute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Very important. I repeat, this is very important] | |
YOU CAN NOT USE TWO REGEX EXPRESSIONS AT THE SAME TIME, BUT YOU CAN TRY TO BE AS SPECIFIC AS POSSIBLE. AND TRY TO BE FLEXIBLE AND MIX AND MATCH THE EXPRESSIONS | |
AND IF WORST COME TO WORST YOU CAN REGEX A REGEX OUTPUT | |
#If you use any regex and the regex is not matching anything, or it is not matching the expected behaviour. In that case, you must check if the regex is lazy or greedy and the regex flags | |
g - Global. Finds all matches instead of stopping after the first. | |
i - Ignore case. /[a-z]/i is equivalent to /[a-zA-Z]/. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.\adb.exe shell am broadcast -a clipper.get | foreach {[regex]::match($_,'(?<=data=").*(?="$)').value} (Any line that does not match the regex will exist as an empty line in the output) | |
$String = .\adb.exe shell am broadcast -a clipper.get | |
[regex]::matches($String, '(?<=data=").*(?="$)').Value (The slightly longer version does not have the issue of the shorter version) | |
in powershell match returns an array of matched results | |
foreach is needed to iterate over the array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install xserver-xorg-core xinit icewm | |
sudo mkdir -pv /etc/systemd/system/getty@tty1.service.d/ | |
sudo nano /etc/systemd/system/getty@tty1.service.d/autologin.conf | |
#edit the autologin.conf as follows | |
[Service] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1-download from https://cloud-images.ubuntu.com/minimal/releases/ | |
2-mount the squashfs file | |
3- use rsync to copy the files from the squasfs the disk | |
sudo rsync -av -A -X /media/mint/disk/ /media/mint/2fa5f7a5-27ef-4ff9-97f0-ade7c9c593c6 | |
4-cd into the disk and open supersuer terminal and past | |
mount -t proc /proc proc/ | |
mount -t sysfs /sys sys/ | |
mount --rbind /dev dev/ | |
mount --rbind /run run/ |
NewerOlder