Will deleting my HD and reinstalling macOS delete apps?

Yes.

Formatting your hard disk and performing a fresh installation of macOS will delete all the apps (both Apple and 3rd party) which are installed on top of fresh install of macOS.

As per your requirements, you can take either one of the following two approaches:

Erase your hard drive and reinstall macOS
Create a brand new administrative user account and delete all the other accounts in the system.

However, irrespective of whichever two of the above approach you take, make sure to backup/move all your data from the MacBook (primarily from under your home directory), sign out of all the Apple services from your account (iCloud, iMessage, iTunes, Mac App Store), remove any saved Wi-Fi passwords and other sensitive items in the Keychain and unpair any paired Bluetooth device(s).

If you take the second approach from the list above, all the installed apps (other than the ones available in a fresh install of macOS) will continue to remain available on your Mac.

However, as mentioned by @nohillside, there may be licensing issues for commercial apps.

When following the second approach, you'll have to login once into the new account and delete all the accounts from Users & Groups in System Preferences.


Looks like there is some problem with reading whatever iTerm2 reads as a login shell.  Try changing the preference in 'Profiles/General' to a specific command (i.e. /bin/bash) and see if that works.

Additionally, does Apple's terminal work?  could you do something like

echo $SHELL
bash

and see if bash actually exists on your machine?  Bash is quite unfussed on what login items you have, so make sure you have a minimal .bash_profile and .bashrc in your $HOME

Give it a try and let's see if we get enough info to help you.


How can I disable the rubber band effect of the Preview program?

This is currently not possible for apps such as Preview which use a different scroll view.

You can provide feedback to Apple here:

http://apple.com/feedback/macosx.html


How do I start a new village on my second iOS device?

At this time it is a little late. You will have to factory reset one of them, redownload the game and start that game with a new gamecenter ID (do not use your old one for your base, but a brand new ID). Then you will have a new account. You can switch between the two by simply changing your Gamecenter ID from one to the other on either device. Without the factory reset, it will always default you back to your "original" base, even with a new gamcenter ID.


Apple offers two AppleCare plans:

AppleCare Protection Plan
AppleCare+

Both of these are actually AppleCare products.

According to Apple:

  AppleCare products for Apple Watch, for Mac, for iPod, for Apple TV,
  and for Apple Display provide global repair coverage. Service will be
  limited to the options available in the country or region where
  service is requested. Service options, parts availability, and
  response time vary by country or region.

  All repairs will be completed using genuine Apple parts for repair
  service. All repairs are performed by Apple-authorized technicians.

Source: Apple

Therefore, only Apple Watch, Mac, iPod, Apple TV, and Apple Displays are covered by a global repair warranty (as you already state in your question). However, you're mistaken in assuming AppleCare+ is treated differently to the AppleCare Protection Plan, because they both fall under the category of AppleCare products, and the above quote applies to both.

In other words, while you can purchase AppleCare+ for an iPhone, this coverage will not be global. In your case, purchasing an iPhone in the US and also purchasing AppleCare+ will only cover you in the US. It will not cover you in India or anywhere outside the US.

In a nutshell, while AppleCare+ provides additional hardware and technical support from Apple (it even covers two incidents of accidental damage), it is not currently available in India, nor does it provide global coverage for iPhones.

However, Apple has reached a number of agreements with the government of India and is now investing a lot of time and money there. It is possible that at some future point AppleCare+ will be available in India. With this in mind it is always worth checking with Apple directly at the time of purchase.


Macbook pro boot with kernel panic - can't perform kext scan

The safest thing to do is boot into OS X Recovery and re-install the OS.

You could alternatively boot into Recovery and open terminal and hope to fix the format of the kext file on disk, but I'd say it would be safer to start that Mac in target mode and copy in an unmodified copy of IOHIDFamily.kext into /System/Library/Extensions

Unless you have a good backup of the Mac, it's safer to just reinstall the core OS which will leave your user files and accounts alone, but remedy this system file that is needed for the system to run.


I Have A 2013 MacBook Air that refuses to charge. I continue to use it once it says that it has no charge left. What do I do?

It should not be on a "new" MBA but it is possible.

Reset your SMC (System management Controller) that has to to with Battery and charging.

Shut down the computer.
Plug in the MagSafe power adapter to a power source, connecting it to the Mac if its not already connected.
On the built-in keyboard, press the (left side) Shift-Control-Option(alt) keys and the power button at the same time.
Release all the keys and the power button at the same time.
Press the power button to turn on the computer.

If no sucess bring or send it back for repair.


iTunes library sync between two computers

The only way to do this, according to Apple, is to set the devices to manually manage content. If you have auto-syncing enabled, it can only be connected to one computer.

  You can manage your iPhone, iPad, or iPod with multiple computers1,2 as long as you have set the device to "Manually manage music."

Source: http://support.apple.com/kb/ht1202


did you try:

hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/target.iso

after that unmount using:

diskutil unmountDisk /dev/diskX

(X is the disknumber of your usb device)

Now just burn it using dd

sudo dd if=/path/to/target.img of=/dev/rdiskN bs=1m


Remove Find my iPhone lost mode passcode lock from every wake

http://support.apple.com/kb/PH2700 explains that you should click the Lost Mode link again to change the status on the phone.


Mac Mail not including original email headers in Reply

Unfortunately, you can't customize the Reply/Forward headers without the help of QuoteFix or ReplyWithHeader.
To customize the actual headers when viewing an email message, I'll quote this MacFixIt article:

To alter the headers that Mail includes, you can go to the Viewing section of the Mail preferences, choose the Custom setting, and then add or remove any fields of the e-mail header that you wish to see. Unfortunately you need to enter the field names manually, and many times e-mail services will append their own header details to a message, especially for handling spam or other security features. Therefore if you are not sure what the header titles are then you will need look them up in the raw source code for any particular message.
To do this, select a message in your inbox and then press Option-Command-U or choose "Raw Source" from the View > Message menu. In the resulting window you will see all the message details in plain text. Header fields will be the text before colon characters with dashes in them in place of spaces, and may include items like "Delivered-to:" or "Return-Path:", or custom items like "X-Virus-Scanned:" for antivirus information.
When entering these details in the custom headers list, be sure to enter them as is (including the dashes), after which be sure that Custom is selected in the preferences and that the Details link is clicked in your e-mail messages.


Just double click exactly on the number of the day, instead of double-clicking in the "body" of the day.

For example, if you want to have a day view for July 1st, double-click on the "1 Jul".


Try this, it's a bit of a kludge but it should work:

Open /Applications/Xcode.app/Contents/Resources/xcode-project_Icon.icns in an editor like Preview or GIMP.
Select whichever resolution you want to modify.
Add whatever text you want, e.g. the project workspace name.

Side note: This may ask you to duplicate the file before editing it. Don't worry about this.

* Do not save this! * (You probably won't be able to anyway.)
Press File > Save As... while holding Option, or press ⇧⌥⌘S, and save it as a PNG somewhere, if you want to keep it around. (I would recommend this, but you certainly don't have to.)

If you're using a third-party image editor like GIMP, you may not have to use the Option key.

Open the PNG you just saved. (Or if you chose not to save it, ignore this step.)
Select All (⌘A), and copy it (⌘C).
Go to the project you want to change the icon of.
Press File > Get Info (⌘I).
Click on the icon in the top left of the info window, and paste (⌘V).

The second part of this also works for any icon you might have laying around! You can change  the icons of anything, including folders and even apps, this way. (But if you're changing an app icon, be aware that some apps change their own icon while they're running. It'll change back when the app quits. For example, Firefox does this when downloading a file.)


Google+ hangout mic volume on iPhone4/the new iPad

Unfortunately, there are no options for adjusting Mic volume in iOS, as it's handled automatically by the audio subsystem. I tested this on my iPhone and where was no problem with the volume at all. If you have a case on your iOS device, make sure it's not one of the many designs that inevitably muffle the Mic by being so close to it. Secondly, I would suggest trying a pair of earbuds or Apple EarPods, anything with an inline Mic that works with your iOS device, and try a hangout then. If the others are able to hear you clearly with the earbuds/EarPods w/ inline Mic, but not so clearly when it's just the built-in Mic, I would consider taking it to Apple and at least have them look at it. It's quite possible your device could have a somewhat faulty Mic. I've had a few iPhones with faulty parts that were manufacturing errors, and Apple replaced them free.

Sorry I can't offer more help, but there's no options for adjusting the volume of the Mic in iOS, so I would look at eliminating possible physical matters.

Good luck and happy hangin'!


Is the Macbook Pro limited to about 800Mbps of 802.11ac Wifi?

No, there isn't such a general 800 Mbps limitation.

The theoretical limits of the WiFi in those two MacBook Pros are 1300 Mbps. For example the 2014 MacBook Pro uses a BCM4360 WiFi chip from Broadcom that allows for speeds up to 1.3 Gb/s.

In practice, the actual speed is limited by factors such as distance from the access point, obstacles between laptop and access point, reflections of the signal, other interfering signals, the WiFi hardware and software support of your access point, traffic from other devices on your WiFi, etc.


Delete apps from Launchpad or from Finder?

Deleting apps from Launchpad and Applications folder are similar but for an extra step. When you delete from Launchpad, MacOS removes it completely from  your system.
From Finder(Applications folder), you move it to Trash and have to empty the trash to completely delete the app and generate space out of it.

Those apps which cannot be deleted from LaunchPad (without X) are apps pre-installed by the OS and needed by it or apps that you have installed separately using a DMG file from third party like Google/ Mozilla FF.

Rest apps which can be deleted are apps installed from AppStore.


It could be as simple as a worn or partly disconnected ribbon cable, but the centre section makes me think it's physical screen damage. Without hands-on it's hard to say.
Your choices are… re-seat or change the cable & see if it improves, or take it to a professional. The cables are very fragile and this new a Mac might be covered if it’s failing in the terms of coverage.
Your test of an external monitor eliminates the GPU being at issue. One further test would be take a screenshot & view it on the external monitor.


The real answer is because Apple Pay stores the card info locally on your phone/watch. That's why when you get a new device, you need to re-sync and re-setup all your cards.

In contrast, iCloud subscription is billed directly from Apple's servers with whatever payment method they have on file. They don't have access to the card in your Apple Pay which is stored securely on your individual devices.

In the article about Comcast posted by oa- in the other answer, the actual thing Comcast is allowing users to do is to open their app and make a bill payment from the phone using the Apple Pay card stored on that phone. It still doesn't allow reoccurring automatic payments, because it can't.


Constant popups for bla-bla wants access to bla-bla keychain

https://discussions.apple.com/thread/5680074?tstart=0

I got this from an answer on the Apple.com site link (above) after about 6 hours searching and trying different solutions.  It's the only one that hasn't shown at least one of those login prompts in the first 5 minutes.  Thanks to 'rccatalyst' for providing it.  I'm copying it here, because Apple support just hasn't worked for me. The thread linked above it 4 years old and yet it hasn't turned up in any of my FAQ/google/KB searches.

Open 'Terminal' and run the commands below.

cd ~/Library/Keychains

ls

(When you 'ls' here you will see a folder that contains a bunch of random number like so:
94ED610F-DD96-4ECF-A2BC-7D2F8653A464 (this number is unique on each system))

rm -rf 94ED610F-DD96-4ECF-A2BC-7D2F8653A464 (i.e. whatever your code is)

Now reboot your Mac.

When you log back in everything should be back to normal.


Installing OS X on new SSD with 10.8 found online

Use the checksum to validate the integrity of the file.

Sometimes when you download large files, the host will provide an MD5 checksum, which is a hash of the raw file data that you can use to compare and see if any of the data was corrupted, changed, or lost during the download process.

To verify the MD5SUM in OS X, simply open the Terminal and type “md5″ followed by one space, and then drag and drop the downloaded file from the finder into the terminal window.

Hit return on your keyboard and wait a few moments (The larger the file, the longer it will take).

The terminal will spit out the MD5 hash for the file, which you can then compare to the once provided by the download originator!


slow boot (and slow EFI?) in brand new MacBook Pro 16"

I wish I had that fast new gear, but if I were to triage this, I would do some tests with FileVault enabled and FileVault disabled and [avoid the power button. It would be super frustrating to have a slow boot and I’m sure with some tests, there’s a reason why it’s slow and figuring and then solving that technical detail would be satisfying indeed.
As to the process to quantify this startup, use something other than the power button. Use lid open to wake, press any key or connecting power and also use a camera to time things (or narrate while recording to a watch or phone.) Make sure you test no FileVault and automatic log in on a clean erase / install with nothing connected save the Apple power adapter if you suspect hardware being the cause and not software you loaded. Then enable FileVault, and let it finish encrypting and repeat the test. It will pause for you to log in, but you can subtract that delay later - it shifts the boot order on you.
Then once you’re sure the timings are repeatable or know the variance, boot to internet recovery and erase everything and reinstall the latest shipping OS and note that build number once booted. Since you’re on beta, you might have pre-release bridge / firmware and need to wait for that to ship if you want to have Apple look over the logs to see if a repair is in order.

https://support.apple.com/en-us/HT204904

I would not use any install method other than internet recovery and erase install in this case, that ensures you get any bridge, firmware updates slipstreamed into the install process and you do depend on Apple to clean up in the coming months since you hopped on the beta train. If there is something amiss, it should be pretty easy to compare with other similar models and know yours is as fast as them or not. Great work on the 17 sec time - that’s one item to benchmark, but looking at the log files and collecting extra data points might help.


How do I turn off the automatic downloading of iOS updates?

This is really now a non-answer - empirically, it appears no-one has yet found a way to prevent iOS updates from downloading except by leaving insufficient space for it to fit.

Settings > App & iTunes Stores...

Switch off either Updates specifically, or all Mobile data


Terminal stuck at error won't accept any commands.

Well the error you're getting sounds like you've tried changing the $PATH variable somewhere.
Possible candidates (not all of them need to exist) are

/etc/profile
/etc/bashrc
~/.bash_profile
~/.bash_login
~/.bashrc
~/.profile

Find all lines starting with export that contain the path you've posted above in those files and prefix them with a # to disable them. Restart iTerm and the error should be gone.

Regarding the deleted .plist, do you happen to have a TimeMachine (or other) backup that you might recover it from? Before re-installing everything you could also test creating a new user and copying the file from this account to yours.


Find all my backed up photos on Time Machine drives

Aha! Here's the answer: https://superuser.com/a/1591350/2684
On Big Sur (macOS 11), you need to go to System Preferences and enable Full Disk Access for the Terminal (or, iTerm, in this case). Then, magically, a command like:
chmod "-a#" 0 Backups.backupdb/

works just fine.

I also learned that chmod -N will removal all ACLs from a file, via https://superuser.com/a/299912/2684 .


Time Machine bug - not enough space, folder cannot be deleted

You can try this method. it has worked in the past. Open your Time Machine backup disk and then Enter Time Machine using the Time Machine icon in the menu bar. Now you should be in Time Machine with a list of the backups. Select one of the backups and then look for a gear icon near the header of the backup you selected. Click on this gear icon and it should have an option to delete that backup. If you open a Time Machine folder you can use the gear icon to delete that folder. Here is what the gear icon looks like:


iOS 6.0.1 thinks all calendar events are invitations

This appears to be an issue when Google is set up as a Microsoft Exchange account type (Google Sync) rather than the normal Gmail account in the Settings app. You can check that this is the case for you by opening the Settings app, going to the Mail, Contacts, Calendars section, and tapping on your Google account. If you see Exchange at the top of the page - rather than Gmail - then this applies to you.

It seems that in fixing an Exchange bug Apple broke Google's Microsoft Exchange implementation.

It also seems only to be a problem with secondary accounts.

As a temporary measure – until either Apple or Google have fixed this problem – you could open the Settings app, go to the Mail, Contacts, Calendars page, and Add Account... of type Gmail. You only have to turn on Calendars for this account, as the rest of the Microsoft Exchange implementation seems to be working. Then go to your original Microsoft Exchange account and turn off Calendars. You will be warned that all your Exchange ActiveSync calendars will be removed from your phone; choose to delete them. Finally, you might want to adjust the Default Calendar in the Calendars section of the Mail, Contacts, Calendars settings page

A few caveats with using a Gmail type account for calendars:

Google event invitations will no longer work
Syncing for calendars is now pull, rather than push; i.e. changing an event on another device will not be reflected immediately in your iOS calendars

Also, beware that events you have declined will not appear in iOS, and you may have accidentally declined events while getting frustrated at the iOS 6.0.1 calendar problem. These you will need to fix in the Gmail Web Client.


You can also use AppleScript instead (/Applications/Utilities/AppleScript\ Editor.app/).

The following script starts the Terminal.app every seven seconds:

on idle
    tell application "System Events"
        tell application "Terminal"
            run
        end tell
        return 7
    end tell
end idle

Save this script as an application and let it "stay open after run handler".


Stolen iPhone: what is the security risk?

Actually, the data on your iPhone 6 is encrypted at rest and furthermore no data comes off the device even if it is connected to a computer. Someone would need to brute force the PIN and then press Trust to trust a computer which would then be able to transfer off data or sync the device.

It's suspicious you got password resets. Perhaps the lock screen was configured to allow them to reply to messages or dial phone numbers or otherwise look at incoming mail. That would of course mean that the phone had WiFi or data connection - so in that case, the remote wipe is a good possibility.

I hope you get a response to the wipe, but you are in a fairly good situation all things considered.

Here are Apple's documents on how data is protected and what to do in the case your device is lost or stolen:

https://support.apple.com/en-us/HT202775
https://support.apple.com/en-us/HT201472


Xcode 4.1 installation not customizable? Missing Installation Type Step?

You can control or right click to show package contents and run only select portions of Xcode 4.1.

The program Pacifist will let you look into the packages to see what each contains.

The installer has changed to remove the options - it's all or nothing. If space is tight on your boot drive, you will have to either install to another volume and move parts back or temporarily free up enough space to install and clean out what you don't want to keep.


Monitor disk activity per volume without third-party software

Try using iotop in Terminal:

iotop -C 5 12

This would output 12 samples, each 5 seconds long. See this answer for more information.


Screen Time: how can I disallow bypassing limits?

Require a Passcode to bypass Screen Time limits:

Settings > Screen Time > Use a Screen Time Passcode

Once this is set, you will need to enter the passcode to bypass the limits. Arrange so that you do not have access to the passcode and you will not be able to bypass the limits.


Can't change media kind from music to podcast in iTunes 12

So I found that if I change the media type before iTunes "processes" the file I'm able to set it as podcast. After it's already been processed I'm not able to do it. So I just deleted my file from iTunes, re-added it, and was able to edit the media type.


Note:  This answer can be applied to any ISP supplied router; it's not limited to the model identified in the question.

The fact that all your devices are losing Internet at the same time narrows the potential failures down significantly and rules out a problem with your Macs and iOS devices.

The issue is down to the "router" that your provider issued you and there are two potential issues:

The WiFi radio could be faulty
The router is faulty

To test out which is the issue, connect your iMac or MacBook Pro directly to the router via Ethernet cable into one of the LAN ports (see below).  Make sure you turn off your wireless on that device.

If the problem remains, it's with the router's connection to your service provider.

If the problem goes away on the Ethernet connected device, the WiFi radio is at fault and the router needs to be replaced.  However, I personally, wouldn't depend on a service provider supplied router.  I would get one that I have control over and just put their router in "bridge mode."


iOS Update causes iCloud Photo Library issues

So I talked to the Apple Support and their solution was to...wait. So I waited until everything was uploaded again. This took around 12h. Then it started downloading files again, then it switched to "Updating" and then everything was fine again.

The person on the hotline said that it has to "upload" (It actually just checks if it's already on the server, not actually uploads the file) the file. Then it downloads what's missing and fills up the missing ones.


Audio incorrectly outputs to speaker while headphones are in

Try gently cleaning the headphone jack with a toothpick, to clean out all of the dirt and lint.


command-backspace deletes a whole line. Is there a way to disable this?

Make the contents of your ~/Library/KeyBindings/DefaultKeyBinding.dict look like the text below

/* my keybindings */

{
"@\U007F" = "deleteWordBackward:"; /* delete backwards one word */
}

'@' represents the command key
'\U007F' represents the delete key
'deleteWordBackward' is a keyword which Cocoa applications understand

Once you restart any Cocoa app, this will now just delete one word to the left of the cursor instead of everything between the beginning of the line and the cursor.


[I just realised, this won't work for Esc, as it's not considered a valid modifier, but I'm posting it just in case it may help someone, somewhere...
Best guess is something like BetterTouchTool might be able to do it]]

You can do it in System Prefs > Keyboard > Shortcuts > App Shortcuts...

The trick is to first replace the command you don't want with junk, then add the one you do want..
...however, this method will only work if the function you require also has a menu entry.

example, using Terminal as I don't have vim...

first, replace your 'bad' command with junk

Then you're free to add your new command - if it exists as a menu item.


I have been using iMazing (on the Mac) and FileApp (on the iPhone) which make it very simple, and you can just drag and drop your files back and forth.


The only way I could get this to work is by building a small Swift command-line application. It works pretty well, with two major caveats:

You cannot have Do Not Disturb scheduled to turn on and off at certain times (check System Preferences)
The menu bar item always looks as though Do Not Disturb is enabled, even though it is not

However, if these caveats aren't a huge deal, the app does everything else you need: it prevents the display from sleeping and enables Do Not Disturb when on battery, and reverses those settings when you connect to AC power. Here is the (slightly involved) process for creating this app:

Install Xcode from the Mac App Store if you have not already done so
Open Xcode and install any necessary components as prompted
From the "Welcome to Xcode" window, select Create a New Xcode Project

Select macOS at the top of the dropdown that appears, then select Command Line Tool under the Application header and click Next

Enter something for your product name—which is the name that will appear on your app (I'm going to be using BatteryDetector)—and fill in the other fields (they don't really matter); make sure the language is set to Swift!

Select somewhere on your computer to save the project (wherever you want), uncheck the box for creating a Git repository, and click Create

Once your project is created (a new window will open), select File > New > File… or press ⌘N to open the New File dialog
Select Header File as the file type and click Next

Name your file [your project name]-Bridging-Header.h, substituting your actual project name for [your-project-name]. In my example, the name would be BatteryDetector-Bridging-Header.h.
Make sure that the Group at the bottom of the dialog has a yellow folder icon next to it and says the name of your project. If it has a blue icon or something else, change it to the option that has a yellow folder icon and the name of your project. See the screenshot below for the correct configuration. When everything is correct, click Create.

Once the file is created, it should automatically be opened. Once it is, erase all of the auto-generated contents and paste in the following code. The code below should be the only code in the file:

#import <IOKit/ps/IOPowerSources.h>

Next, select the project at the top of the hierarchy in the top left of the window, then select the target under the Targets list, select Build Settings at the top of the main panel, and ensure All is selected beneath that (see screenshot below)

Use the search box in the top right of the Build Settings screen to search for objective-c bridging header. You should see a setting called Objective-C Bridging Header come to the top of the list.
Double-click to the right of the Objective-C Bridging Header label so that a text box appears, and enter [your-project-name]/[your-project-name]-Bridging-Header.h in that text box, replacing [your-project-name] with your project's actual name. In my example, I would enter BatteryDetector/BatteryDetector-Bridging-Header.h. Then press return.

Next, click on the main.swift file in the file tree on the left. Delete all of the code it contains, and paste in the code below. The following code should be the only code in main.swift:

import Cocoa

var context = 0
var proc: Process!

func enableDND() {
        CFPreferencesSetValue("doNotDisturb" as CFString, true as CFPropertyList, "com.apple.notificationcenterui" as CFString, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost)
        CFPreferencesSetValue("doNotDisturbDate" as CFString, Date() as CFPropertyList, "com.apple.notificationcenterui" as CFString, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost)
        commitDNDChanges()
}

func disableDND() {
        CFPreferencesSetValue("doNotDisturb" as CFString, false as CFPropertyList, "com.apple.notificationcenterui" as CFString, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost)
        CFPreferencesSetValue("doNotDisturbDate" as CFString, nil, "com.apple.notificationcenterui" as CFString, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost)
        commitDNDChanges()
}

func commitDNDChanges() {
        CFPreferencesSynchronize("com.apple.notificationcenterui" as CFString, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost)
        DistributedNotificationCenter.default().postNotificationName(NSNotification.Name(rawValue: "com.apple.notificationcenterui.dndprefs_changed"), object: nil, userInfo: nil, deliverImmediately: true)
        NSRunningApplication.runningApplications(withBundleIdentifier: "com.apple.notificationcenterui").first?.terminate()
}

func startCaffeinate() {
        proc = Process()
        proc.launchPath = "/usr/bin/caffeinate"
        proc.arguments = ["-d", "-i"]
        proc.launch()
}

func stopCaffeinate() {
        proc.terminate()
}

let loop = IOPSNotificationCreateRunLoopSource({(context: UnsafeMutableRawPointer?) in
        let snap = IOPSCopyPowerSourcesInfo().takeRetainedValue() as CFTypeRef
        let source = IOPSGetProvidingPowerSourceType(snap).takeRetainedValue() as String
        if source == "Battery Power" {
                enableDND()
                startCaffeinate()
        } else {
                disableDND()
                stopCaffeinate()
        }
}, &context).takeRetainedValue() as CFRunLoopSource

CFRunLoopAddSource(CFRunLoopGetCurrent(), loop, .defaultMode)

RunLoop.main.run()

Next, export the application by selecting Product > Archive in the menu bar. Once the archive finishes, a window will appear with an Export button. Click Export, select Built Products, and click Next.

Select a location where you will save the exported executable on your disk, then click Export.
Now, navigate to the folder you just saved to your disk (called [your-project-name] [today's-date]) and navigate through all of the subfolders (probably usr, local, bin) until you find the executable called BatteryDetector (or whatever you named your project). You can store this executable anywhere on disk, but it should be at a stable location (i.e., a location from which you don't plan on moving it) or your computer won't be able to locate it.
Next, copy the following text and paste it into a text-editing program like TextEdit or a code editor (make sure that it won't convert quotes to "smart quotes"). Replace the text [your-executable-location] with the full path to where your executable is stored on disk (e.g., /Applications/BatteryDetector).

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
        <key>Label</key>
        <string>com.launchagent.batterydetector</string>
        <key>Program</key>
        <string>[your-executable-location]</string>
        <key>RunAtLoad</key>
        <true/>
  </dict>
</plist>

Once you have entered the correct path, copy the newly-modified text (i.e., with your corrected path) to your clipboard.
Next, open Terminal (located at /Applications/Utilities/Terminal.app).
Type the following into Terminal, exactly as it is written here, and then press return. Do not copy and paste it—the command will only work if the text you just modified is currently on your clipboard: test -e ~/Library/LaunchAgents || mkdir ~/Library/LaunchAgents; pbpaste > ~/Library/LaunchAgents/com.launchagent.batterydetector
Finally, log out and then back in to start the app running. It will continue to run in the background, and will automatically start each time you log in. If you need to quit it for some reason, use Activity Monitor and search for the name of your executable (e.g., BatteryDetector).

Here are some sources with more information about some of the code I'm using:

Create a CFRunLoopSourceRef using IOPSNotificationCreateRunLoopSource in Swift
sindresorhus' do-not-disturb on GitHub


Transfer Word and pdf files between PC and iPhone

You have various options. You can use a cloud service like Google Drive or Dropbox or Microsoft OneDrive and that will let you access files there or save files to there on either device.

I'm not very familiar with Windows, but depending on the version of iOS you're running you may be able to plug it in over USB to your PC and use some program to browse the file system on the phone (on Mac I can use iFunBox or something like that, but I only resort to that in special cases). That would work if you don't have Internet access but you do have USB access.

I don't quite understand the other part of your question. Like any smartphone, an iPhone works best if it is online (cellular or WiFi). What you can do will depend on the app. You will be able to record notes and take photos and listen to music and whatever else depending on the app. You can't check new mail or browse the web of course though without Internet.


Accessing fine-grained volume control using external keyboard volume wheel

You should be able to use Karabiner-Elements to do this. It allows you to customize keyboard actions on a per-device basis. You could set it up to replace Volume Up / Volume Down with Option + Volume Up / Option + Volume Down.


Find My Phone App shows my IPOD Touch is in California, but I have it with me in Missouri

Since iPods don't use cellular or GPS data it relies on wifi triangulation to get the closest GPS coordinates. I would simply reset your iPod touch so it can reboot based off the current network.


If you're looking to turn an old iMac into a print server so that you can print from another Mac over the network, there's no need to mess around with cups or Debian.

Just install Mac OS X, then go into System Preferences -> Sharing then turn on Printer sharing. From there you can select which printers to share and which users can access them.

On your other Macs, you can add these printers in the System Preferences -> Print & Fax pane by clicking the "+". If both computers are on the same network, your Macs should automatically detect the shared printers on your iMac.


Error when "unzipping" powerpoint file using Archive Utility

The way to do it is to either try different unzip utility, such as 7zip, or use terminal: navigate to the folder with your "test.pptx.zip" and run these commands:

mkdir test_dir
cd test_dir
unzip ../test.pptx.zip

First line creates folder test_dir and then moves to that folder. Final command unzips your pptx file into test_dir folder


Downsides of encrypting disk with FileVault

The implementation of Corestorage / Filevault2 is pretty great. That means you will hardly notice that your system is encrypted. I see the following points you may want to consider:

As you say: If you loose the passcode it is next to impossible to access your data.
There is a very slight performance hit because the CPU needs to constantly encrypt and decrypt your data. But moderns CPUs are optimised to do so and therefore the impact is negligible.
If your disk is corrupted or faulty in some way it may be more difficult to fix a corestorage volume than a standard HFS volume. Personally, this has never been a problem for me.
Passwordless boot or waking from standby is not possible anymore.
The most obvious difference is pre-boot authentication. That means you need to enter your password before  the Mac boots up. Without encryption the system would boot and only require your password to log into an account.
Depending on your level of paranoia Filevault2 alone may not be enough. You should consider to also encrypt your backups (even higher risk for total data loss) and activate the option to destroy the password from RAM while the Mac sleeps.


How to move through words and break on punctuation on terminal?

I found an answer on Super user
The issue was that Mac went from bash to zsh. There is nothing about a shortcut to "delete part of a word". The solution is to use the common "delete word" shortcut and define what a word is: bash defines a word to be a-zA-Z0-9 but not zsh which defines words as anything in between spaces (so ab.cd or /ef/gh/ij).
for the sake of completeness, add to your .zshrc:
autoload -U select-word-style
select-word-style bash


I'm wondering if this is the "Power Nap" feature of macOS...

Check System Preferences > Energy Saver

Is Power Nap checked? That feature will let the Mac do some things in the background while sleeping. Things that use little actual battery power. That is shows 100% CPU usage is odd, so I am not certain this is Power Nap.


Macbook Pro crashes when I remove power while hibernated

I ran into a similar issue with my own late 2013 Macbook Pro running 10.9.3. In the end, I had to run the following commands with root privileges:

pmset -a darkwakes 0
pmset -a standby 0
pmset -a standbydelay 0
pmset -a lidwake 0
pmset -a acwake 0
pmset -a destroyfvkeyonstandby 1 hibernatemode 25

Once I did that, I found that I needed to wake the laptop by touching the power button (pmset -a lidwake 0 disables the automatic wake-up when you open the lid) but my MacBook Pro now hibernates properly and does not crash.

I have a post on the issues I had with 10.9.2 available here:

http://derflounder.wordpress.com/2014/02/12/power-nap-power-management-settings-and-filevault-2/


Why can I not make a hard link to PkgInfo?

This is an undocumented security "feature" of macOS. See https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/CB0zClGfh3c

  This turns out to be an issue specific to *.app/Contents/PkgInfo and .app/Contents/Resources/.lproj files. OS X does not want to permit the creation of a hard link between one of these items in an application bundle to another file in a non-application-bundle folder. I was unable to find an explanation for this behavior in Apple's documentation, nor in the source code for HFS or the OS X kernel.


iTunes thinks there is a podcast on my ipod when there isn't

I reset my iPod to factory settings. That fixed it!


How can I delete a specific line of a .txt file in AppleScript?

Here's a do shell script AppleScript command solution using sed to delete the target line of the target file, in-place.

set targetFile to "/Users/Me/Desktop/My Documents/My Fruit Log.txt"
set lineNumberToErase to 8

do shell script "sed -i '' -e '" & lineNumberToErase & "d' " & quoted form of targetFile

If you want a backup of the target file made, change the sed option -i '' to -i '.bak', e.g.:

do shell script "sed -i '.bak' -e '" & lineNumberToErase & "d' " & quoted form of targetFile


Quick Look Preview of html files not working after iOS 13 upgrade in iPad

Apple has disabled JavaScript in Quick Look for security/privacy reasons (this was used to track users previewing local files by pinging remote servers).

If you have your own app, use a WKWebView if you need JavaScript execution. If you are sending HTML content with JavaScript via email, send a link to a remote server instead. With a link people know they are contacting a remote server.


Scripted vector drawing app (à la Satimage Smile)

MetaPost

An open source and complete picture drawing language, with plenty of support and documentation, is MetaPost.

  The MetaPost system (by John Hobby) implements a picture-drawing language very much like that of MetaFont; the difference is that MetaPost outputs vector graphic files instead of run-length-encoded bitmaps; output formats available are PostScript and SVG.

MetaPost is capable of creating complex images and shapes:

beginfig(11)
    pair A, B, C;
    A:=(0,0); B:=(1cm,0); C:=(0,1cm);
    draw A--B;
    draw B--C dashed evenly;
    draw C--A dashed withdots;

endfig;

beginfig(117)
  u:=2cm;
  pair A, B, C, D, E;
  path p, q, r;

  A = u*up;
  p := (-.2)[ A, A rotated 72 ] -- (1.2)[ A, A rotated 72 ];
  for i=0 upto 5:
    draw p rotated 72i;
  endfor;
  B := 1/2[ A, A rotated 72 ];
  C := .8*B;

  p := B --- C .. (C rotated (2*72)){right};
  % On allonge le chemin p
  p := ( (point 0 of p) - 4mm*unitvector(direction 0 of p))
       --
       (point 0 of p)
       & p &
       (point 2 of p)
       --
       ( (point 2 of p) + 4mm*unitvector(direction 2 of p));

  E = p intersectionpoint (p rotated 72);
  q := p cutbefore fullcircle scaled -2mm shifted E;
  r := p cutafter fullcircle scaled  2mm shifted E;

  for i=0 upto 4:
    draw q rotated 72i;
    draw r rotated 72i;
    draw A rotated 72i withpen pencircle scaled 4bp;
    draw B rotated 72i withpen pencircle scaled 4bp;
    draw C rotated 72i withpen pencircle scaled 4bp;
  endfor;
endfig;

You can install MetaPost as part of BasicTex.

Sketch

Aimed more at designers than engineers, Sketch offers a programmable interface and AppleScript support.

Side Note

As an aside, Apple once distributed a sample vector drawing application also called Sketch. One purpose of Sketch was to demonstrate how to incorporate AppleScript into an application.


Will jailbreaking allow me to run apps that require iOS > 4.2.1?

No - we have several related questions, the best phrasing of this problem is here:

How can I make an app think it's running on iOS 5?

The newer software has code the app needs to run, so faking apps out still leaves them crashing when they call the code that only exists in iOS 5 to run.


How do I find out which file(s) an app is trying to read at launch?

Try using opensnoop:

sudo opensnoop

(You can also use -n to specify the process name, but it doesn't work with arguments that contain spaces by default. To fix it, replace "'$pname'" with "'"$pname"'" in /usr/bin/opensnoop.)

You could also try to delete files in ~/Library/Containers/ or ~/Library/Saved Application State/.


I just fixed this by deleting a large video from my iPhone.

Even though I still had about 3 GB left, it seems that iTunes wants there to remain some free space on the iPhone before syncing.

Once I had about 4 GB left, it started syncing again normally.

I hope this helps someone, and for god's sake Apple you could've included a less cryptic error message for such a simple issue.


Managing PreventUserIdleSystemSleep on MacBook

The value of that setting is not the only factor involved. I don't have a 0 for the PreventUserIdleSystemSleep and my MacBook Pro sleeps fine when I close the lid. Still, if you kill the process in question (the terminal command for your example would be "kill 10945"), you might be able see whether that could be involved. If that's all it took to let the computer sleep, then you'd have a way to manage it.

I'll give you an AppleScript that will let you kill the processes that give PreventUserIdleSystemSleep a "1". You can run the script, enter admin password to confirm when prompted, then run "pmset -g assertions" in Terminal again to confirm that they're all gone. Then close the lid to see if the MacBook sleeps. I can't promise that doing it won't lock up your computer or make it shut down, so be ready for that.

repeat
try
    set pid2kill to word 2 of (do shell script "pmset -g assertions | egrep \"PreventUserIdleSystemSleep named\"")
    do shell script "kill" & space & pid2kill with administrator privileges
on error
    exit repeat
end try
end repeat


Is there an AirDrop client for Microsoft Windows?

No, I don't believe you can. Apple advertise AirDrop as: "AirDrop, a remarkably simple way to copy files wirelessly from one Mac to another with no setup;"
.
Key part of that sentence being "from one Mac to another" - Second bullet point: http://www.apple.com/uk/pr/library/2011/02/24Apple-Releases-Developer-Preview-of-Mac-OS-X-Lion.html. It's highly unlikely Apple would open this feature up to Windows or Linux because it's a selling point for them in new Macs running Lion.


How do I share my Thunderbolt Ethernet through WiFi in a hidden way?

While most routers provide the option to hide your SSID by not broadcasting it, to the best of my knowledge there is no built-in macOS way to do the same thing.

However, if the main reason you wanted to hide it was because you wanted to limit access to only those devices you wanted to connect to it, you can do this by setting a password on the Wi-Fi network your Mac is creating/sharing.

You can do this from the System Preferences > Sharing pane.

When you look at the Internet Sharing options, click on "Wi-Fi Options" button at the bottom-right of the screen and then you will be able to set the name, channel, and password of your ad-hoc network.

By doing this, other devices may be able to see your network, but they can't connect without the password.


Selectively restore from a time machine backup created on snow leopard to a different machine running mountain lion

You can just copy folders and files from /Volumes/*/Backups.backupdb/ normally. Finder and cp don't preserve hard links.


Add special characters and Emoji to maill.app Menu bar

You could add it to the (os x) menubar by going to system preferences -> keyboard and checking "Show Keyboard & Character Viewers in menu bar"


How to remove evasi0n 7 jailbreak on ip4 iOS 7.0.4?

Attempting to reset your jailbroken phone from your phone will break everything. You'll need to put your device in DFU mode and restore it with iTunes. Connect your device to iTunes, then hold the power and home button until the Apple logo shows, then keep holding home and let go of power. iTunes should prompt you to restore iOS.


This needs to be configured on your external display and not on the connected device (Mac, PC or anything else).
Make sure your external display is set to not switch to a different source automatically.


Mac OS/X won't let me mkdir /usr/share/tomcat6, even as root

That's because the /usr folder, with the exception of /usr/local, is protected by System Integrity Protection (SIP).

Check this Apple support page for more details on SIP. This answer gives details on how to disable SIP and more info.


Tilde (~) and plus-minus (±) in wrong place on keyboard

Here’s a solution that does not use any external tools.
Run this in Terminal.app:
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000035,"HIDKeyboardModifierMappingDst":0x700000064},{"HIDKeyboardModifierMappingSrc":0x700000064,"HIDKeyboardModifierMappingDst":0x700000035}]}'

Now try your ~ and ± keys: they should be switched around.
Problem is, this fix will only work until the next restart. To make it permanent, you have to automatically run it on system load.
You can do that in three Terminal.app commands:

cat << 'EOF' > ~/.tilde-switch && chmod +x ~/.tilde-switch
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000035,"HIDKeyboardModifierMappingDst":0x700000064},{"HIDKeyboardModifierMappingSrc":0x700000064,"HIDKeyboardModifierMappingDst":0x700000035}]}'
EOF

(This is all a single command.) This stores the script from above in an invisible executable file in your home directory, ~/.tilde-switch.

sudo /usr/bin/env bash -c "cat > /Library/LaunchDaemons/org.custom.tilde-switch.plist" << EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>Label</key>
    <string>org.custom.tilde-switch</string>
    <key>Program</key>
    <string>${HOME}/.tilde-switch</string>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <false/>
  </dict>
</plist>
EOF

(This is all a single command.) This creates a system task: ‘run the file from step 1 on every startup.’

sudo launchctl load -w -- /Library/LaunchDaemons/org.custom.tilde-switch.plist

This loads (activates) the task from step 2.

Steps 2 and 3 will prompt for your password. And now, your ~ and ± keys are permanently switched.
Note 1
This appears to work not only on the MacBook's build-in internal physical keyboard, but on the external keyboards as well.
Note 2
To undo the switching script (not the three steps), here’s the reverse script:
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000035,"HIDKeyboardModifierMappingDst":0x700000035},{"HIDKeyboardModifierMappingSrc":0x700000064,"HIDKeyboardModifierMappingDst":0x700000064}]}'

Note 3
To undo the three steps:
sudo launchctl unload -w -- /Library/LaunchDaemons/org.custom.tilde-switch.plist; sudo rm -f -- /Library/LaunchDaemons/org.custom.tilde-switch.plist ~/.tilde-switch

Credit
This solution is inspired by this article:
http://homeowmorphism.com/articles/17/Remap-CapsLock-Backspace-Sierra


Apple Watch Series 3 Workout not adding to my Exercise ring! Why not?

Is your walk actually exercise?

Considering the intermittent nature of your issue, I’m wondering whether all your walks are actually exercise?

According to the Health app on your iPhone:

  Every full minute of movement equal to or exceeding the intensity of
  a brisk walk counts towards your daily Exercise Minutes.

NOTE: Emphasis mine

So, if you’re just going for a casual walk it’s not likely to count towards this ring. If your walk happens to be at a faster pace, it will. This would explain the intermittent nature of your experience with the Exercise ring, and also explains why the Move ring still works, because even a casual walk will burn calories.


To activate iMessage for a phone number, the device sends a silent SMS with a verification code. Carriers approved by Apple do not charge for this SMS. Activating without sending an SMS only activates iMessage for your Apple ID email address, not your phone number.


Missing Groups After Syncing with iCloud

If you do backups look for the .pst-file (office identity) and restore it from a backup.


How can I make a note in a Kindle book in Kindle for Mac?

You have to download the latest version (1.8.1 as of this writing) directly from Amazon, the updater doesn't seem to pick it up automatically.


How can I sync and organise apps on iPhone from Mac?

You can use the free app Apple Configurator 2 to organize apps.

Once the device is connected, right-click > Modify > Home Screen Layout:

Then you can manipulate the apps, folders and home screens as you could in iTunes.

Configurator has plenty of of neat features, especially if you manage other people's iOS devices.


Unable to access 10.2.3 16D17a machine over network

I believe I found a solution.

It appears that there may have been a change by Apple in how the Bonjour service handles router security.

I had changed my router to WPA2 due to needing to use the built in recovery system in the macOS bootloader, as it was not functional with WEP security.

I happened to notice that my AirPrint printer was no longer being seen on the network as well and I also couldn't ping it, so I changed the security back to WEP to test and Bonjour services started working again. I was able to print as well as access the apache server from my macOS machine from the iPhone across the network with the .local name.

Not being happy with having to use WEP again as it's far less secure than WPA2, I went about looking for a solution.

I have an Actiontec router used for my FiOS setup. It's a MI424-WR revision C with Firmware 4.0.16.1.56.0.10.14.4

Logged in and changed the following option:
Advanced -> IGMP Proxy -> Enabled

Bonjour services appear to be functioning properly now with WPA2 enabled. Apache server, AirPrint, Remote.app, etc. All work fine.


How to share a Smart Album in Photos App

It's quite easy:

close iTunes if it is open
have your smart albums created on photos app
still on Photos, create a new folder and named it with a unique name like
"Vacations 2018"
click on your smart album(s) and drag it(them) into the folder you just created
close the photos app
open iTunes, go to File -> Home Sharing -> choose photos to share with AppleTV
Select Share Photos from: Photos
click on Selected Albums (Select "Inlude Videos" checkbox if you want them played as well)
In the Albums collection, click on the folder you created at the beginning (Vacations 2018)
click the button Done at the bottom of the screen
close iTunes
Go to your AppleTV and select Settings -> General -> Screensaver -> Home Sharing -> Type -> Home Sharing -> Home Sharing -> Photos -> Photos. Confirm that you want to set photos as your screen saver
go back to the screensaver windows and choose the Preview option to confirm the photos are corrected select and displayed.

That's it!


First, you may try to restart it. Hold Power button for that.

Second, if this will not help try restore your iPod.
For this connect it to iTunes, choose Backup from iPod contextual menu and then press Restore. This way you will be able to rectify software problems.

Then you may try to restore iPod in Recovery mode.

If it will not help then it is either network issue or you do try to install iOS4+ only apps.

More on restore process.


On my system I can't reproduce the behavior of Sublime described by the OP. The problem may be related to an interfering third-party app/process.

One possible solution - configuring a new keycode with Karabiner to avoid the problem - is outlined below.

To disable or modify ShiftSpace in Sublime just remap the key combo with Karabiner. Usually you have to define an app in /Applications/Karabiner.app/Contents/Resources/appdef.xml if you want to adjust/modify an app-only shortcut. Since the appdef list already contains Sublime Text you can immediately add a new remapping.

Download, install and open Karabiner
Open in the menulet Karabiner -> Preferences
Open the tab Misc & Uninstall
Hit the button Open private.xml
Open the file private.xml with an appropriate editor
Enter the customized keycode

Example (ShiftSpace -> Space):

<?xml version="1.0"?>
<root>
  <item>
    <name>Enable at only SUBLIMETEXT</name>
    <item>
      <name>Shift+Space to Space</name>
      <identifier>remap.app_sublime_shiftspace2space</identifier>
      <only>SUBLIMETEXT</only>
      <autogen>__KeyToKey__ KeyCode::SPACE, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, KeyCode::SPACE</autogen>
    </item>
  </item>
</root>

Save the file
Open in the menulet Karabiner -> Preferences the tab Change Key
Hit the ReloadXML button
Enable the Sublime Text remapping. It should be listed at the beginning.


I need to download photos from iPad, to Microsoft Windows

When you say stored in iCloud do you mean the iCloud Photo Library? If this is the case you can go to Settings - iCloud - Photos and switch from Optimize Storage to Download and Keep Originals to download full copies of your photos back to the device. Turning off iCloud Photo Library will also give you this option.

And as was also mentioned you can also log in at iCloud.com and get them from there.

ETA: there's also the iCloud for Windows option.


change filesize of iPhoto image before adding it to a mail

If you click the email button in either Aperture or iPhoto, or for any photo you drag into Mail, you'll find a drop-down at the bottom of the window once you select an image that allows you to change the size of the image, and it tells you the size of the resulting file.

Small, Medium, Large, and Original are the options.

As I said, this works for any image in Mail. It won't affect the originals in any way. It's the easiest way I've found to change the images, and it tells you the results on the fly, so you can adjust each image as required.


MBP, El Capitan - Keyboard not working, but I can get to safe mode?

Since the hardware diagnostics test did not find anything wrong with the keyboard, this is more than likely a software glitch.

Take your laptop into an Apple Store, they always help out with things like this.


Securely erase all user data on an old iBook

You can use the Disk Utility program supplied by Apple - and you can tell it how many overwrites you wish it to do, the last time I read that info it said one pass was not very reliable, 7 should be fine and 35 was overkill - bear in mind how long it takes to do one complete pass....

A similar question is here : Selling a Macbook Pro - removing personal information from it

Edit: You need to boot from a different media as it cannot work on itself so, either the original install disc or a newer install disk for a later version - as older ones don’t usually work forwards... Other bootable media may also work - but that I have not tried...


Your ln syntax is wrong, which is leading to self-referential symbolic links. For example:

% mkdir .dotfiles
% cd .dotfiles/
% touch .foo
% ln -s .foo ..
% cd ..
% ls -l .foo
lrwxr-xr-x  1 tph  wheel  4 Dec  5 10:38 .foo@ -> .foo

At this point .foo exists but it's a symlink to itself, not to the copy in .dotfiles.

Probably the easiest way to do it is to cd ~ and make the symlinks from there:

% cd ~
% ln -s .dotfiles/.foo .
% ls -l .foo
lrwxr-xr-x  1 tph  wheel  14 Dec  5 10:46 .foo@ -> .dotfiles/.foo


Turning off hibernate on a mid 2012 MacBook Pro with an SSD

Although this is an old question, I would like to update it with my answer because it is still relevant to me.

http://blog.alutam.com/2012/04/01/optimizing-macos-x-lion-for-ssd/#hibernation

sudo pmset -a hibernatemode 0
sudo rm /var/vm/sleepimage

  We do not recommend modifying hibernation settings. Any changes you make are not supported. If you choose to do so anyway, we recommend using one of these three settings. For your sake and mine, please don’t use anything other 0, 3, or 25.
  hibernatemode = 0 (binary 0000) by default on supported desktops. The system will not back memory up to persistent storage. The system must wake from the contents of memory; the system will lose context on power loss. This is, historically, plain old sleep.
  hibernatemode = 3 (binary 0011) by default on supported portables. The system will store a copy of memory to persistent storage (the disk), and will power memory during sleep. The system will wake from memory, unless a power loss forces it to restore from disk image.
  hibernatemode = 25 (binary 0001 1001) is only settable via pmset. The system will store a copy of memory to persistent storage (the disk), and will remove power to memory. The system will restore from disk image. If you want “hibernation” – slower sleeps, slower wakes, and better battery life, you should use this setting.


Is there any difference on power charger between iPhone 6 vs 6s?

Both use Lightning cable, so we are good there.
Regarding power, the 12W charger is compatible with all iPhones. See product Compatibility section of 12W charger.

iPhone Models

iPhone
iPhone 3G
iPhone 3Gs
iPhone 4
iPhone 4s
iPhone 5
iPhone 5c
iPhone 5s
iPhone 6
iPhone 6 Plus
iPhone 6s
iPhone 6s Plus

So you should be confident of charging iPhone 6 or 6s with up to 12W charger. The higher the wattage the lesser is the charging time.


Downloading iOS music from iTunes onto iPad without being erased

I think you can download it on your computer, then sync with iTunes your music by activating Manually manage music and videos on your device's options.

That will allow you to just drag and drop music to your device without deleting anything on it.

Source: Apple Support


Replace logic board on MacBook pro retina early 2013

Inquire at [Other World Computing].1 They will know which part and why.

The classic resource for complete info on every Apple machine is everymac.com.


OS X installer booting instead of Macintosh HD

Just install the system again: it shouldn't overwrite any files outside of the system.


How to limit bandwidth of a specific app (iTunes)

This utility allows you to throttle speeds on certain domains -  http://osxdaily.com/2009/08/19/limit-connection-bandwidth-with-speedlimit/

You could then throttle the domains that iTunes uses - a1.phobos.apple.com to a1999.phobos.apple.com


How to detect when a process starts up on macOS?

Create the App

Open this in Script Editor and export it as a read-only application and make sure stay open after run handler is off

After exporting follow this
 guide to prevent it from show up in the dock.

# Block Apps By Josh Brown
# Last Modified: Aug 23 2018
global applist

on run
    set applist to {"Google Chrome", "App Store"} -- Apps to limit
    if checkapps() then
        killall()
    end if
end run
on is_running(appName)
    try
        if (the length of (do shell script "pgrep -x " & quoted form of appName) > 0) then
            kill(do shell script "pgrep -x " & quoted form of appName)
        end if
    end try
end is_running

on checkapps()
    set x to false
    repeat with a from 1 to length of applist
        is_running(item a of applist)
    end repeat
    return x
end checkapps

on kill(theID)
    do shell script "kill -9 " & theID
end kill

Create the LaunchDaemon

Note: You must be an admin to do this.

Save the following file to /Library/LaunchDaemons/

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Label</key>
        <string>com.PlzUpvoteMy.answer</string>
        <key>ProgramArguments</key>
        <array>
            <string>/usr/bin/open</string>
            <string>-W</string>
            <string>**/path/to/application.app**</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>StartInterval</key>
        <integer>5</integer>
        <key>UserName</key>
        <string>**UserToBlock**</string>
    </dict>
</plist>

Change the permissions with the following command:

sudo chown root:wheel /Library/LaunchDaemons/com.MyName.plist

Load the Daemon

Note: You must be admin to do this.

To start the daemon use this command:

sudo launchctl load /Library/LaunchDaemons/com.MyName.plist

The program will scan for the apps every 5 seconds and close them if they are running.

To stop the Daemon use this command

sudo launchctl unload /Library/LaunchDaemons/com.MyName.plist


Here is the way I would try completing this task:

Create a script file that will be executed every time the system starts:

sudo nano ~/sleep.sh

Input the following text in the file:

#!/bin/bash
sleep 120
pmset sleepnow
#osascript -e 'tell application "System Events" to sleep'

Note: The last line with the # at the front is a substitute of the one above (pmset sleepnow)

Open the CronJob editor in order to start the script frequently:

  env EDITOR=nano crontab -e

Input rule for the script to be started automatically

  * * * * * sh ~/sleep.sh

Re/start the current CronJobs:

  sudo touch /private/etc/crontab

P.S. I haven't tested it, but I will gladly help if anything additional is needed.


This is how I'd code it:

on run {input, parameters}
    set aURL to input as string
    set sanatizedURL to ¬
        do shell script "sed -e 's:%:\\\\%:g' -e 's:#:\\\\string#:g' <<< " & aURL's quoted form
    return sanatizedURL
end run

      Hint: Mouse over and horizontal scroll to see full code.

Notes:

input is a list e.g.:

{"http://books.google.com?xxx&xxx%22+xxx#v=onepage&q=%22Search%20String&f=false"}

set aURL to input as string makes it:

http://books.google.com?xxx&xxx%22+xxx#v=onepage&q=%22Search%20String&f=false

In the do shell script command sed only needs to be called once, not twice as in the original code. sed can take multiple commands by using the -e option, thus no need in this case to pipe the output of one sed command to another sed command.

It is not necessary to echo something to sed as it can process a file or a here string, thus the use of <<< in the do shell script command, followed by & aURL's quoted form which is e.g.:

'http://books.google.com?xxx&xxx%22+xxx#v=onepage&q=%22Search%20String&f=false'

By quoting the value of aURL it keeps the shell from processing any shell special characters in the string.

Thus, when run, the do shell script command looks like e.g.:

do shell script "sed -e 's:%:\\\\%:g' -e 's:#:\\\\string#:g' <<< 'http://books.google.com?xxx&xxx%22+xxx#v=onepage&q=%22Search%20String&f=false'"

      Hint: Mouse over and horizontal scroll to see full code.

The use of : vs. / in the sed command is a personal preference in this case as it makes the command easier to read when having to make multiple escapes.

The use of echo in the original code flattens the list to a string, however I prefer to not use that method in order to make the do shell script command less complicated.


It seems there is either a bug with OS X 10.9.2 and a framework related to the camera or the way apps integrate with the camera. This has affected numerous people, mainly those with AirDisplay (due to the integration that AirDisplay provides — it's not really using supported APIs).

Until this problem is fixed, either by AirDisplay or OS X (for those suffering with a similar problem that seems to be caused by FaceTime), uninstalling AirDisplay and/or turning off FaceTime seems to fix it.


From the same question asked on SO:

To remap the esc key you have to copy

/Applications/TextMate.app/Contents/Resources/KeyBindings.dict

to

~/Library/Application Support/TextMate/KeyBindings.dict

and then edit it, preferably using TextMate :) as Property List Editor messes up the codes.

Look for nextCompletion and previousCompletion and replace their values with whatever suits your needs best.

For example, you could replace \033 (code for esc) to ->|tab.


How can I alternate stopping the spinning disk and the fans?

As mentioned in my comment, your best bet to reduce noise would be to migrate to a computer with an SSD drive or replace the drive in your existing computer. The noise from a standard hard drive is highly variable, while the noise from a fan set at a constant speed with fan control software would be white noise.

In regards to turning off the fan entirely, that would be risky as the Mac not only has tight tolerances that allow heat to build up quickly when the fan is off, but the OS on Macs has regular cron jobs that kick off in the middle of the night- jobs which can cause the CPU to spike in use and generate heat.

A better bet is to just keep the fan on a constant, but lower speed using fan control software. Say around 1500-2000 rpm.

That plus an SSD should allow you to have manageable sound levels, while retaining the performance of a full MacBook Pro, as opposed to the less powerful fanless MacBook or MacBook Air.

For the near term verification need, I'd recommend:

going to a local electronics store with a minimum 14 day return policy (Amazon would also work), purchasing an SSD drive and a hard drive enclosure
Then install the SSD drive in your computer and the old hard drive in the external enclosure
Then manually install Mac OS X to the new SSD and, using the external enclosure, restore your data to the new SSD drive from the old hard drive.
monitor the sounds levels over a week or so to see if they've improved.
If not, then you can swap the hard drives and use the external enclosure as a means to allow you to wipe the new SSD. Then you can return both of them to the store.

If you really want to risk your system's stability and potentially cause damage, you cannot use Mac OS X, as Apple has it locked down to prevent turning off the fans.

If you can dual boot with Windows or Linux with boot camp you can use the app called "speedfan" in Windows or a terminal command in Linux, "pwmconfig".  Both of those might allow you to turn off the fans completely, but at a risk of system damage.


Where are the commercials coming from in itunes and how to remove them?

Re-install the iTunes because it's not a normal thing to be happening


How do I find where an environmental variable got set?

~/.MacOSX/environment.plist is read at session start. If you want your change to it to be tested immediatly you have to restart your session.
A restart of the system is useless.
You can edit this environment initialisation file with:

plutil -convert xml1 environment.plist
vi environment.plist

I advise you to simply recover it to its version prior to your software
installation.

Other hint, check all the files which were modified on the date
of installation of your unwanted software.
If you installed your software 15 days ago, you can perform this with:

find / -mtime -16 -mtime +14 -ls


I'm using Acrobits Softphone, and it is working very fine for me.

It supports many VoIP providers - here is a list: https://www.acrobits.net/about-us/partners#tab_verified-voip-operators.

ZRTP is supported too: https://doc.acrobits.net/general/secure_communication.html


Can you list Mail attachments separately rather than as icons in the text?

The following command can be entered into terminal to disable the inline display of Mail's Attachments:

defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes

to restore the original functionality, use this:

defaults write com.apple.mail DisableInlineAttachmentViewing -bool no


iOS WriteRoom editor feature replacement?

My suggestion is Ulysses. A pleasant, focused writing experience combined with effective document management, fast syncing and flexible export make Ulysses the first choice for writers of all kinds.

Here is some info about synchronisation with Dropbox. A quote from that post really describes the function you are searching for.

  Once your Dropbox account is linked, you can navigate through its hierarchy and choose folders to add to Ulysses’ library.

I do not have financial ties with Ulysses!


Are there any iPhone cases compatible with full-body iPhone films (i.e. films on the sides)?

Most people I know of that appreciate the invisible shield type skins go for a sleeve as their secondary protection method.

I have seen very nice ones made DIY style from all manner of foam - the more risky a sport, the more padding you can include. It's cheap, light and only as bulky as you need. A simple strap will keep your phone in the sleeve and you can waterproof with a bag as needed.

The nature of the soft sticky films is that they grip most hard cases and result in the damage you are seeing to the skin when a hard plastic case gets fitted over the phone.

If foam isn't your preference, sleeves from felt and leather are also widely available from reputable retail and internet sellers, etsy, ebay. Don't overlook the potential to have your local craftsmen or craftswomen make a sleeve to your exact specifications for a reasonable cost.


Error when mounting sparse bundle from terminal

There's probably nothing wrong with the sparsebundle image. The error message tells you that something is wrong with the context/environment that you're the command in.

From the man page for hdiutil:

"Device not configured.  This error is returned explicitly by DiskImages when its kernel driver or framework helper cannot be contacted.  It also often shows up when a device has been removed while I/O is still active.  One common case of the helper  not being found is when Foundation's Distributed Objects RPC mechanism cannot be configured.  D.O. doesn't work under dead Mach bootstrap contexts such as can exist  in a reattached screen(1) session.  Root users can take advantage of  StartupItemContext(8) (in /usr/libexec) to access the startup item Mach bootstrap  context."

You'll need to ensure that you run the command from a session where the necessary support systems are available.

For example if you run the command inside a reattached screen session, this problem can occur (the word screen here is the name of a specific program).

So start by trying the command as an ordinary, logged in user on the physical machine using the GUI Terminal.app. Make sure you have administrative privileges (sudo) and get the command working.

Then afterwards you can try running it via ssh, via a launchd or whatever it is you're trying to accomplish.


Is there an app that just posts to Twitter and Facebook?

I use If This Than That to do stuff like this. It's like glue for internet services.

There's a bunch of recipes that post Facebook wall updates to Twitter automatically for you. Here's one: http://ifttt.com/recipes/1854

This would save you from having to open a Twitter client. But now you've got posts in Facebook truncated in Twitter because of the length restrictions.

Why not just switch to a better Twitter client? One that has TweetMarker support?

If you want to try the best-of-the-best but bleeding edge check out the currently-in-beta Tweetbot for OS X. It's a sweet, sweet client and with TweetMarker support you can open it, tweet a new tweet, and then close it down and it doesn't lose your position. It even syncs the position other TweetMarker-enabled clients.

If you're not willing to run beta software try Twitterrific -- also has TweetMarker support and also doesn't lose your position if you open, tweet, and then close it down again.

If you use one of these Twitter clients and combine them with an IFTTT recipe that reposts and tweet you make with the #fb hashtag to Facebook you'll be all set. Here's the recipe I use.


How do I change the Lion menubar selection color?

System preferences > General > Appearance > [Blue|Graphite]

Graphite will turn menu selection co
lor to dark grey. Of course it's system wide so it also will change the color for other UI elements.

Modding

You will need :

SArtFileTool
image editor
a good backup ;-)

Download SArtFileTool into ~/Downloads/SArtFile then copy and decompress the system art resource file :

cd ~/Downloads/SArtFile
cp /System/Library/PrivateFrameworks/CoreUI.framework/Resources/SArtFile.bin ./
./sartfiletool -d SArtFile.bin artfiles

Go into the artfiles directory and find 52.png 68.png 71.png files and modify them.

52.png = "Blue" top menu text selection color
68.png = "Blue" menu item text selection color
71.png = "Blue" help menu item "Search" background color

Then recreate SArtFile.bin and put into place :

./sartfiletool -e artfiles SArtFile.bin SArtFile.new.bin
sudo cp SArtFile.new.bin /System/Library/PrivateFrameworks/CoreUI.framework/Resources/SArtFile.bin

Logout & log in again, menu should look something like this (I cheated and used the turquoise-ish files from "Lion Pulse" mod.)

Additional remarks:
The SArtFile is poorly documented for Lion, here's the explanation of the contents for Snow Leopard but Lion's is different.
The selection in Finder is still the harsher blue, haven't looked into that yet.


How can I get Siri to pronounce Exchange contact names correctly?

You can create iCloud contacts that merge with your GMail contacts.  The iPhone will collate the data from both the GMail contact and the iCloud contact.  I have this enabled for Hotmail:

Enabled iCloud syncing for contacts.
Open Contacts.
Press the back button (top-left) until you reach Groups.
Open All iCloud or All from My PC.
Create a new contact for your wife.  Include her full name and phonetic name.
Press Done.
Scroll down and check that Linked Cards shows an entry for Unified and GMail.  Press Unified.
Now you can see how your wife's information combining the GMail information and the iCloud phonetic information.


How to use Xcode 6 debugging for single C file

You need to have project in order to be able to debug in Xcode. Xcode has to know how to compile/link/build Your files. You can make it very quickly by creating Command line tool. Go to File -> New.. -> Project... ⌘⇧N. Choose OS X -> Application -> Command Line Tool. On the next screen choose language to be C. Then You'll have new project with main.c file where You can start coding and debugging.


Just got a new SSD installed into my macbook pro, how to use?

First boot into your old system. With the SSD plugged in to your system you'll need to run Disk Utility to partition the drive with GUID and format it with a Mac OS Extended (Journaled) partition.
Then Shut down your mac and press the powerbutton again.

Immediately after hearing the Mac boot chime, hold down Command+Option+R – if you see the Apple logo you waited too long and need to reboot and try again.

When you see a spinning globe icon, Internet Recovery mode has been entered with a message saying it can take a while, a progress bar appears as the recovery functions are downloaded.

When finished downloading, you’ll see the “OS X Utilities” screen, choose “Reinstall OS X” to begin the re-installation process of the Mac operating system

Select the destination(SSD) and complete the installation.


How does a misspelled city name get fixed in Maps?

I would send Apple this name change request through the feedback page Maps for iOS or Maps for Mac.

  Use the form below to send us your comments. We read all feedback
  carefully, but we are unable to respond to each submission
  individually. If you provide your email address, you agree that we may
  contact you to better understand the comments you submitted.


How to temporarily disable the Finder application?

You should move away from force-quitting Finder.

Use graceful quitting:

    defaults write com.apple.finder QuitMenuItem -bool YES
    killall Finder

You now have a regular "Quit" command, not in the Apple menu but in the Finder application menu with corresponding keyboard shortcut cmd+q.
This makes the Desktop clutter disappear and Finder won't launch if clicking on the backround picture or the Trash.
This is a nice and easy option, and it should be enough!

Bonus: if you do this for 'enforcing more CLI usage/skills', then that means more keyboard centric activities? ➞ Turn on Dock hiding (System Preferences ➞ Dock ➞ Automatically hide and show the Dock). Then use cmd+Tab  to switch between active applications. This further minimises chances for a 'mis-click' on the Finder icon that would cause an unwanted relaunch.

For the case presented as is in the question the above is quick & easy and a non-running Finder is reversed easily with one single click of the mouse (or for those wanting to improve their CLI skill with a open -a Findercommand in Terminal…)


Can I re-download an audiobook that I purchased from iTunes again?

Most of these older answers are incorrect now. In recent versions of iOS you can re-download all your audiobooks purchased through iTunes by starting the iBooks app, and going to the Purchased tab at the bottom right. From there you can choose what to redownload from My Purchases.


Is it possible to disable the audio of a specific application using Jailbreak?

If you're JailBroken, install and open up iFile from Cydia. Navigate to /var/mobile/Applications/, tap the gear in the bottom-left corner and make sure "Application Names" is set to On, and then find the app you mentioned inside that folder. To completely disable audio from that app, you're going to need to delete every audio file inside that folder (and subfolders). It might take you a while, but that's the only way to do what you want without writing your own JailBreak tweak. If the app you're muting is written poorly, it may  crash when it cannot find those files you deleted. If this is the case, just reinstall the app, and you won't be able to mute it until somebody nice comes along and writes a tweak.


How to install an Adobe app from another Mac using Remote Disc?

First, on the machine with the optical drive, go to System Preferences > Sharing and make sure "DVD & CD Sharing" is turned on.

Then, on the machine without the optical drive (the one where you want to install the software), open a Finder window and select "Remote Disc" in the sidebar (if you don't see it, go to Finder > Preferences > Sidebar and make sure "CDs, DVDs, and iPods" is checked under the Devices category). You can also navigate to root (/) and you'll see it there too.

Provided the two machines are on the same wifi network, Remote Disc will show the contents of the optical disc in the other machine, and from there you can run the installer or do whatever you need to do.


Wi-Fi says connected, but my internet does not work until I turn it on and off

The Terminal command to show WiFi disconnects for last 24 hours is:

log show --predicate '(processImagePath contains "kernel") && (eventMessage contains "AirPort: Link Down")' --style syslog --last 1d

and the output looks like this


As suggested by @jefe2000, it was a problem with alignment.  I was able to create a good icon with 17x17 pixels rather than 16x16 pixels as suggested by Apple in the Safari Extensions Development Guide.


How do I get my purchased books in Mavericks iBooks?

In iBooks: menu 'Store' -> 'Authorize this computer'?


Change Firefox tab-switching  keyboard  shortcut

This is the definitive answer. Here are two official FireFox add-ons (plugins) that let you modify or define your own keyboard commands and shortcuts.

Key config

My Keyboard Navigator


Spotlight Search displays "Indexing..." forever

When you say "never", how long? Indexing can take hours on a large mechanical hard drive. This is usually required after an OS update.

You can restart and rebuild the Spotlight index, which may help. Either use the Terminal command:

sudo mdutil -E /

(You'll then have to enter your admin password. If you've never done this before, you'll see a short warning about being careful.)

Or go to System Preferences > Spotlight, and in the Privacy tab, drag the system volume to the list of exclusions. Then remove it.

Hanging Spotlight indexes may also be a sign of a failing hard drive, so it's also worth checking that your system volume is functioning correctly.


What is the normal operating temperature for the MacBook (2016 generation)?

You can find your processor model by entering the following into a terminal:
sysctl -n machdep.cpu.brand_string

which will return a string, for example, like this:
Intel(R) Core(TM) i5-5287U CPU @ 2.90GHz

You can then search for your processor on the intel product specifications page, by pasting for example i5-5287U into the search box.
On the resulting page you will see something called TJUNCTION ...

This is the maximum temperature recommended for that processor. You can monitor this with htop.


mkdir: /Users/me/.bash_sessions: Permission denied

~/.bash_sessions is a folder used to store the history of past bash sessions. Apparently the permissions are wrong (however this happened), there are several ways to tackle this:

rm -r ~/.bash_sessions Deletes the whole folder, should get recreated with the next Terminal tab/window you open
sudo chown -R $USER ~/.bash_sessions; chmod 700 ~/.bash_sessions Tries to fix permissions (sudo only works if you have an account with admin privileges)


Minimum disk partition for Windows installation increased to 48 GB?

Boot camp assistant is not allowing me to reduce the Windows 10 partition size to a value lower than 48 GB.

That sounds about right as a practical lower limit for Windows 10. The Microsoft system requirements you're referring to are the absolute minimum resources required for the operating system to be installed; using Windows with that little disk space will be painful, and you are likely to have difficulty installing and using even basic desktop applications, let alone games.

(Running games from an external hard drive is inadvisable. Not all games will even run from an external drive, and performance will suffer heavily.)

  I am also considering to install Windows 7 or 8.1 to save some space while maintaining compatibility with games.

Don't. Both of those operating systems have exited their mainstream support phases, and the extended support phase for Windows 7 is ending in January 2020. Using them for a new system is a bad idea.


What is the 'microcontroler' setting under 'networks?

The icon indicates its probably a serial device (i.e. a virtual com port).

Normally you need to click the + sign below (your first screenshot), then select a interface, a default name will be presented (in your case Microcontroller). You could rename the service afterwards.

The problem is once the device is added its hard to see which port its connected to. Now if you goto the Terminal and type:

# list all h/w ports
networksetup -listallhardwareports

# list Services and their connected port
networksetup -listnetworkserviceorder

The last command should show you something like:

(1) Ethernet 1
(Hardware Port: Ethernet 1, Device: en0)

(2) Ethernet 2
(Hardware Port: Ethernet 2, Device: en1)

(x) Microcontroller
(Hardware Port: xxxx, Device: YYYY)

The device name (YYYY) you should find in your /etc folder (if connected).

So, if the device is connected you should find it in that /dev folder. You can check this by going to the terminal and type:

ls -l /dev | grep <the name of the h/w port>

If you then disconnect the device and they the command (above) again, and it disappears your sure.

To answer your question: how it works and how you set it up depends on what type of device it is. And its hard to say just based on this information.

Apparently this device got somehow added. As Ashely states, it could be a Raspberry PI, or some other USB device (with serial port).


Trash is not getting emptied no matter how many times I click on empty trash option!

Probably the easiest thing to do is to just boot up in Safe Mode and then empty the trash.

Boot into Safe Mode

Follow these steps to boot your Mac into Safe Mode:

Fully shut down your Mac
Restart your Mac
Immediately press the Shift key and keep it down
Let go of the Shift key when you see the login window (NOTE: If you have FileVault enabled you may need to log in twice).
Once you're logged in, empty the trash
Exit Safe Mode by restarting your Mac as normal

Next up is Apple steps to repair the disk:

https://support.apple.com/en-us/HT201583

Basically you boot to recovery and repair the disk in question.

[EDIT]

If all the above steps fail to empty the items from Trash, then the following options are available to you:

Reboot your Mac from another boot drive (e.g. an external USB hard drive, etc). Once logged in, your Mac will see its internal drive as just another hard drive and you will be able to empty its Trash.
Reboot your Mac in Target Disk Mode and connect it to another Mac. The other Mac will see it as an external drive and you should be able to empty the Trash.
Create another Admin user account for yourself and then reboot your Mac and login to your new account. Start using this account instead. It will have access to all your apps and you just need to transfer your data across. When the time comes, delete the other user account.
If you're familiar with Terminal/Bash, and you have a full Time Machine (or other) backup of your system, you can also boot into macOS Recovery and access Terminal from the Utilities menu. Then run the necessary commands to gain read/write access to your usual boot volume, navigate to the correct user, and try deleting the Trash.


This can be done using a macOS default built-in, from either the command line or its GUI app the action belongs to.

To do as you requested from the command line, in Terminal, use the following command example:

"/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py" --shuffle -o /path/to/collated.pdf /path/to/file1.pdf /path/to/file2.pdf /path/to/file3.pdf /path/to/file4.pdf

To make the macOS built-in join.py script easier to use from the command line, I'd suggest you make a symbolic link for it. As an example, if you have /usr/local/bin in your PATH:

sudo ln -s "/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py" "/usr/local/bin/pdfjoin"

Afterwards, you can start the command with just pdfjoin instead of using its fully qualified pathname.

Below is a image of an Automator workflow to show an example of how it can be achieved using a macOS default built-in GUI app. Note that it can be modified many different ways to suit one's needs/wants.

Note: The Combine PDF Pages action, when used in Automator creates a temp file and why additional actions are needed to refine the workflow. You could just use the Open Finder Items action directly after and forgo the other actions, but of course you'll need to then manually save the opened new pdf file elsewhere.


How to solve "An error occured while verifying firmware" when updating to Mojave?

I prefer to get my installers from Apple, especially when I get an error with the download like you may have.

https://support.apple.com/en-us/HT201314

If your Mac is operational, absolutely get a good backup now before you attempt another install. That way you can escalate to an erase install which removes all your existing system and data and ensures if that install fails you know your hardware or network is the cause of the error.

Since yoU don’t need a backup, I would do the erase install and go to the latest possible.

https://support.apple.com/en-us/HT204904 (explains how to steer which version installs from recovery)
https://support.apple.com/en-us/HT201255 (explains the overall process)
https://support.apple.com/en-us/HT208496 (erase steps - read last, start here)


External backup drive unmounted, then endless churn

I've had a similar problem with a 2 TB Fantom drive.  Worked flawlessly for years, then it started to spontaneously unmount for no apparent reason. Time Machine being on or off doesn't have an effect.

It had been chained through another USB device (a MiniStack drive), and simply by taking it off the chain and plugging it directly into the Mac, I solved the problem.

Before ditching the drive, try changing USB cables and changing the routing (even a different USB port on the Mac.)  Five years is a bit old for a hard drive, but it's not unreasonable.


Your MacBook Pro battery has a life expectancy at or around 1,000 cycles.  It's not uncommon for batteries to exceed or fall short of this number; as every user is different in terms of what they use their computers for and how/when they're using AC power etc. So the 1,000 cycles is just an estimation of how long it can last. At 658 cycles it's more than likely that your battery is still okay, but it's also not unheard of that it could be on its way out.

If I was you I'd try resetting the SMC.

Reset the SMC

To reset the System management Controller on your particular MBP, follow these steps:

Shut down your computer
Keep the power cable plugged in
Press at the same time shiftoptioncontrol (on the left side of the keyboard) and the power button and hold all these down for at least 10 seconds
Let go
Turn your computer back on with the power button.

Now use your computer to determine if the issue still persists. If it does you could run Apple Hardware Test.

Running Apple Hardware Test

Your model MBP uses Apple Hardware Test to test its hardware. You can do this as follows:

Fully shut down your MBP
Disconnect any external hardware connected to your MBP1
Restart your MBP
Immediately press the D key and keep it down until you see the Apple Hardware Test icon appear
When prompted, select your language and click on the right arrow
When the AHT console appears, you can choose to run Basic tests by clicking the Test button. However, I suggest you select the "Perform extended testing" checkbox before you click the Test button.
Your test results will appear in the window in the bottom-right of the console.

Note 1: that the extended test will take some time. Take a note of the results and report back.

Note 2: If pressing and holding the D key at Step 3 doesn't work, start again at Step 1 and, at Step 3 press and hold both the OptionD keys instead. This will try and run diagnostics from the internet instead, so you will need to allow more time for it to complete. Be aware that if you connect to the internet via an ethernet cable instead of Wi-Fi, then keep this cable plugged in during the process.

1 If you need to use an external keyboard, mouse or display you can keep these connected. However, if you don't need to, then test your MBP without these being connected.


Creating iOS app preview in iMovie but getting iTunes Connect Error

Here is a trick using just iMovie and Quicktime to get the right dimensions.

Use QuickTime to record a short clip from the size of the device you need
Use iMovie and insert that clip into a new "App Preview" project
Add your actual video after the short clip

Now, any clips that you export will be in the right dimensions.

If you need to hide your short clip, you can shorten it to 0.1 seconds. Put a title over it and delete the text. Now your video starts with 0.1 seconds of a black screen.


Screen Not Working and Lock Button Stuck

Method 1: Reboot iPhone by setting "Bold Text"

Open the Settings app and head to “General”
Go to “Accessibility” and locate “Bold Text”, flip that to the ON position
An alert will show up saying “Applying this setting with restart your iPhone” – so tap on “Continue” to immediately soft reboot device

Method 2: Restart the iPhone By Resetting Networking Settings

Head to Settings app and go to “General” and then to “Reset”
Locate “Reset Network Settings” and select it, then tap to confirm and reboot your phone.

If the issue is still not solved you'd better to call Apple or have someone check for you. Or you can check hcqs.cc for replacement parts and repair it yourself.


Is there a way to recover a disk when FileVault is used?

Since it's now clear you have an external drive, I don't know how much of this applies, but I'll leave it in case it helps someone in that situation.

I typically boot the mac into Target Disk Mode and use another Mac to enter the password for any account on the FileVault Mac to mount the encrypted core storage drive under OS X. If the Mac was set up with a recovery key, you could also use that to unlock the volume and read from the actual files and not the encrypted data.

At this point, you can read / write to the raw device or use the normal file system tools or run your program or Disk Warrior or Drive Genius to scavenge blocks as if the drive were a normal, non-FileVault 2 drive.

Trying to copy the encrypted raw blocks off the drive is futile without NSA / FBI level of funding, tools and know-how. There are people that do this professionally, but I'm not one of them. Also, since your drive isn't showing the normal "enter your password" to unlock dialog, it's not clear you can do anything but look for other copies of the data or get a quote from a professional data recovery service to see if they are willing to try to get things back.

Personally, if I had a FileVault drive that went bad, I'd probable just call up Kroll Ontrack or another professional firm and get a quote for their assistance. In the end, it would either be data I could restore from backup, write off as a loss, or pay $$$ to get back.


What is the difference between HFS+ and EFI System Partition (ESP)?

The ESP is normally used for the boot loader on ‘normal’ EFI systems, however on a Mac the ESP is not—it is usually empty, but has been used as a staging area for firmware updates.  A Mac will initially look in the ESP for anything to boot from, but if it is empty or non-existant, it will look for the root file system to boot from.


Question 1 answer;

To delete an app, simply go to the iTunes sidebar, and find where it
says 'Apps'.
Click the apps window, and it will load a list of all the
applications that are stored of your computer.
Now the next step is to do a quick search for 'angry gran', in the
search field, in the top right of the window.
When you have found the offending app, click on it once, highlighting
it.
Press delete. (It will then say, 'Remove from library?'. Click yes,
and when it asks, click once again to move the app to the trash.)

Question 2 answer;

The section of the screen you have labeled in 4, is used for syncing documents, and other user created items, on, and off your iDevice. It can be used to transfer files from the iOS version of garageband, to the desktop version, vice versa. (It is in no way limited to just garageband. Many apps use this feature)

This feature only works for documents of the specific filetype for the app. If you are trying to put photos into an app, you will have to sync them normally, and then access them through the (usually) built in media browser.


I called Apple about this and they said 2 things:

the numbers provided are approximate
certain apps in background can be battery hogs. She specifically said that the camera app native to iOS7 continues full battery use in background and they were aware of this. She suggested being careful NOT to keep camera in background (i.e. double tap iOS button and slide camera up to remove from background active list)

This must have been the problem for me because battery life immediately improved. It still shuts down soon after going below 20% but it had been at 25% when I called.


Steps 3 and 4 are the trick!

Similar issue:

Can send file from MBP to iPad.
Can not see MBP on iPad* airdrop screen.

Fix that worked for me:

On iPad: turn on Wifi, Bluetooth and AirDrop (share with Everyone)
On Mac: turn on Wifi, Bluetooth and AirDrop (share with Everyone), then try to share the file(s) on AirDrop
On Mac: Bluetooth > Browse files on Device; select Jeff's iPad, then 'Browse'; notice it connects, but then it drops right after with the message "The device does not have the necessary services" and
On iPad: observe that 'Mike's MacBook Pro' shows on AirDrop
MBP', despite of the error (another error message might be shown under the MBP's name)
On iPad: send pictures/videos to Mac.
[extra] On iPad and MBP: for security reasons, turn off AirDrop (and maybe Bluetooth too) once you're done!

*Obs: it should work on iPhone too;  I upvoted this answer since it helped me to find this solution .