Skip to content

Instantly share code, notes, and snippets.

View Rahmanism's full-sized avatar
💻
I'm coding!

Rahmani Rahmanism

💻
I'm coding!
View GitHub Profile
@ThioJoe
ThioJoe / Appx-Uninstaller.ps1
Last active September 24, 2024 18:18
A basic script for uninstalling a list of app packages in Windows 10/11, including those pre-installed with Windows
# A basic script for uninstalling app packages in Windows 10/11, including those pre-installed with Windows
#
# Note: If you get an error about the script not being allowed to run, the below command will change the execution polciy temporarily for one session only:
# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
#
# To execute the script, open a Powershell window to the directory with the script and run the following command using your scripts file name (and don't forget the .\ )
# .\WhateverScriptName.ps1
# -------------------------------------------------------------------------------------------
# Script by ThioJoe - https://github.com/ThioJoe
@buglessir
buglessir / react-memory-leaks.js
Created February 20, 2022 09:12
3 ways to fix Memory Leaks in React web application
// 1) Using Boolean flag:
const [value, setValue] = useState('');
useEffect(() => {
let isMounted = true;
fetchValue().then(() => {
if (isMounted) {
setValue('done!'); // no more error
}
});
@Jalalx
Jalalx / README.md
Created August 19, 2021 08:12
Set and unset Shekan DNS settings using commandline on windows

What is this?

Following scripts help you easily set DNS settings to Shekan servers and resetting them back to default.

How to use?

  1. Save following cmd files on your system.
  2. Make sure you change the "Wi-Fi" to your network adapter name
  3. Remember to run these commands as an administrator.
@coolaj86
coolaj86 / Create a Bootable MacOS Recovery USB with Linux.md
Last active August 2, 2024 11:09
How to create Apple's Bootable MacOS Rescue Image from Linux

See bootableinstaller.com

How to create a Bootable MacOS Recovery USB from Linux

If your Mac is out-of-order or you otherwise cannot download macOS from the App Store, you can still create a bootable OS X recovery USB, and you can use that to create an Installer USB.

The downloads used in this process are legal and freely avaliable - including disk images directly from Apple's IT support pages, and open source utilities for extracting and converting pkg, dmg, and HFS+.

@coolaj86
coolaj86 / create-bootable-installer-for-macos-high-sierra.sh
Last active June 20, 2023 22:30
How to create a bootable macOS High Sierra Installer from MacOS. See https://bootableinstaller.com
####################################################################################################
# bootableinstaller.com #
####################################################################################################
set -e
set -u
# Create an empty 5200m+ volume
hdiutil create -o high-sierra -size 5500m -volname "Install macOS High Sierra" -layout SPUD -fs HFS+J
@coolaj86
coolaj86 / create-bootable-installer-for-macos-mojave.sh
Last active February 5, 2021 13:47
How to create a bootable macOS Mojave Installer from MacOS. See https://bootableinstaller.com
#########################
# bootableinstaller.com #
#########################
set -e
set -u
# Create an empty
hdiutil create -o /tmp/empty -size 8400m -volname "Mojave" -layout SPUD -fs HFS+J
@coolaj86
coolaj86 / Empty Bootable macOS ISOs.md
Last active February 5, 2021 13:50
Empty ISOs for creating Bootable MacOS Installers

See https://bootableinstaller.com

Empty Bootable ISO

In order to create a bootable macOS installer or bootable OS X Installer from Windows or Linux you'll need to have an empty ISO file.

These are various sizes of SPUD / Apple Partition Map ISO files created with hdiutil.

macOS verison Suggested Minimum Suggested Maximum
@coolaj86
coolaj86 / create-bootable-installer-for-macos-catalina.sh
Last active April 12, 2021 20:29
How to create a bootable macOS Catalina Installer from MacOS. See https://bootableinstaller.com
#########################
# bootableinstaller.com #
#########################
set -e
set -u
# Create an empty
hdiutil create -o /tmp/empty -size 8400m -volname "Catalina" -layout SPUD -fs HFS+J
@coolaj86
coolaj86 / create-bootable-installer-for-os-x-el-capitan.sh
Last active June 21, 2023 07:45
How to create a bootable El Capitan Installer from MacOS. See https://bootableinstaller.com
################################################################################
# See bootableinstaller.com #
################################################################################
# set strict and verbose modes for bash
set -e
set -u
# If the script already ran once successfully, don't re-run
if [ -f "el-capitan.iso" ]; then
@coolaj86
coolaj86 / Bootable Mac ISO with Linux.md
Last active July 31, 2024 02:34
Create Bootable MacOS ISO from Apple's Free PKG