How to reset Mac Password during Boot Process?
To reset your Mac password during the boot process, you can use the “Reset Password” utility in the MacOS Utilities menu. Here are the steps:
- Start up your Mac while holding down the Command + R keys. This will boot your Mac into the Recovery mode.
- Once the Utilities window appears, select “Utilities” from the top menu and then choose “Terminal.”
- In the Terminal window, type “resetpassword” (without quotes) and press Enter.
- A new window will appear, allowing you to select the hard drive and user account for which you want to reset the password.
- Once you have selected the correct drive and account, enter a new password and verify it. Then click “Save.”
- Exit the Terminal and restart your Mac. You should now be able to log in with the new password you just set.
Please note that this method only work if you are using the firmware password which is enabled by default on Mac.
Linux – How to beautify CURL Command result into valid JSON Format?
Recently I ran some CURL command on my Mac OS X terminal windows. Sample: bash-3.2$ curl -X POST “https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&from=en&to=de,it,ja,es,fr,hi,zh-Hans,te,ar,ta” -H “Ocp-Apim-Subscription-Key: 6380c68dff384955ae2ca406e989867a” -H “Content-Type: application/json” -d ‘[{“Text”:“I am an Engineer by profession, Blogger by passion & Founder of Crunchify, LLC, the largest free blogging and technical resource site for beginners.”}]’ [{“translations”:[{“text”:“Ich bin ein Ingenieur von Beruf, Blogger von Leidenschaft & Gründer von Crunchify, LLC, die größte kostenlose Blogging und technische Ressource Website für Anfänger.”,“to”:“de”},{“text”:“Sono un ingegnere di professione, blogger di passione & fondatore di Crunchify, LLC, il più grande sito di blogging gratuito e risorse tecniche per i principianti.”,“to”:“it”}, {“text”:“私は初心者のための最大の無料ブログや技術リソースサイト、LLC、Crunchify の情熱 & 創設者によって専門家、ブロガーによってエンジニアです。”, “to”:“ja”},{“text”:“Soy Ingeniero de profesión, blogger por pasión y fundador de Crunchify, LLC, el mayor sitio de blogs gratuitos y recursos técnicos para principiantes.”,“to”:“es”}, {“text”:“Je suis un ingénieur par profession, Blogger par la passion et le fondateur de Crunchify, LLC, le plus grand blog gratuit et le site de ressources techniques pour les débutants.”, “to”:“fr”}, {“text”:“मैं पेशे से एक इंजीनियर हूं, जुनून द्वारा ब्लॉगर Crunchify, LLC, सबसे बड़ा मुक्त ब्लॉगिंग और तकनीकी संसाधन के लिए शुरुआती साइट के संस्थापक ।”,“to”:“hi”},{“text”:“我是一个工程师的职业, 博客的激情 & 创始人克朗奇菲, 有限责任公司, 最大的免费博客和技术资源网站的初学者。”,“to”:“zh-Hans”}, {“text”:“నేను వృత్తిపరంగా ఒక ఇంజినీర్ ని, బ్లాగర్ ని అభిరుచి ద్వారా, crunchify యొక్క వ్యవస్థాపకుడు, LLC, ప్రారంభ కోసం అతిపెద్ద ఉచిత బ్లాగింగ్ మరియు సాంకేతిక వనరుల సైట్.”,“to”:“te”},{“text”:“انا مهندس من قبل المهنة ، مدون من قبل العاطفة ومؤسس الجرش ، LLC ، أكبر المدونات الحرة وموقع الموارد التقنية للمبتدئين.”,“to”:“ar”}, {“text”:“நான் தொழில் ஒரு பொறியாளர், & நிறுவனர் Crunchify, ஒரு பெரிய இலவச வலைப்பூ மற்றும் தொடக்க தொழில்நுட்ப வள தளம்.”,“to”:“ta”}]} How to beautify this response?
Just found out a solution. Just add | json_pp
to curl command and you will see prettify JSON response.
How to fix error sun.jvm.hotspot.runtime.VMVersionMismatchException: Supported versions are 25.40-b25. Target VM is 25.181-b02
A. The error message “sun.jvm.hotspot.runtime.VMVersionMismatchException” typically indicates that the version of the Java Virtual Machine (JVM) that you are using is not compatible with the version of the Java Development Kit (JDK) that you have installed. To fix this error, you will need to ensure that you have the correct version of the JDK installed and that it is being used by the JVM.
You can check which version of the JDK you have installed by running the command “java -version” in a command prompt or terminal. Make sure that you have the correct version of JDK installed according to your application requirement.
If you are using an IDE like Eclipse, you can check and update the JDK version from the IDE settings.
If the issue persists even after checking the JDK version, you may also want to check the classpath and ensure that it is pointing to the correct version of the JDK.
How to fix Page doesn’t load – waiting for unpkg.com in Chrome bottom left corner
I was working on one of my client’s site and noticed page goes un-responsive on load for quite a few times.
As you may have noticed, we are using Genesis Framework on Crunchify and for all of my clients, we had below code in my theme’s functions.php
file.
wp_enqueue_style( 'ionicons', '//unpkg.com/ionicons@4.1.2/dist/css/ionicons.min.css', array(), CHILD_THEME_VERSION );
Theme was using unpkg.com
ionicons
for just loading 2 icons.
In order to fix, I’ve decided to simply removing above ionicons from theme as it was absolutely unnecessary.
After removing I started noticing boost in WordPress site loading 8.
I would suggest you all to remove ionicons files if that’s slowing down your site.
How to change hostname manually in Oracle Linux 7?
In Oracle Linux 7, you can change the hostname manually by following these steps:
- Open a terminal window and log in as the root user.
- Use the “hostnamectl” command to view the current hostname:
codehostnamectl status
- To change the hostname, use the “hostnamectl” command with the “set-hostname” option, followed by the new hostname:
codehostnamectl set-hostname new_hostname
- Confirm the change by running
codehostnamectl status
- To make the change permanent across reboots, edit the “/etc/hostname” file and replace the current hostname with the new one.
codenano /etc/hostname
- Finally, update the “/etc/hosts” file and replace the current hostname with the new one:
codenano /etc/hosts
- Reboot your system for the changes to take effect.
You should now be able to see your new hostname when you use the “hostname” command or when you log in to your system.