Ranco

Apr 23, 2026 at 13:38

Step 1: Erase disk and reinstall MacOS (steps skipped here) Step 2: Use Safari to open up this the link to this post then copy and paste it into terminal to execute. Follow the screen prompt to create default user: Apple #!/bin/bash RED='\033[1;31m' GRN='\033[1;32m' BLU='\033[1;34m' YEL='\033[1;33m' PUR='\033[1;35m' CYAN='\033[1;36m' NC='\033[0m' echo -e "${CYAN}*-------------------*---------------------*${NC}" echo -e "${YEL}* Check MDM - Skip MDM Auto for MacOS by *${NC}" echo -e "${RED}* SKIPMDM.COM *${NC}" echo -e "${RED}* Phoenix Team *${NC}" echo -e "${GRN}* Modified by RXu@20260423 *${NC}" echo -e "${CYAN}*-------------------*---------------------*${NC}" echo "" PS3='Please enter your choice: ' options=("Autobypass on Recovery" "Reboot") select opt in "${options[@]}"; do case $opt in "Autobypass on Recovery") echo -e "${GRN}Bypass on Recovery" if [ -d "/Volumes/Macintosh HD - Data" ]; then diskutil rename "Macintosh HD - Data" "Data" fi echo -e "${GRN}Create a new user " echo -e "${BLU}Press Enter to continue, Note: Leaving it blank will default to the automatic user" echo -e "Enter the username (Default: Apple) " read realName realName="${realName:=Apple}" echo -e "${BLU}username ${RED}WRITE WITHOUT SPACES ${GRN} (Default: Apple)" read username username="${username:=Apple}" echo -e "${BLU}Enter the password (default: 1234) " read passw passw="${passw:=1234}" dscl_path='/Volumes/Data/private/var/db/dslocal/nodes/Default' echo -e "${GRN}Creating User" # Create user dscl -f "$dscl_path" localhost -create "/Local/Default/Users/$username" dscl -f "$dscl_path" localhost -create "/Local/Default/Users/$username" UserShell "/bin/zsh" dscl -f "$dscl_path" localhost -create "/Local/Default/Users/$username" RealName "$realName" dscl -f "$dscl_path" localhost -create "/Local/Default/Users/$username" UniqueID "501" dscl -f "$dscl_path" localhost -create "/Local/Default/Users/$username" PrimaryGroupID "20" mkdir -p "/Volumes/Data/Users/$username" dscl -f "$dscl_path" localhost -create "/Local/Default/Users/$username" NFSHomeDirectory "/Users/$username" dscl -f "$dscl_path" localhost -passwd "/Local/Default/Users/$username" "$passw" dscl -f "$dscl_path" localhost -append "/Local/Default/Groups/admin" GroupMembership $username echo "0.0.0.0 deviceenrollment.apple.c…" >>/Volumes/Macintosh\ HD/etc/hosts echo "0.0.0.0 mdmenrollment.apple.com" >>/Volumes/Macintosh\ HD/etc/hosts echo "0.0.0.0 iprofiles.apple.com" >>/Volumes/Macintosh\ HD/etc/hosts echo -e "${GRN}Successfully blocked host${NC}" # echo "Remove config profile" touch /Volumes/Data/private/var/db/.AppleSetupDone rm -rf /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigHasActivationRecord rm -rf /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound echo -e "${CYAN}------ Autobypass SUCCESSFULLY / Autobypass ------${NC}" echo -e "${CYAN}------ Exit Terminal , Reset Macbook and ENJOY ! ------${NC}" break ;; "Disable Notification (SIP)") echo -e "${RED}Please Insert Your Password To Proceed${NC}" sudo rm /var/db/ConfigurationProfiles/Settings/.cloudConfigHasActivationRecord sudo rm /var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound sudo touch /var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled sudo touch /var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound break ;; "Disable Notification (Recovery)") rm -rf /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigHasActivationRecord rm -rf /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound break ;; "Check MDM Enrollment") echo "" echo -e "${GRN}Check MDM Enrollment. Error is success${NC}" echo "" echo -e "${RED}Please Insert Your Password To Proceed${NC}" echo "" sudo profiles show -type enrollment break ;; "Exit") echo "Rebooting..." reboot break ;; *) echo "Invalid option $REPLY" ;; esac done Step 3: Create another Admin user in Settings -> Users & Groups then switch off the device Step 4:Turn off SIP(System Integration Protection) Reboot into Recovery mode again,then execute "csrutil disable" in terminal then restart the device Terminal will prompts you to enter a user name to continue, use the user you created just now in lower case then type in the password. Step 5: Now back into the system, open up terminal and execute the following 5 commands one at a time. 1) sudo rm /var/db/ConfigurationProfiles/Settings/.cloudConfigHasActivationRecord 2) sudo rm /var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound 3) sudo touch /var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled 4) sudo touch /var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound 5) sudo launchctl disable system/com.apple.ManagedClient.enroll Step 6: Then execute the following commands to check if bypass is successful. Terminal will say Error: ... which is expected. sudo profiles show -type enrollment Step 7:Turn back on SIP(System Integration Protection) Reboot into Recovery mode again,then execute "csrutil enable" in terminal then restart the device.

Ranco

Mar 30, 2025 at 23:30

My unwavering affection and love for you remains but now I have to move on with node.js as it's so fast!

Ranco

Aug 01, 2024 at 23:58

I was once interviewed by a data engineer and was asked to solve an interesting question where to find all the sales records that has previously been sold in the past 5 years. Suppose your dataset looks like this: HouseID | year_sold 1 | 2024 1 | 2020 1 | 2011 2 | 2023 2 | 2017 2 | 2015 3 | 2022 3 | 2019 3 | 2011 For example, the first row 1 | 2024 should be kept as 4 year ago in 2020 it was sold however the second row 1 | 2020 should be dropped as the earlier sale was back in 2011 which is 9 years ago. In the interview, I tried to solve it using same table join which does the job but is probably not very efficient. Then the interviewer asked me if window function can be applied here to which i answered yes as I was reading a book that talks about window function and grouping sets so i had a vague impression that a window function should also solve this. To my surprise, the interviewer corrected me saying no a window function doesn't apply here which I didn't bother giving another thought and simply admitted my "wrong" answer. Just now when I was reading the same book, this little interview twist suddenly popped into my mind so i quickly recreated the dataset and tackled this same question again and viola! I cracked it! Note the following are Postgresql implementation Solution 1: same table join SELECT * FROM (SELECT h1.*,h2."HouseID" AS "HouseID2",h2.year_sold AS year2 FROM houses h1 JOIN houses h2 ON h1."HouseID"=h2."HouseID") AS cartesian WHERE "year_sold"-year2>0 AND "year_sold"-year2<=5; Solution 2: windowing function SELECT "HouseID","year_sold",lag(lower_bound,1) OVER (PARTITION BY "HouseID") AS "minimum_year_threshold_for_previous_sale" FROM ( SELECT "HouseID","year_sold",max("year_sold"-5) OVER (PARTITION BY "HouseID","year_sold" ORDER BY "HouseID","year_sold" desc) AS "lower_bound" FROM houses) AS sub;

Ranco

Aug 01, 2024 at 0:08

Spent hours configuring custom keyboard bindings and numpad automatically turned on on start up, for what it's worth, if you are running on the following distro: OS: Debian GNU/Linux 12 (bookworm) aarch64 Host: Raspberry Pi 5 Model B Rev 1.0 DE: LXDE-pi-wayfire WM: wayfire The way to add new key bindings and auto numpad on are in the same file: ~/.config/wayfire.ini [command] binding_fileexplorer=<super> KEY_E command_fileexplorer=pcmanfm (or nautilus depends on your preference) [input] kb_numlock_default_state = true

Ranco

Jul 29, 2024 at 9:03

Hey there! Thanks for stopping by. I'm an independent developer with a passion for crafting digital solutions. My toolbelt primarily consists of Python, JavaScript, PostgreSQL, and C, but I'm always eager to explore new technologies. This space is where I share my learnings, experiments, and projects. Whether you're a fellow developer looking for insights or just curious about the world of tech, I hope you find something interesting here. Feel free to explore, comment, and let's connect! Happy coding!