To change the Delete key actually delete rather than backspace, run this command:
$ hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x70000004C,"HIDKeyboardModifierMappingDst":0x70000002A},{"HIDKeyboardModifierMappingSrc":0x70000002A,"HIDKeyboardModifierMappingDst":0x70000004C}]}'
to change it back again, run this command:
$ hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x70000002A,"HIDKeyboardModifierMappingDst":0x70000002A},{"HIDKeyboardModifierMappingSrc":0x70000002A,"HIDKeyboardModifierMappingDst":0x70000002A}]}'
Source : https://developer.apple.com/library/archive/technotes/tn2450/_index.html
Category: Apple
How to restore your hard drive from a Time Machine backup
How to restore your hard drive from a Time Machine backup
Whether you’re having major problems with your current hard drive or upgrading to a new Mac, Time Machine can help you get back to business.
- Power up your Mac and hold down the Command and R keys to enter the macOS Recovery Partition. Your Mac should boot to a screen that says macOS Utilities.
- Select Restore from Time Machine Backup and click Continue.
- Read the info on the Restore Your System page and click Continue.
- Select your Time Machine backup and click Continue.
- Select the most recent backup of your hard disk and click Continue. Your Mac will then restore the Time Machine backup; once it’s done it will restart.
If you’ve had to replace it with a stock drive that has nothing on it—not even macOS—you won’t be able to boot from the macOS Recovery Partition. But fear not, you can get the recovery rolling from the Time Machine backup disk itself: Just hold down the Option key when you start your Mac; you’ll be able to select the Time Machine backup disk as your startup drive, and go from there.
NB. I haven’t tested this yet, hopefully I’ll never have to. 🙂
iCloud Drive Path for Terminal in Mac OS
To access your iCloud Drive from the terminal in MacOS use this path
~/Library/Mobile Documents/com~apple~CloudDocs/
Apple Watch Model Numbers
1st Gen / 7000 Series | Series 1 | Series 2 | |||
38mm | 42mm | 38mm | 42mm | 38mm | 42mm |
A1553 | A1554 | A1802 | A1803 | A1757 | A1758 |
A1816 | |||||
MP022X/A | MP032X/A | MP082X/A | MP062X/A | ||
MNNL2X/A | MNNG2X/A | MNNL2X/A | MQ152X/A | ||
MP062X/A | |||||
MNPJ2X/A | |||||
MP0A2X/A | |||||
MQ192X/A | |||||
6 Text Navigation Shortcuts for Mac
6 Text Navigation Shortcuts
The first group of keyboard shortcuts allow for quickly moving around text:
- Jump to beginning of a line– Command+Left Arrow
- Jump to end of a line– Command+Right Arrow
- Jump to beginning of current word– Option+Right Arrow
- Jump to end of current word– Option+Right Arrow
- Jump to beginning of all text– Command+Up Arrow
- Jump to end of all text – Command+Down Arrow
By adding a shift key to the above shortcuts, we are given six new tricks that allow for quick text selection of lines, words, and entire documents.
Getting Started with CocoaPods
Installation
- make sure the ruby system is up to date
-
$ sudo gem update --system
-
- install cocoapods
-
$ sudo gem install cocoapods
- If you get an error message about fuzzy_match, try this command instead,
-
$ sudo gem install -n /usr/local/bin cocoapods
-
- setup the pods
-
$ pod setup
-
To Test / use cocoa pods
- Create a new single view project in Xcode
- Quit Xcode
- navigate to the folder of the new project in Terminal
- create a new podfile
-
$ pod init
-
- This will create a file called “Podfile”
- Open the file for editing
- Un comment the platform line. (the second line)
- Make sure the use_frameworks! line is not commented out if you’re using swift
- after the first Pods for <project> line add a Pod file
- e.g. pod ‘Firebase/Core’
- run install command
-
$ pod install
-
- not the output about using the new xcworkspace file instead of the old project file.
To Install FireBase
- Do all of the above
- Then go to the Firebase console and register your app
- Download the google plist file and add it to your project
- Open the application.swift file
- add the following line to the top of the file
- import Firebase
- in the didFinishLaunchingWithOptions method, add the following line
- FirebaseApp.configure()
- NOTE: You have to do step 3, otherwise you’ll get and error for the line you add at 6A
How to record an App Preview
1. Connect your iPhone or iPad to you Mac
2. Open Quick Time Player
3. From the File menu, Choose new Movie recording
4. Fromt the drop down next to the record button choose you iphone/ipad for video and microphone
5. Click record
6. Do steps
7. Click Stop
8. File | Save
9. Add name, click Save
10. Close quick time player
11. Open imovie
12. From the File menu, choose new app preview
you may have to go back to the projects screen first
13. If you get the app previews info screen click OK
14. Drag and drop your recording from steps 1-9 into the bottom half of the iMovies window
15. File | Share | App Preview
Or use the share button in the top right corner and choose app preview
16. Type a new title if required and click next
17. Type name if required, click save
18. Wait for iMovie to process
19. Click Close
20. Exit iMovie
How to burn an ISO to a USB stick
Here is how to write a ISO file to a USB stick so you can boot from it.
- Run the diskutil command to get a list of disk.
Be very careful to make sure you select the correct disk. Here its easy its the only one that is 8.0GB in size.
NOTE: I have removed the others disks from the list to make the post shorter.
malcolms-macbook-pro:~ malcolm$ diskutil list /dev/disk3 (external, physical): #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *8.0 GB disk3 1: Windows_NTFS Untitled 8.0 GB disk3s1
2. Next, you need to unmount the disk
malcolms-macbook-pro:~ malcolm$ sudo diskutil unmountDisk /dev/disk3 Volume Untitled on disk3 unmounted
3. Then, find the ISO file.
malcolms-macbook-pro:~ malcolm$ cd Downloads/ malcolms-macbook-pro:Downloads malcolm$ ls -l total 5408568 -rw-r--r--@ 1 malcolm staff 601817088 21 Jun 17:51 FreeBSD-11.0-RELEASE-i386-disc1.iso -rwx------@ 1 malcolm staff 643112960 17 Jun 18:37 FreeBSD-11.0-RELEASE-i386-memstick.img -rw-r--r--@ 1 malcolm staff 575899648 21 Jun 17:07 FreeNAS-11.0-RELEASE.iso -rwx------@ 1 malcolm staff 539889664 4 May 18:27 FreeNAS-9.10.2-U3.iso
4. Then write the ISO file to the USB “disk” using the DD command.
Again, make double sure you are using the correct disk. I have used disk 3 here, your’s may be different.
Also, note the addition r in the disk name, its not required, but does make it faster.
malcolms-macbook-pro:Downloads malcolm$ sudo dd if=FreeNAS-11.0-RELEASE.iso of=/dev/rdisk3 bs=1m 549+1 records in 549+1 records out 575899648 bytes transferred in 69.073390 secs (8337504 bytes/sec)
5. Next eject the disk.
malcolms-macbook-pro:Downloads malcolm$ diskutil eject /dev/disk3 Disk /dev/disk3 ejected malcolms-macbook-pro:Downloads malcolm$
6. All Done.
How to burn an ISO image to a CD/DVD in OS X
- Insert the blank DVD
- When OS X prompts what to do with the blank disk click Ignore
- Find the ISO file in Finder
- Right Click and choose Burn Image “…” to Disc
How to erase a rewritable CD or DVD in OS X
Its rather simple actually.
Insert the CD or DVD into the SuperDrive
You should see an icon appear on the desktop like when you mount any other drive.
Simply right click on the icon and choose erase.
NOTE: I’ve had OS X not recognise a DVD and only give me the Ignore and Eject options. If I choose the Ignore option I don’t get an icon to be able to do the steps above. I haven’t worked out what to do there yet. Possibly something with diskutil from terminal……