I had the same issue. It worked once the encryption was complete. My encryption resumed as soon as I plugged in my computer.


How do I find out (command line or python) if an IP address is from the local host?

I've had to figure this out for some customers in the past. Easiest and most reliable method across OS versions I've found is string matching inet lines in ifconfig results.


Is it possible to exchange the F1, F2 key functions for the F3, F4 key functions ?

If third-party software is acceptable, Karabiner-Elements allows you to do this quite easily. You can manually assign each key's function independently, either to emulate another key or to activate a certain action, such as controlling the brightness.

Here's what these settings would look like, if I understand your question correctly:


How do I prevent TGZ archives from being automatically un-gzipped upon download?

Uncheck the, "Open "safe" files after downloading" checkbox in Safari's General preferences.


How to know which program has just played sound?

Sounds like the iMessage logged in notification.

Try this command in terminal to verify:

afplay "/Applications/Messages.app/Contents/Resources/Logged In.aiff"

To turn if off you can turn off "Play sound effects" in the iMessage preferences.


If I understand your question, you should have a look into /etc/auto_master

This article explains very well how auto-mount works
https://useyourloaf.com/blog/using-the-mac-os-x-automounter/


How do I sync my iPhone 3G to OS X 10.9?

You should be able to sync it directly by using the usb. Is it giving you error messages? What is it saying.

Also, you may need to check your sync preferences on the phone settings its self. What version of iOS is installed or is it jail broken?


Is there a way to add a login item in the terminal without triggering a permission dialog on macOS 10.14 and above?

I don't have a lot of experience administering/doing mass deployment of scripts over Jamf but I am positive the following links would be very helpful for you. I believe what you are looking for is how to work around Apple's Preferences Policy Control Payloads (PPPC).
Please take a look at the following resources:
GitHub - homebysix
Apple Official Doc about PPPC
GitHub - Jamf
Basically, you want to figure out what you want to explicitly whitelist and preauthorize these using the MDM profile utility and deploy the profile you created along with the payload.


Takes Long Time to Show Network List After Clicking WiFi Icon

Having over 400(!) preferred networks may be one symptom of the lengthy time it takes to load them all. I suggest that you take the time to delete the networks you never use, even ones that you connect to infrequently. It may be convenient to be able to connect quickly, but you've found one reason why it actually isn't. Re-establishing networks does not take much time, and you may just prevent your computer from connecting to infrequently connected networks which have been compromised since you last used them.

Secondly, if you use iCloud Keychain, any Wi-Fi networks you connect to on any device you use with iCloud Keychain (iOS devices particularly) will populate this list. I found this out when coming back from a vacation in Europe and all the networks I connected to on my iPad whilst there appeared on my desktop Mac at home!

Lastly, it is wise to move the most frequently used Wi-Fi networks to the top of the list. This may help decrease the amount of time the list appears. I have but a fraction of the number of networks saved, so I can't do a real-world experiment to see if this will decrease the length of time it takes to load the list.


Connectivity from iMac to TV via HDMI cable

On your iMac, click System Preferences > Displays > Arrangement, and check the box that says "Mirror Displays".

This will essentially mirror your computer's screen to your TV connected through HDMI.


Can Exchange emails be downloaded in Apple Mail to then be uploaded to Gmail account?

If you don't own the account login details, you've picked the best solution, this would be to set up a rule forwarding all new emails to your Gmail email.

Any Mail Client, including Apple Mail, app needs log credentials to establish the connection. So to be able to use Gmail as client app for your Exchange account, you will either have

to submit those manually  or
to have the password in iCloud
keychain

For the older emails, you can export them in .pst and upload that to Gmail but that's rather desktop operation. I think this should help.


Sounds settings changed on own and can't be reset

Try an hard-reset by pressing the Home and Lock buttons simultaneously in 10 seconds and then release them. Your phone will now restart and you will not lose any data.
Do an reset of all settings. To do this: Make sure you have a backup of your phone first or know the important settings for you. Then you go to the "Settings" application -> General -> Reset -> Reset All Settings. When you reset all settings, only the settings, no files will be affected.
Try reseting the whole phone and restoring it from an iCloud or iTunes back-up. To do this: Make sure you backed up everything to iCloud or your computer (don't forget the pictures). Then you make a reset from "Settings" application -> General -> Reset -> Erase All Content and Settings.

Did it work? Didn't it? If you have any further questions, please ask in the comments.


Preview an archive contents without extracting it

Manually

zip: unzip -v FILE.zip
tar.gz: tar tvzf FILE.tar.gz
tar.bz2: bunzip2 -c FILE.tar.bz2 | tar tvf -
.7z: 7z l FILE.7z

PS: For .7z you need to run brew install p7zip first

Extend less to work the same way it does under Linux

Install lesspipe

brew install lesspipe

Add the following lines to .bashrc (or the profile of whatever shell you use)

if [[ -x /usr/local/bin/lesspipe.sh ]]; then
    export LESSOPEN="|/usr/local/bin/lesspipe.sh %s"
    export LESS_ADVANCED_PREPROCESSOR=1
fi

Source .bashrc or open a new terminal tab


What is the fastest connection between two MacBooks

Direct wired connection is the fastest you can get, so go with Thunderbolt/Ethernet.


Found a work around

set myTime to time string of (current date) as Unicode text
##set Timeleft to missing value

if myTime > "14:00:00" and myTime < "14:30:60" then
    display notification "!"
end if


From what I could tell, Mailbox now stays open after it displays the message, and crashes.

Since the crash had a bunch of JSON processes in it, I figured maybe that the lines were encoded, and since Comic Sans MS does not have the same number of letters as Helvetica Neue, I figured that was the problem. I then changed Neue to Bold, and made it the same number of letters.

Since it stil crashed, I believe it is not actually corrupted. I believe there is a encoded hash, or some sort, in the binary. Since the edit changed the hash, that may be the problem.

TL;DR: It is not possible unless you patch the binary in some way.


Why is my computer making hundreds of requests to captive.apple.com?

I analysed the traffic with tcpdump -k port 53 (suggested by this Reddit thread), and it turns out it was expressvpnd, part of Express VPN.
That was surprising, because I didn't have Express VPN client running, but it appears to set up a demon that sends DNS queries to captive.apple.com and www.mb6gpu84.com even when the app is not running.
I removed expressvpnd and killed the process, and the requests stopped.


How to remove page marks in pdf file with iPad viewers?

I just could use Crop multiple pages in a pdf file method to remove the bleed marks. I cropped the original pdf book by making the cropping area the same as the page that is shown.

After the cropping the file size became 6.1MB from 3.8MB, but it didn't matter to me.


Copying one directory into another Mac Catalina

I think this should do it.

cp -R ~/old/ ~/new/

Note that this command copies everything in the old directory into the new directory overwriting anything that already exists in the new directory as you state in your OP.

P.S. See the comments below about why the use of -R is recommended instead of -r while both may work the same in your case.


It's ready for you to connect to a Nike exercise wristband.
It's a core structure & can't be deleted. It's been there since about iOS 4/5.

If you update to iOS 8.2 you'll find there's a new app too, ready to connect to your shiny new Apple Watch… if you ever think of buying one…. again, a core app, can't be deleted.


I know how to repair disk permissions. But... Who broke them?

Many factors might come into mind. A process with root privileges is the main cause.

Think about an Application that you grant permissions to install using your Admin password. This Application might not have permissions set properly for certain folders that are installed in key OS location (i.e. /Library) would cause the permissions to change.

Think about a process in an Application that is granted a root privilege and does tamper with permissions in folders incorrectly.

The idea of locking the permissions is nice, but that would be implemented at this time with a no-write permission. Unless of course there is lock-permission-only flag is used; something I don't know if it exists.


What are dos and don'ts when charging an iPhone / Apple device? Can I charge the phone all day long?

This questions risks inviting a lot of opinion, which also explains why it seems you can't find an article that can gives you a straight answer.

However, to try and keep this to the facts, I refer you firstly to what Apple has to say about their batteries. You should also read this.

In a nutshell, the key indisputable points are:

Charge your iPhone whenever you want. Many people believe you need to let them discharge 100% before recharging. This is not true.
Apple lithium-ion batteries use fast charging to reach 80% of their capacity and then switch to slower trickle charging to complete the charge.
Ambient temperature is one of the biggest factors in battery health/life. iPhones are designed to work at their best when ambient temperatures are between 0° to 35° C (32° to 95° F).
Store your iPhone where the temperature is between -20º and 45º C (-4º to 113º F). Don’t leave it in your car, because temperatures in parked cars can exceed 45º C (113º F).

Also, the latest research confirms one of the most important determinants of what ruins a battery is time. (You could purchase a brand new iPhone battery and leave it unused in its original packaging for five years and then find its capacity is nowhere near what it should be when you start using it)

Basically, you can continue to do as you have been without fear of causing damage to your iPhone battery.


Music from windows 7 to iPhone 6 without itunes

It would be great to have file-access to iDevices, there appears to have been a lot of work done to make this difficult or nearly impossible from proprietary cords on up to inscrutable DB's. It seems unfair to pay so much for the products yet have such a trivial thing as open file access blocked so thoroughly and with such malicious intent! This, not just st for music files, but for ALL files.

I have seen two workarounds over the years -- one created a special driver that was used for low-level access to the entire storage device and created its own database with entries for every (music) file. The other method was to set up an FTP server using tFTP - an insecure and pretty featureless protocol.


How can I temporarily disable my MBP's keyboard?

You can use KeyboardCleanTool to lock/unlock the keyboard using the mouse.


Accessory Thunderbolt ports on Thunderbolt monitor not working

There are 5 different things you can try to to reset your TB Display

Make sure you have the latest macOS update.  Click on the Apple logo in the upper right corner of your screen.  Select "About this Mac" then click on "Software Update."
Power Cycle for 30 seconds.  Unplug your all of your peripherials and Mac from the TB Display and then unplug it from AC power for at least 30 seconds.  Reconnect your devices starting with your Mac.
Reset your SMC(Differs by Model)
Reset your NVRAM.  Starting with your Mac off with AC adapter plugged in, hold down CommandOptionPR while turning on your Mac.  Hold it until it chimes 3 times at which point, release the keys.
Try a standalone TB cable.  Use just a plain TB cable to connect your Mac to your TB Display and/or your peripherals.  If things start to work then your dual Mag Safe cable may be bad.

If all of the above fail, then you probably need to take it in for service as the TB Display logic board has failed.

Source:  MacRoumors.com


How can I find a list of games that are playable on my Mac?

Steam has a dedicated Mac section and also lets you filter by OS when searching. And it lists system requirements.


iMac won't recognize my iPhone to upload pictures

The Image Capture app is designed to allow you export images from your iPhone to your iMac. The Photos app can also do this, but then you will need to learn how the Photos app works.

Both apps are found in the Applications folder.


Outlook 2011 doesn't show flagged messages

For anyone facing the same issue, don't put your outlook user data folder into the privacy settings of spotlight. If you do that, you can't search outlook anymore...


After many attempts trying to fix this glitch I have finally found the answer.
I will explain step by step.

Open up iMessage
Quickly go back to the list of conversations before iMessage freezes
Go into the conversation that causes the crash
Click edit
Clear all messages
Go back before iMessage freezes
Delete the conversation
Completely close iMessage by opening up the Multitask bar and hold onto the icon until the icon jiggles.
Tap on the delete button on the top left of the icon
Wait 10 seconds then open iMessage again

After these 10 steps iMessage should be working find now.


"Announce the time" in Date & Time preference pane does not work

For what it is worth, it appeared to me that my Speech settings in Accessibility Preference Pane were corrupted somehow. If I played any voice in Speech section of Accessibility Preference Pane, my System Preferences application would hang.

I ran this command in the terminal tccutil reset Accessibility and restarted the computer.

Speech module started working.

I had to reenable permissions to applications that required Accessibility access under Preference Pane - Security & Privacy - Accessibility.

Hope this helps anyone else who has this problem. I am no expert so perhaps others can chime in on the underlying details as to why tccutil reset Accessibility worked to address my speech preference pane.


To answer the first question regarding changing your voicemail greeting, you're carrier network may have a different number to access your voicemails. By calling the voicemail number, you should be able to change this to what you want.

As for your second question, a solution could be play the audio file whilst your changing it from calling the voicemail number itself.

Again, depending on what carrier you use, they may set different time limits for voicemail greetings. For example Virgin Mobile from where I come from has a set voicemail greeting length of 3 minutes. Not sure what you're carrier has set a limit for voicemail greetings.


How does iPhone manage duplicate photos?

If you go to Settings > General > Usage, it will show under Storage how much memory is used by Photos & Camera, and when you tap that, it will show you what portion is from your Photo Stream. Now, I had a shared photo stream with about 20 photos, and I actually deleted it, and when I checked I saw that Photo Stream storage did not go down. So I suspect if the same photo is in multiple photo streams, it does not use extra storage on your device. What it did imply, however, is that each photo in my Photo Stream is using about 1MB, and I know full sized photos from the iPhone are usually closer to 3MB. Apple says that photos downloaded to the Photo Stream on mobile devices are scaled down to use less space.

So this all indicates that the Photo Stream includes a duplicate copy of each photo, but a single photo in multiple photo streams does not increase storage.

What I personally recommend is importing photos and videos to iPhoto or Picasa and using that software to delete them from the iPhone every once in a while. This clears the camera roll only. That keeps storage down while still letting you view recent photos in your Photo Stream.


What is the optimal setting for importing CDs?

I would recommend using the AAC MPEG4 set at 320KBS. We have done blind tests between this & uncompressed in a hi-fi shop, and no one has been able to tell the difference. AAC is a great codec & 10 years newer than MP3. The other option (if you have the room) is to leave them uncompressed.


Lost email settings and no icon for Mail

On iOS 10 you can delete stock apps. If you accidentally deleted your Mail app, to get it back, you have to search it on the App Store and reinstall.

They are not actually deleted though, just hidden, so you won't be downloading anything.


With a firmware password set on a Retina MacBook Pro, what are recovery options?

It is possible for the lost firmware password to be reset, but not by a normal user.  As an Apple Certified Macintosh Technician working for a third-party service centre, if someone brings in a machine that has RAM soldered to the Logic Board and they have forgotten their firmware password, I can upload the serial number and request a firmware password reset.  We're then provided with a disk image that can reset the firmware on the machine with that specific serial number.  I believe, but can't confirm at this stage, that the utility on the disk image may expire after a certain length of time.

For all those concerned about privacy, any technician that requests a firmware password reset will have their details logged on Apple's end — so if it's reset for nefarious purposes, the details about which technician performed the reset can be tracked down quickly.  The reset also requires direct, physical access to the machine - the password cannot be reset remotely.


Multiple remote logins from Windows clients to a Mac mini server

With Lion this is possible, but I think there is a limit of 2 sessions, and you don't need to be running the server tools.  When you screen share a Mac that has it enabled, you can choose to either just take over the screen as per the scenario you are used to, or move to the "virtual display", where you can log in as a 2nd user.

Many (particularly PC/Windows) VNC clients are getting tripped up by this new behaviour and do not connect at at all at present, so you might need to careful with your choice of client.

Edit: I think the 2 session limit is to provide the ability to allow an administrator to login on the 2nd session to work without interupting the normal user, I would test whether more than 2 sessions are available, but I can only get it to work from a Mac client using screen share via the finder rather than a specific VNC client app, and I only have 2 Macs...


Is there an RSS reader app that can download full articles instead of abstracts?

Edit- Newsflow does exactly this with the ability to save article to pocket for offline reading

Also this can be done with Feedly with a simple tweak. Adding a user script called 'full feed' that you can plugin with tampermonkey or stylish that expands the entire article inside Feedly. This also can be saved to pocket for offline view.


Parition disapeared after deleting Linux

If I'm understanding you correctly, you are trying to format a linux partition from your OS X diskutil app. Far better would be to access it via an external linux boot device, either USB or DVD. Since what you do to that partition as far as a reinstall of linux should (fingers crossed) only mess with the linux partition, your ability to later on reboot into OS X should be (fingers crossed) fine. As I am finding out myself, deleting partitions within one or the other systems may well befoul everything. But reinstalling to one of them should have less risk involved. BACKING UP the OS X partition first would be a stellar idea.

I say this as someone running a MacBook late-2011 15" with Mint Linux as first partition and MacOS as second.


What is the name of the process that does the iPhone backup in the background?

On a Catalina system, the process is AppleMobileBackup. If required, you can terminate it using Activity Monitor or kill from Terminal, using the process ID.


MacBook Screen Does Not Work, External Monitor Does

I had a similar issue - if I had a monitor connected, my macbook screen would sometimes stay dark. I found out that that was only happening if I connected the external monitor while the laptop lid was closed. If I connected it while the laptop screen was on, it will stay on.


Not practical/applicable solution here:

I somehow needed to delete my iTunes music archive. Then it asked me to login my account. After login, everything showed up.


Sign in to ** to update application for that account

these are sort of "nuke from orbit" directions; there's likely a less extreme way, but this should work:

shutdown
boot to single-user mode by holding down ⌘ command-s on boot
enter these commands at the console

fsck -fy
mount -uw /
rm /var/db/.AppleSetupDone
shutdown -r now

run through the Setup Assistant creating a new administrator account


Very slow screen refresh on server screen share

After much ado, I figured out that the reason the performance is so terrible in the remote Mac Mini is because it is head-less and the GPU is not being engaged (according to this answer). I ended up ordering the headless adaptor for $15 and problem solved.


Large .bash_profile increasing time for terminal to do things. Able to fix?

If you type set -x into the terminal, it will print every command it executes from that point on, so to find the culprit, type set -x and hit return, then - paying attention to the lines scrolling by on the screen - watch for whatever command takes a long time to run.

The number of + characters at the beginning of each line tell you how deeply nested the command is. If you scroll up a bit, you can find the "parent" command.

The commands you see when you hit return are all triggered by the last line of your bashrc, where you set the contents of the variable PS1. Every time you hit return, the contents of that variable are executed and the result is shown as the "prompt" (the bit before the cursor, e.g. something like user@box ~ $).

To get out of this mode, you can type set +x or just close that terminal window/tab (see What does set -x do?).

PS: I would hazard a guess that your git status commands are slowing down the prompt. If you install both git and bash-completion from Homebrew, you can use __git_ps1 to do this and get rid of all the git related functions from your bashrc. As an example, this is what it looks like on my machine:

if [[ -f /usr/local/etc/bash_completion ]]; then
    . /usr/local/etc/bash_completion
fi

GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWUPSTREAM="auto"
GIT_PS1_SHOWUNTRACKEDFILES=1

PS1='\w \$ '
if type __git_ps1 &>/dev/null; then
    PS1='\w$(__git_ps1 | sed -e "s/=)$/)/") \$ '
fi


Link Contacts between Facebook and iCloud

My suggestion would be to do ONE sync via iTunes and make sure your contacts are synced.

Once you do that, your icloud sync will be the same from one to the other.

OR

Backup your current Address book on your Mac.  Then, export from iCloud.com and import into address book.

OR you can use a third party app.  http://danauclair.com/addressbooksync/


Can't transfer ringtone to iPhone or remove existing from library

I think I've gotten it working. Using iExplorer, I deleted the entire /iTunes_control/Ringtones folder, and then also deleted /iTunes_control/iTunes/Ringtones.plist. Restarted the phone, transferred new ringtones through iTunes, and both the Ringtones folder and .plist file were regenerated with the correct values.


Apple Watch4 with OS6 slow/ unresponsive on tap to wake

This is a common issue with a lot of people experiencing it in this Apple Discussion. There is no fix of it as of yet, but as people have complained Apple is aware of it and should release a fix soon. So now all you can do is wait for an update.


Macbook Air (Oct 2010) Photoshop & Web development laptop?

A similar question was asked over at Programmers.SE, though it was about iOS development. Some might say that's not the same thing, but Photoshop is a robust application that allows you to install some very heavy-duty plug-ins and it has some of its own as well. The consensus could be gotten from the top two answers (mine, which has the higher vote count, and the other which was accepted):

Mine with 5 votes:

  ...leaving aside price, I would
  recommend a MacBook Pro for any
  serious development work instead. A
  MacBook Pro is more easily upgradeable
  to suit needs than an Air (if it is
  even upgradeable at all). The Air
  seems more targeted to lighter-weight
  uses.

Accepted with 4 votes:

  It's obviously not going to be the
  fastest machine but it's perfectly
  suitable.

  I'd say the 13" over the 11" because
  reasonable screen size is a big deal
  for development, and it can go up to
  4Gb RAM rather than 2Gb (absolutely go
  for the 4Gb RAM model on day one and
  if you can afford it the faster
  processor as I suspect upgrading later
  isn't something Apple will be
  pushing).

  Yes it's got limitations (basically
  the same as any laptop - essentially
  screen and power are limited next to a
  desktop) but I have the new one and
  it's entirely workable and I know
  others who use them (and used the old
  MacBook Air) day to day with no
  problems.

I, personally, still wouldn't recommend the MBA for any type of development work, web or otherwise. I've yet to do anything developing for iOS that causes me to bog down my machine the way Photoshop can and will.


Are scratches on a MacBook covered under warranty?

Warranty generally excludes any scratches to the machine as they are normally cosmetic issue that arise from normal wear and tear as opposed to a functional defect. By extension, Apple Protection Plan will not cover it since it generally follows the warranty guidelines but for a longer time.

You could always ask for service - especially if there is some functional concern like usability or you want a second opinion if the device was made properly. I have had things covered like where a hairline crack could be something that would fail to protect the insides (on an iPhone) so it wouldn't hurt to ask even if you are aware the answer may be no.


Please check the iCloud tab on your iPhone, you can see the details there and remove stuff you don't want anymore.

Settings
iCloud
Just above Delete account click storage and backup (this is probably named different)
Click manage storage
You can manage your data here and check what's taking up the space.


OS X's Calendar.app will not wake a sleeping Mac to open your file.

There are three ways to have your Mac wake up at the appropriate time:

You can use OS X's built-in Energy Saver settings to schedule your Mac to wake
up.

You can use pmset on the command line to schedule more events.
You can use a third party tool like Power Manager to schedule more sophisticated sequences of wake and power-on events.

Disclosure: I am an engineer who works on Power Manager; so feel free to ask technical questions.


I wasn't able to find full, straight-from-the-Apple's-mouth release notes for Sierra, but you can find developer-level release notes for all versions of macOS since OS X 10.6 on this page on the Apple developer website. The notes for macOS Sierra 10.12 can be found here and those for 10.12.1 can be found here. However, note the caveat:

This document describes key developer-level features that were introduced in different versions of macOS.
This document is not intended as a complete list of features or changes for each new version of macOS. Instead, it focuses on those features or changes that affect the development of third-party software, providing overviews of each along with insight into how and when you might use them to create your own software.


How to identify and fix files with corrupted / inaccessible disk blocks

If you are facing a healthy file system at the level of its structure and want to find files which have disk faulty blocks, here is how I would proceed:

Make a full backup of your disk with Time Machine or Carbon Copy Cloner

Check this backup.
Run the following heavy and risky (in case you do have bad blocks outside of your filesystem structure) command (make sure the {} is quoted so filenames containing spaces work):

find / -type f -print -exec dd if="{}" of=/dev/null bs=1m \;

This heavy find command will print for any plain file its name (thus not reading it, but just its directory entry) and then continue making a full and fast read of all its data blocks.

Upon hiting the first file containing bad blocks, this find will cause the kernel to log read error on /var/log/system.log, and it will either slow down or bring your system to a total halt.
This will mostly depend on the hard drive capacity to relocate the bad blocks found on its internal pool dedicated to this usual fix task.
This file containing bad blocks will be the last name printed by find.

Write down this file name on a piece of paper!
Let's say that this file name is:

/.DocumentRevisions-V100/.cs/ChunkStorage/0/0/0/9

At this point you may have the possibility to kill find quickly by hiting ctrl+C. If killing it nicely is failing, just crash your Mac.

Upon rebooting your Mac, directly check the file containing bad blocks:

dd if='/.DocumentRevisions-V100/.cs/ChunkStorage/0/0/0/9' of=/dev/null bs=1m

If the command terminate correctly, then the error was light enough for your disk to be able to read this file and reallocate the bad blocks.

If the command doesn't terminate, you won't be able to kill it
normally, your data is totally lost, and you will have to crash your Mac
once more.

In this last case, you have to consider replacing your disk and to work from your last backups. Some other files might also contain bad blocks and may have stayed undetected since a long time as long as you didn't read them.

The kernel won't fire a read error on a block you never read.


Why does my Qi charging base squeal as my iPhone 8 charges?

It could possibly be that the Qi base isn't actually a certified Qi product. As far as I can tell, the only certified Qi charger from Itian is the K10. In addition, lack of Qi certification can mean incompatibility with some Qi devices, and at worst, potential damage to the device.


How to unlink Apple account from laptop?

What to do before selling or giving away your Mac

Learn how to back up and remove the data from your Mac before selling or giving the computer away.

When preparing to sell or give away your Mac, you may want to erase some or all files from its hard drive. But first determine whether you should back up your computer and disable certain features and services. These steps show the recommended sequence of actions:

Deauthorize your computer from iTunes, if applicable.
Back up your data using Time Machine or other backup methods for OS X Yosemite, Mavericks or Mountain Lion.
If you use Find My Mac or other iCloud features on this Mac, complete these steps:

Back up your iCloud content.
Choose Apple Menu () > System Preferences, then click iCloud.
Deselect the Find My Mac checkbox.
Sign out of iCloud. When you sign out of iCloud, you're asked whether you want to remove iCloud data from your Mac. Removing iCloud data in this way makes sure that the data isn't also removed from any of your other devices that are using the same iCloud account.

If you're using OS X Mountain Lion v10.8 or later, sign out of iMessage:

In the Messages app, choose Preferences > Accounts.
Select your iMessage account, then click Sign Out.

Reformat your hard drive and reinstall OS X. Follow the appropriate instructions:

OS X Yosemite
OS X Mavericks
OS X Mountain Lion
OS X Lion

After you reformat your hard drive and reinstall OS X, the computer restarts to a Welcome screen and asks you to choose a country or region. If you want to leave the Mac in an out-of-box state, don't continue with the setup of your system. Instead, press Command-Q to shut down the Mac. When the new owner turns on the Mac, the Setup Assistant will guide them through the setup process.


Is there any good iPhone stand with high-quality microphone for my desk?

There is no product that provides a stand and charger with a mic, but there are several external mics you can clip onto the iPhone. Some (lower quality) use the headphone jack, and some (higher quality) use the 30-pin docking port.

Here are two examples:

IK Multimedia iRig Mic Cast

This mic uses the headphone jack.

Tascam iM2W stereo mic

This mic uses the docking port, but has a pass-through USB connection that permits charging while the mic is in use.


Use downloaded Git instead of preinstalled Git

Add the following to your ~/.bash_profile

export PATH=/usr/local/git/bin:$PATH


How to auto connect to VPN upon login/boot?

Apple Script provides a good solution:

on idle
    tell application "System Events"
        tell current location of network preferences
            set myConnection to the service "VPN University"
            if myConnection is not null then
                if current configuration of myConnection is not connected then
                    connect myConnection
                end if
            end if
        end tell
        return 120
    end tell
end idle


How to keep terminal window open in AppleScript after end tell?

If you want the iTerm2 window to stay open and active for further use, you cannot use command with create window with default profile.

You need to use the write command in proper context, e.g.:

tell application "iTerm2"
    create window with default profile
    tell current session of window 1 to write text "echo hello"
end tell

The above example AppleScript code used with osascript:

osascript -e 'tell application "iTerm2"' -e 'create window with default profile' -e 'tell current session of window 1 to write text "echo hello"' -e 'end tell'

Replace "echo hello" in the example AppleScript code with your command, e.g.: "uwm"

Note: osascript can execute the example AppleScript code from a file using, e.g.:

osascript /path/to/filename.applescript

From the iTerm2 AppleScript Dictionary:

  write v : Send text as though it was typed.

       write specifier : The session to send to
             [contents of file file] : Filename to send the contents of
             [text text] : Text to send
             [newline boolean] : If newline should be added to end of text (default: yes)

Note: The example AppleScript code is just that and does not employ any error handling and is meant only to show one of many ways accomplish a task. The onus is always upon the User to add/use appropriate error handling as needed/wanted.


Display forwarding - for non-X programs?

As you say the answer is no. OSX does not include a remote graphics display whilst X11 does. (The Cocoa API is based on the NeXTStep API which was drawn by Display  Postscript which allowed remote graphics display - however the license cost too much for Apple to use)

However this is a general answer for all applications. But you can configure matplotlib to use an X11 backend and this can be displayed remotely. See this StackOverflow question.


What's the difference between DFU and iTunes restore in iPhone?

DFU writes the firmware and then the OS.
Restore writes the OS only.

My guess is the misnomer is firmware like carrier updates and modem scripts will be layered on after either OS restore. Also, these names originated when the iOS devices were far simpler. Secure enclave, secure boot chain, forward secrecy and encryption at rest make the update procedure far more uniform. Maybe that's also what GSX is alluding to - you don't really write all the firmware anymore on current / modern iOS devices.


How to disable the dock on a specific display in Mavericks?

I can't find any way to allow the dock on 2 of the 3 displays.

But, there are some things you might do.

In Mavericks, the default is that each monitor has its own Space, an Apple way of saying that each monitor is its own independent desktop.

The implications of that are that your menu bar will be on all monitors but "disabled" on the monitors that you are not currently focused in. It also means that the dock will automatically change to the monitor that you are focused in.

You can change this setting so that the monitors are one Space, or one desktop. In "System Preferences" > "Mission Control", deselect the box for "Displays have separate Spaces".

Now, your menu bar and dock will only appear on one screen and will not move automatically.

To change which monitor is your primary monitor, go to "System Preferences" > "Displays". On the monitor that is your current primary monitor, a tab on the top of the window will say "Arrangement". There will see the side-by-side layout of all the monitors. Click and drag the white box on the top of your primary monitor to a different monitor to change which is your primary.

The new primary will have your menu bar and dock.


Display brightness not show in keyboard shortcuts. Help me pls!

I assume you want to change the keyboard shortcut for display brightness to a different shortcut than the dedicated display brightness key on an Apple keyboard, or else you want to set a custom keyboard shortcut on a non-Apple keyboard for display brightness. That is not possible with the System Preferences in current versions of macOS.

You may use a keyboard re-mapping application such as the free Karabiner Elements. After installing it, open the application and select the "Simple Modifications" tab or the "Function keys" tab if you want to remap the function keys. Choose the key you want to use, then from the right drop-down menu, choose "display_brightness_decrement" (or increment) under the "Media controls" section.

Additional information is available in the documentation.

Alternatively you can use the commercial application BetterTouchTool, or other simialr keyboard-rempapping applications.


MacBook Pro: DNS works but not ping, http, or https

Edit: based on your edit above, I recommend following the steps below, but removing the wireless connection and re-adding it before going to "Advanced" settings. I've broken up step 1 into three parts, below.

On your Mac go to System Preferences > Network

a. Click your Wireless Connection > Minus Symbol (-)

b. Click the Plus Symbol (+) and re-add the wireless connection

b. Click your (new) Wireless Connection > Advanced
On the TCP/IP tab ensure "Using DHCP" is selected, Configure IPv6 is
set to "Automatically".
On the DNS tab, remove any entries that do not appear in grey text.
Those would be overrides you've added at some point (knowingly or
not)
On the Proxies tab, uncheck any checked boxes.
On the Hardware tab, make sure "Configure:" is set to
"Automatically"
Ignore the other tabs.
Click the OK button. Reboot the machine.

If this does not resolve your issue, look to the router config for some kind of MAC or device-type whitelisting settings in the admin.

Also - compare your DNS and IP Address, and router address information to that of the iPad or phone and ensure it is the same.


How can I avoid iTerm trying to scp a file when ⌘-clicking it?

I know this is not a direct answer to your question, but here is how I have handled the situation in other cases. Instead of mounting your local volume at /app, mount it in the container at /path/to/my/project. That way the file has the same path name inside Docker as outside it and you can skip special processing of the path name in iTerm.
If you are running Docker Desktop for Mac, the default osxfs driver will handle for you the issues arising from the files having different owners and permissions inside the container than outside and you do not have to worry about it. (This is a unique benefit of running on the Mac, other platforms do not have this feature at this time.)


Applescript osacompile fails if user input contains apostrophe / single quote

If I was doing something such as this for myself, I would simply write the contents of "code" to a temporary text file then use osacompile to create the AppleScript application bundle and then delete the temporary text file. Doing it in this manner you should not have do deal with the single-quotes passed in a variable.
The following example AppleScript code is just a proof of concept. In Script Editor, just set an appropriate value for the smsNumber variable, for you, and then run the code.
It will create Foobar.app on your Desktop for you to then double-click and see that it sends you the message with the single-quotes in it.
set appName to "Foobar"
set smsNumber to ""
set smsBody to "Here's my email"

set tempAppleScriptCode to ¬
    "/tmp/" & appName & ".applescript"

set saveToPathFileName to POSIX path of ¬
    (path to desktop as text) & appName & ".app"

set myAppleScriptCode to "tell application \"Messages\"
    set imessageservice to 1st service whose service type = iMessage
    set iMessageBuddy to buddy \"" & smsNumber & "\" of imessageservice
    send \"" & smsBody & "\" to iMessageBuddy
end tell"

set tempFileWasWritten to ¬
    (my writeTextToFile(myAppleScriptCode, tempAppleScriptCode, true))

tell application "System Events" to ¬
    set saveToPathFileNameExists to ¬
        (exists item saveToPathFileName)

set saveToPathFileName to saveToPathFileName's quoted form
set tempAppleScriptCode to tempAppleScriptCode's quoted form

if tempFileWasWritten then
    if not saveToPathFileNameExists then
        do shell script "osacompile -o" & space & saveToPathFileName & ¬
            space & tempAppleScriptCode & ";rm" & space & tempAppleScriptCode
    else
        display dialog "The file '" & saveToPathFileName & ¬
            "' already exists!" buttons {"OK"} default button 1 ¬
            with title "The target file already exists!"
    end if
else
    display dialog "An error occured writing to: '" & tempAppleScriptCode & ¬
        "'" buttons {"OK"} default button 1 with title "Error writing to file!"
end if

on writeTextToFile(theText, theFile, overwriteExistingContent)
    try
        set theOpenedFile to open for access POSIX file theFile with write permission
        if overwriteExistingContent is true then set eof of theOpenedFile to 0
        write theText to theOpenedFile starting at eof
        close access theOpenedFile
        return true
    on error
        try
            close access file theFile
        end try
        return false
    end try
end writeTextToFile


Here's a list of steps to possibly resolve your problem:

Reset Finder: This is a basic step, just open up Force Quit Applications by calling ⌘-⌥-esc and then press finder and reset it.
Open Terminal and enter the command killall Finder. If it goes away then it's a problem with finder.
Open Activity Monitor: If there is anything irregular open in activity monitor just close it. However, be very careful with Activity Monitor. It's easy to close something that will crash your machine.


Does "Masters" folder in Photos package contain everything?

Yes it does, however Photos will have to regenerate all the thumbnails etc.

If you are trying to merge to photos libraries why not open the library you want to merge select all Command+A and then file Export

Then drag them into the new library, this way there is no risk of corrupting anything.


Time machine : Using small SSD for frequent update + HDD for slower schedule

Yes, you can use multiple disks.  No, you can't specify a different set of backup targets by disk and they all get all data, so your smallest disk needs to accomodate all data.

Though, you might be able to backup a full Time Machine config, alter it to trim out big volume directories, back up to SSD, restore full backup configs, backup to HDD, repeat.  Seems more work than worth it.

And what happens if you run the small backup on your HDD by mistake?  Will Time Machine try to reclaim space on things that it doesn't see as needing backup?

A quick and dirty rsync script to copy critical stuff to SSDs might work better.


Can the now expired iMessage app still work with Lion?

No one has come forth with a hack or modification to get it working. The longer it takes, the less likely someone will want to release a patch since the audience for this shrinks as people upgrade and move on to Mountain Lion.


Your systems SATA port is only SATA II (3.0 Gb/s) . So It Will Not Support . For Details :-

  https://www.ifixit.com/Answers/View/454939/Can+SATA+III+HDD+be+installed+on+mid+2010+iMac+Intel+21.5%22


Use independent scanner and printer as one (specifically for photocopy)

You can import an image from a scanner and print it in Preview, though this is not completely scriptable, but will only take a few clicks.

PDF Pen can import from a Scanner and Print the results, and is fully AppleScriptable.


OS X : Terminal command to turn ON/OFF SSH server

You can stop the ssh service by typing the following:

$ sudo launchctl unload  /System/Library/LaunchDaemons/ssh.plist

To start it again, use this:

$ sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist


Auto configuration of mail/calendar/contacts?

This feature basically adds an account to your system (in this case a Gmail Account). It is the equivalent of opening System Preferences > Mail, Contacts & Calendars and adding said account there.

(On the screenshot I have only one account added: iCloud, but you can add as many as you want, from whichever services listed. Also note, I'm using Mountain Lion, which added support for more sites like Twitter and Vimeo).

Safari offers to auto add your accounts whenever you sign in for the first time, as I'm guessing many users don't know this preference pane is available.

Basically what adding an account will do is allow you to sync your information to the apps on your Mac. In this case, your Gmail emails would be downloaded automatically by Mail, your Google Calendar would be synced to iCal and you will be able to use Google Talk with iChat, if so you choose.

If you click "no" on the dialog box, it wont re-appear (as to not annoy users every time they want to log in) but there is nothing special about the dialog itself, it just saves you opening System Preferences and adding the accounts yourself.

Hope it helps!


Does iTunes 11 need extra services or tools to manage duplicates in the library?

I found 160 duplicates with dupeGuru.

But, none of them can be found in iTunes, even if they are in the hard drive.

Look: I have two identical copies of the same song on my hdd (same artist, same bitrate, same duration, different album), but when I search it in iTunes I can't find it.

It looks like iTunes found duplicated songs and removed them from the library (without removing them from the hard drive, though)

Maybe that's why tools that scan the iTunes library file won't find duplicates, while tools that ignore the library file and scan the folder will find a lot of them.

I arrived to the conclusion that iTunes will "hide" songs if it thinks that it's an exact duplicate.

More proof. I got two identical songs from iTunes store in 2010 (The same song in two different albums)
One of them is on the HDD but can't be found in iTunes

Or, again:

But, when there are too many differences, like 1 second in duration, or an "à" that become an "a", the entry is kept:

That's why Apple "removed" the "find duplicates" menu: it's done silently and automatically - no need to search for them. (Though, the file gets "lost" in the HDD, wasting space...)


Macbook pro, disk utility and external hard drive

Internal or external makes no difference. it wont damage the disk in any way, it does not use up "write-cycles".
the only useless option would be running verify permissions if you dont have an OSX installation on it.


Create Smart Folder which only shows files of Macintosh HD

When creating your Smart Folder through File → New Smart Folder, choose your Macintosh HD before you create it (either from the sidebar or through general navigation).

Then, in your Smart Folder criteria, you can choose to search only Macintosh HD.

My Macintosh HD is called Mac SSD in the example above.

When you click Save, the Smart Folder that is created maintains this setting.


How To Open System Directories In Finder Without Opening A New Finder Tab

You can enter those directories from keyboard with ⌘ CMD+↓ Down arrow.
 Or ⇧ SHIFT+⌘ CMD+G and type the name of the directory You want to enter. You can complete directory name with ⇥ TAB button (for example type Down in $USER dir, press ⇥ TAB and it will become Downloads).


The Google Drive physical folder seems to be located in ~/Google Drive.  You should be able to just go to your home folder and see it there.

If for some reason it is hidden, you can always get there by going to a finder window, pressing Command-Shift-G and then typing in ~/Google Drive in the popup window.


How to refer to Applescript dictionary objects with spaces in the name

There was a simple fix, make sure the application is running during the compilation phase. I find that strange considering it has the dictionary and isn't (or I assume it isn't) making any calls to the application in question, but that's the way it is.

A little digging brought up a book about Applescript a few versions back but it obviously still applies (emphasis mine).

  External Referents Needed at Compile Time

  AppleScript is a little language, leaving it up to various external
  entities such as scriptable applications (or scripting additions) to
  extend the language as needed. When the time comes to compile a
  script, if it makes any use of such externally defined extensions to
  the language, those external entities must be present, and AppleScript
  must be able to locate them, so that it can ascertain whether the
  words you’re using in your code correspond to extensions to the
  language defined in these external entities, and if so, how to
  translate them into bytecode.

This is one more instance of the ancient call to developers - please, make your error messages better.


How to use automator services in Fluid-created apps in Mojave

I figured out a work-around for part of my problem.  I'm not going to select this (my own) answer because it doesn't solve the entire problem.  The main reason I use Fluid to wrap galaxy in an "app" is because you can only have 1 galaxy browser window open.  If I have 2 open, changes made in 1 window affect the other, so when I'm working on 2 different projects concurrently, I was using separate Fluid apps to keep the projects from stepping on one another's toes.  I knew that private browser windows could also accomplish this, but I liked the convenience of a dock icon.

So I just worked out an Applescript, saved as an app, that opens a new private Safari window to galaxy.princeton.edu.  I then added that app to Security & Privacy -> Privacy -> Accessibility.  This script is slightly simplified from what I actually used:

tell application "Safari" to activate

tell application "System Events"
    keystroke "n" using {shift down, command down}
    delay 0.5
    keystroke "http://galaxy"
    key code 47
    keystroke "princeton"
    key code 47
    keystroke "edu/"
    keystroke return
end tell

Note, depending on your accessibility preferences, Applescript will not type numbers, dots, or a few other characters, thus the key code 47 for the dots.

Now, whenever I run this "app" (which I gave the galaxy icon), it will open a new Safari browser window to galaxy.

This allows me to run my automator services on DNA strings in galaxy because Safari can be given permission to send apple events to System Events.app, whereas Fluid apps can't (I believe because they're not code signed).


What tool do I best use to automatically cleanup / correct / complement the song info of all songs in my iTunes library?

I find that dropping my music files onto MusicBrainz Picard almost always finds the correct name and fills out missing or incorrect information. It has a slightly steeper learning curve than some of the alternatives but the results are, in my experience, usually better.


Bootcamp Windows 10: Bluetooth works, but mouse not found

Turns out this was not an issue with the Bootcamp installation or its drivers. I did not know you had to hold the power botton of the mouse to make it pair. So in order to get it to work, go to Bluetooth, turn Bluetooth on, turn mouse on, hold power button pressed, the mouse will then show up under Bluetooth devices, then pair it.


Will the Verizon iPhone 5 be capable of accessing cellular data while on an active phone call?

Short answer, no.  Longer answer, you can access Wifi data while on a call, but not cellular data:

If you're in an area with Wifi coverage, you'll be able to talk on the phone while using data.
If you're in an area with only LTE/3G/CDMA coverage, you will not be able to talk on the phone while using data.

A statement from Verizon is over on The Verge:

  The iPhone 5 was designed to allow customers to place a voice call on the Verizon Wireless network, while letting customers access the Internet over the WiFi.

And Anand provides techy details:

  So onto the iPhone – we know definitively that the iPhone 5 definitely doesn't support either SVDO or SVLTE. It's as simple as looking at the FCC documents and the appropriate sections in the allowed and tested simultaneous transmitters section for SAR (Specific Absorption Rate) testing. There, it's spelled out that only one air interface can be active at a time, and that only one antenna can be selected for transmit at a time. There's also an explicitly called out mention to VoLTE not being supported at present. I didn't replicate the entire table of simultaneous transmission combinations which need to be tested (it is a huge table) there are no entries with CDMA Voice being active at the same time as any data mode save WiFi. This has been confirmed as well by later statements by the carriers and Apple.


How to resolve error: "Couldn't modify partition map because file system verification failed"?

OK, this isn't too bad. Reboot while holding Command ⌘-S to enter single user mode. When it gives you a prompt, type

fsck -fy

then press return. it will repair your disk. When it's done, type

reboot

and try partitioning again.


On iPhone/iPad, can you view a PDF sync'd in iTunes?

Yes you can do this but the mp3s and PDFs are two distinct things that need to each be setup for syncing separately.

So, sync your podcast/mp3s like you always do. Then you need to tell iTunes to sync your PDFs through the books tab when you have your iPhone/iPad plugged in. They will sync to your phone as a book and be visible in the iBooks application.

Unfortunately, that's just the way it works. You won't be able to view the PDFs in the iPod application on the phone, just through iBooks.


Try toggling iMessage off and on again. I find that this fixes many iMessage problems especially after a system update.


For the Apple French or Belgian azerty layouts, [] should be at option plus shift plus ().


How can I see (and delete) app data for apps that aren't installed?

Yes, you're just syncing the App's data with iCloud, as no files are leftover when an App is deleted.

iOS apps (and now  OS X  apps too), are Sandboxed. This means that each App has its own space in disk, with its own directories, which act as the home for the App and its data.Deleting an app from the iPhone deletes this sandbox, deleting all data associated with the App.

So, if an App supports iCloud sync, whenever you install that App with your Apple ID, in any of your devices, all the information will be synced.


How can I generate iOS/Flurry style icons in OS X?

Perhaps if someone wrote a hack (but I remain skeptical as all this could be easily done by getting the icon's template (PSD file) and doing it manually.

iOS has a framework in place to deal with SpringBoard icons. The files are as follows (naming convention taken from iOS 5. Previous iOS versions drop the ~iphone suffix):

AppIconMask@2x~iphone.png
AppIconOverlay@2x~iphone.png
AppIconShadow@2x~iphone.png

(1) is the clipping mask, that dictates the shape of the icon. (2) is the "gloss" effect that has somewhat fallen out of favor in the past couple of years and is optional. (3) is the base of the icon, the shadow that is applied under the final product.

I made a graphic and accompanying explanation of how they all work together on my website which should help better explain how iOS delivers icons on its respective device.

OS X has no such system in place. Each icon is simply constrained by the dimensions set in Finder. Apple never sought to control the way icons look on OS X, but wanted to have a uniform appearance on iOS (and I don't blame them), hence the reason why they developed such a framework.

You could try contacting a Cocoa developer on porting the MobileIcons.framework from iOS to OS X, but again, because Finder can adjust sizes (in Lion, anywhere from 1024x1024 on down), I remain skeptical that it at all possible.


Is it really not possible to run an earlier version of OS X than what the machine shipped with?

This is usually the case with new Apple hardware. AirPods version 2 require the latest version of all of Apple's OSs to work. From the fine print at the bottom of Apple's official AirPods page

  Requires an iCloud account and macOS 10.14.4, iOS 12.2, or watchOS 5.2.

This is especially true for new Macs, since the the new hardware requires updated drivers to work. Updating these drivers is non-trivial. Consider the case of Touch ID. That is a whole new subsystem that never existed before and updates to that system (i.e. the T2 chip) also require changes to the OS that Apple does not back-port to older versions of the OS.

One way to run an older version of the os is to use a virtual machine on your new iMac. I'm not sure what the state of VMs is currently, but there used to be Parallels and another that could run older versions of macOS in a virtual machine. This is not ideal, but may help.

Apple does have a 14 day return for any reason policy in the US, so you could return it and reconsider your options.

Sorry for the bad news, but this is how Apple keeps pushing things forward.


2015 Macbook pro 13" with Dell U2518D blurry font

I also stumbled on the same issue on my MacBook Pro.

MacBook Pro Retina 15.4" 2014 Model
OS: 10.11.2
Graphics: NVIDIA GeForce GT 750M 2048 MB

Default monitor comes with HDMI input source, so if you plug in an HDMI to thunderbolt the max you will get is 2048 x 1080.

All works well i.e. full 2560 x 1440 resolution if you use Displayport to Thunderbolt cable (which also comes along with the monitor), and also change the source using the monitor menu. I was quite amazed why Dell Support had no idea about this.

Resolutions can be confirmed using the below command.

$ system_profiler SPDisplaysDataType
Graphics/Displays:

    Intel Iris Pro:

      Chipset Model: Intel Iris Pro
      Type: GPU
      Bus: Built-In
      VRAM (Dynamic, Max): 1536 MB
      Vendor: Intel (0x8086)
      Device ID: 0x0d26
      Revision ID: 0x0008
      gMux Version: 4.0.8 [3.2.8]

    NVIDIA GeForce GT 750M:

      Chipset Model: NVIDIA GeForce GT 750M
      Type: GPU
      Bus: PCIe
      PCIe Lane Width: x8
      VRAM (Total): 2048 MB
      Vendor: NVIDIA (0x10de)
      Device ID: 0x0fe9
      Revision ID: 0x00a2
      ROM Revision: 3776
      gMux Version: 4.0.8 [3.2.8]
      Displays:
        Color LCD:
          Display Type: Retina LCD
          Resolution: 2880 x 1800 Retina
          Retina: Yes
          Pixel Depth: 32-Bit Color (ARGB8888)
          Main Display: Yes
          Mirror: Off
          Online: Yes
          Built-In: Yes
        DELL U2518D:
          Resolution: 2560 x 1440 @ 59 Hz
          Pixel Depth: 32-Bit Color (ARGB8888)
          Display Serial Number: XXXXXXXX
          Mirror: Off
          Online: Yes
          Rotation: Supported
          Adapter Type: DisplayPort
          Television: Yes
$


Will the absence of connected charger increase the cycle count?

I'm not entirely sure I understand your question, but one cycle is equivalent to a full discharge then recharge.

So, using your example, if you use the MacBook without a charger and its charge decreases by 40% and then you recharge it, that's effectively .4 of a cycle.

In other words, to use a simpler scenario, if you use half of your MacBook's charge in one day, and then recharge it fully, and then the next day you do exactly the same, those two days combined would count as one charge cycle.

So, some users may go through a cycle a day, others can use their MacBook for weeks before completing a cycle.

For more info on this refer to Determining battery cycle count for Mac notebooks.


Disk utility won't let me use the restore option to get a .dmg image onto a USB

I would suggest using dd, from the command line (Terminal).

The syntax is as follows:

sudo dd if=/path/to/file/<file> of=/dev/disk<your drive number> bs=1m

It will prompt you for your password, and you will not be able to see it as you type.

To get your disk number, you can run diskutil list from Terminal, and find the disk that most closely matches your drive's stats.


Does anybody make an adapter to convert a Mac's eSATA port to USB 3 (or later, or Thunderbolt)?

There’s no easy fix here. eSATA is older, less power and slower than the items you seek to upgrade, so basically you’re putting a fancy computer in between an old port and a new device which adds cost and delays.
OWC has great support so if you asked them if they had anything they will likely agree with the assessments here.
It’s easier to take a newer, higher speed and power bus and slow it down to the older protocol as you see from your research.
The good news is you can still get eSATA storage at a discount if you are needing more speed but can’t afford a newer Mac.


How to prevent songs from getting uploaded with iTunes match?

(take a copy of your songs) delete the songs you don't want on match, re-add them but change the type (right klick, info) to audio-book hence iCloud don't upload audiobooks

To be clear - the AudioBooks that are incorrectly marked 'music' cannot have their identifier edited (when already uploaded to cloud), as the Get Info> Options> Media Kind is greyed out. You must save the audio away from iTunes, and when you reload it, you can change the option before it's uploaded.


No longer an option to upload to iCloud with iTunes Match and iTunes 12.2.2?

I have just experienced the same thing and found that it looks like iTunes Match might have just been renamed and the settings moved.

Note for future readers, I am using iTunes version 12.2.2.25 (64 bit) on Windows 10.

Make sure you are logged in to the iTunes Store and also make sure your computer is authorized (see the Store menu item), and then try going to File > Library > Update iCloud Music Library. After selecting that menu item, look in the top right corner (where you would normally see anything downloading) and you should see this:

After waiting for this to finish, my entire iTunes Match library appeared back! (This took about 10 minutes or so).

Also, to answer your question about the display indicator, as far as I can tell this behaves exactly as iTunes Match did for me previously. I can see which songs are downloaded, and I can choose to download those that haven't by clicking the cloud symbol.


How can I mount disks via cron in Mountain Lion?

I had this same problem and found that I could get it to work if the cron job was launched under root.

This Apple discussion link has this note:

  [...] Basically, Apple is tracking where an application launches from,
  and seems to be preventing processes that launch from "cron" (one of
  the system schedulers), even indirectly, from mounting local disk
  volumes, even when that application is signed.


configure multiple networks with static and dhcp ip addresses

Configure separate network Locations.

On the Network pane in System Preferences, use the Location pop-up
menu to create a new location name.
Press the + (plus) button to create a new location.
Click the Done button.
Click the Apply button in the Network pane.

You can now configure and select separate network locations via the drop down in the Network pane.


The path /myusername/Applications/gradle-2.6/bin probably doesn't exist except your personal user folder is in the root of your main volume - which would be very, very uncommon on a *nix system.

Depending on where you've installed Gradle the proper path might be:

/Users/myUsername/Applications/gradle-2.6/bin or
/Applications/gradle-2.6/bin

So change the export line to

export PATH=/Users/myUsername/Applications/gradle-2.6/bin:$PATH or
export PATH=/Applications/gradle-2.6/bin:$PATH


What is the equivalent terminal command to findsmb on Lion

Try using smbutil lookup to resolve IP to NetBIOS names


Can I use Time Machine but still be able to access deleted files on my Mac?

Yes, you can move files away from your Mac to an external HDD when using Time Machine.

The file will remain in the backups until the backup drive runs full and Time Machine starts deleting older backups.

Note however that the backup will contain a version of the file from before you’ve moved it to an external HDD. If you want to backup files on your external hard drive with Time Machine, you’ll need to remove the external drive from the list of exclusions in Time Machine settings.


How to use Emacs shortcut key in Mac OS?

You have to open the Terminal Settings and then you can enable "Use Option as Meta key"


Are the 2 cameras of the iPhone 4S of the same quality?

No, as noted in Apple's specifications, the front camera is VGA (640x480), whereas the rear camera does 5 MP stills and 1080p video. This is confirmed in iFixit's teardown of the 4S.


Back button in Finder occasionally disabled; always go up one step in hierarchy?

The back button behave the same way in Windows & Mac, it returns to where you last looked. If that was the only place you've been, it has no history.

You can test that in Windows by either selecting different locations from the sidebar shortcuts, or by opening a new window by right clicking a folder & selecting Open in new Window. It then will not have a History.

To navigate the hierarchy on Mac there are several options...

 Cmd ⌘   ↑  will climb the hierarchy,  Cmd ⌘   ↓  will descend it.
From the Finder window toolbar, there is a hierarchy drop-menu -
Even without the toolbar visible,  Cmd ⌘  Click on the folder icon at the top of any window will drop the same menu.
From the Path bar underneath, you can double click any item to open that point


Applescript Expected “"” but found unknown token

The spaces mess things up. Try:
do shell script "open -n " & quoted form of "/Applications/Game Capture HD.app"

Essentially, 'quoted form' is for passing text to 'do shell script'. Both the Script Editor and the shell will be interpreting the text and 'quoted form' helps manage that.
For more information, refer to the Applescript Language Guide > Class Reference > Text > Properties of text objects
Additional info can be found in Technical Note TN2065: do shell script in AppleScript


No files with prefix com.apple.security in Library?

On my iMac the com.apple.security.plist is located in the Preferences folder in the Local Domain:

    /Library/Preferences

but you were looking in the Preferences folder in the User Domain:

    ~/Library/Preferences   (aka: /Users/[username]/Library Preferences)

There was no com.apple.security.revocation.plist file in any of the  Preferences folders on my iMac. If one did exist I'd expect it to be in the same Preferences folder as the above plist file.

Check your /Library/Preferences folder for either or both of those plist files.

If you aren't familiar with domains in OS X and how they affect the use of files then you can see Apple's documentation for an overview: About the OS X File System


Mail folder structure: where are most recent messages?

If Mail stumbles across a specific messages when accessing the mail server via POP or IMAP it might help to remove the offending message directly on the server. The easiest approach in this case is to access the mailbox via webmail (at least if your provider offers this). Alternatively installing another mail client (e.g. Thunderbird) and using it to delete the offending mail might help as well.


terminal sudo or su asks for password in Mountain Lion OS X

This is standard behaviour for a Mac, even if the user is in the Administrators group. The password is that of your user account, not the root account (which is typically disabled by default). OS X asks for your password in a number of situations, not just when using sudo.

If you've forgotten your user account password, you can reset it following Apple's instructions.


Port Forwarding on Mac Pro with macOS Sierra

Internet Sharing in macOS is (internally) done by creating a bridge device containing two or more interfaces, activating a DHCP server, setting up various pf rules and enabling pf.

To print all rules the following shell script has to be executed:

pfdump.sh:

#!/bin/bash

function pfprint() {
  if [ -n "$1" ];then
    sudo pfctl -a "$2" -s"$1" 2>/dev/null
  else
    sudo pfctl -s"$1" 2>/dev/null
  fi
}

function print_all() {

  local p=$(printf "%-40s" $1)
  (
    pfprint r "$1" | sed "s,^,r     ,"
    pfprint n "$1" | sed "s,^,n     ,"
    pfprint A "$1" | sed "s,^,A     ,"
  ) | sed "s,^,$p,"

  for a in `pfprint A "$1"`; do
    print_all "$a"
  done
}

print_all

By default pf is disabled with the following pf dump:

                                        r     scrub-anchor "com.apple/*" all fragment reassemble
                                        r     anchor "com.apple/*" all
                                        n     nat-anchor "com.apple/*" all
                                        n     rdr-anchor "com.apple/*" all
                                        A       com.apple
com.apple                               r     anchor "200.AirDrop/*" all
com.apple                               r     anchor "250.ApplicationFirewall/*" all
com.apple                               A       com.apple/200.AirDrop
com.apple                               A       com.apple/250.ApplicationFirewall

After activating Internet Sharing pf is enabled and a dump looks like this:

                                        r     scrub-anchor "com.apple/*" all fragment reassemble
                                        r     scrub-anchor "com.apple.internet-sharing" all fragment reassemble
                                        r     anchor "com.apple/*" all
                                        r     anchor "com.apple.internet-sharing" all
                                        n     nat-anchor "com.apple/*" all
                                        n     nat-anchor "com.apple.internet-sharing" all
                                        n     rdr-anchor "com.apple/*" all
                                        n     rdr-anchor "com.apple.internet-sharing" all
                                        A       com.apple
                                        A       com.apple.internet-sharing
com.apple                               r     anchor "200.AirDrop/*" all
com.apple                               r     anchor "250.ApplicationFirewall/*" all
com.apple                               A       com.apple/200.AirDrop
com.apple                               A       com.apple/250.ApplicationFirewall
com.apple.internet-sharing              r     scrub-anchor "base_v4" all fragment reassemble
com.apple.internet-sharing              r     anchor "base_v4" all
com.apple.internet-sharing              n     nat-anchor "base_v4" all
com.apple.internet-sharing              n     rdr-anchor "base_v4" all
com.apple.internet-sharing              A       com.apple.internet-sharing/base_v4
com.apple.internet-sharing/base_v4      r     scrub on en1 all no-df fragment reassemble
com.apple.internet-sharing/base_v4      r     scrub on bridge100 all no-df max-mss 1460 fragment reassemble
com.apple.internet-sharing/base_v4      r     scrub on bridge100 proto esp all no-df fragment reassemble
com.apple.internet-sharing/base_v4      r     pass on en1 all flags any keep state
com.apple.internet-sharing/base_v4      r     pass on en1 proto esp all no state
com.apple.internet-sharing/base_v4      r     pass on bridge100 all flags any keep state rtable 6
com.apple.internet-sharing/base_v4      n     nat on en1 inet from 192.168.2.0/24 to any -> (en1:0) extfilter ei
com.apple.internet-sharing/base_v4      n     no nat on bridge100 inet from 192.168.2.1 to 192.168.2.0/24
com.apple.internet-sharing/base_v4      n     rdr on bridge100 inet proto tcp from 192.168.2.0/24 to any port = 21 -> 127.0.0.1 port 8021

Here en1 is the external interface (the one sharing to your internal network) and 192.168.2.0/24 the internal network provided by the DHCP server. Both could differ in your environment.

To expose an internal server to the public with Internet Sharing enabled, you have to forward a port of the external interface to the IP and the service port of the server:

Create rdr rule on the router (your Mac Pro) by entering in Terminal.app:

sudo nano /private/etc/pf-rdr.rule

and the content:

rdr on en1 inet proto tcp from any to 152.1.2.3 port = 9999 -> 192.168.2.3 port 80

assuming en1 is the external interface, 152.1.2.3:9999 its IP:port and 192.168.2.3:80 the IP:port of the internal server. To get the device identifier (and IP) of your external interface enter ifconfig on your Mac Pro.

Then create a launch daemon:

sudo nano /Library/LaunchDaemons/org.user.pfrdr.plist

with the content:

<?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>Disabled</key>
    <false/>
    <key>Label</key>
    <string>org.user.pfrdr</string>
    <key>ProgramArguments</key>
    <array>
        <string>/sbin/pfctl</string>
        <string>-a</string>
        <string>com.apple/portforwarding</string>
        <string>-f</string>
        <string>/private/etc/pf-rdr.rule</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>StandardErrorPath</key>
    <string>/Library/Logs/org.usr.pfrdr.log</string>
    <key>StandardOutPath</key>
    <string>/Library/Logs/org.usr.pfrdr.log</string>
</dict>
</plist>

Launch the daemon with:

sudo launchctl load /Library/LaunchDaemons/org.user.pfrdr.plist

This will add a second rdr rule in the com.apple anchor to pf and forward the external port to the internal host.

Since DHCP assigns IP addresses dynamically it's also useful to define a fixed IP for the internal server:

Create a file bootptab on the router (your Mac Pro):

sudo nano /etc/bootptab

with the content:

# Bootptab file
# Section 1 -- ignored
%%
# Section 2 -- used
# Hardware types: 1=Ethernet, 6=Wireless
#                 See http://www.ietf.org/rfc/rfc1700.txt
#
# machine entries have the following format:
#
# hostname         hwtype     hwaddr         ipaddr   bootfile
your-nas-ethernet     1 c4:2c:03:3a:7f:65 192.168.2.3 boot
a-wireless-machine    6 60:33:4b:27:6c:62 192.168.2.4 boot
another-ethernet      1 00:0d:93:72:e7:96 192.168.2.2 boot

Replace the MAC addresses (hwaddr) and the hardware types (hwtype) by the proper ones found in your environment here. You can get the MAC addresses by entering ifconfig on the respective host. Reboot your router (Mac Pro) afterwards.

Security implications:

By using your Mac Pro as a router it is exposed to the Internet and vulnerable as such. Pf as it runs after enabling Internet Sharing has absolutely no blocking rule. You have to add a whole bunch of additional rules to make it more secure (and working).

The IP you have published belongs to 152.1.0.0/16 - an IP block assigned to the North Carolina State University (NCSU). Your university may have applied security measures in this network which will prevent access from other networks (or the "whole" Internet).


connecting a LAN printer while using the 3G network

No, this cannot be done.

The WiFi and the 3G connections can't be brought up at the same time on an iPad.

You could turn on WiFi when you need to print and get back to 3G after that, or use a service such as Google Cloud Print to print documents from the Internet.

The Google Cloud Print solution requires a computer connected to the Internet and to the printer.


How can I open a Terminal window directly from my current Terminal location?

Simply change the Terminal settings Terminal -> Preferences -> Startup -> New windows open with: Same Working Directory.


Bypassing Boot Camp to install Windows using a non-standard partition scheme

I have installed Windows 8.1 Pro via Boot Camp on my MacBook Pro Retina 15-inch mid-2015, with OS X Yosemite 10.10.4 and Boot Camp Assistant version 5.1.4. I can prove that this version of Boot Camp is no longer creating hybrid GPT/MBR partition scheme to install Windows 8 x64 on Intel-based Macs, and Windows is directly booted in EFI mode. Here are what I have tried:

Running Ubuntu on its installation flash drive, I ran sudo disk -l /dev/sda to check my local Mac SSD; results:
MBR: protective, BSD: not present, APM: not present, GPT: present Found valid GPT with protective MBR; using GPT Therefore Windows is not booting from and running on a disk with hybrid GPT/MBR scheme.
In Windows, C:\Windows\panther\setupact.log has one entry: Callback_BootEnvironmentDetect: Detected boot environment: EFI How to tell if windows 7 installer boot in EFI or BIOS?

Therefore theoretically Boot Camp is not needed to install Windows 7/8 x64, which support booting from GPT disks on UEFI(that is EFI 2.x)-based systems. But still it's better to use Boot Camp to create the Windows Installation flash drive and download drivers for Windows. The guide: How to install Windows 8.1 on Mac without Boot Camp To sum it up:

Partition your disk as you wish in Disk Utility in OS X; just format your desired Windows OS and data partitions as FAT32.
Since Retina MacBook Pros do not come with a SuperDrive, you need to create a Windows Installation flash drive from the ISO file. Please do this in Boot Camp Assistant. I have tried run dd command on Mac's Terminal to copy the ISO, but the created flash drive is not bootable on UEFI Macs: the Apple boot manager simply does not recognize the flash disk.
Plug in the flash drive, restart the computer and hold option to open Apple boot manager. You will see a yellow drive called "EFI Boot", which is the Windows Installation. Continue the installation as normal, and format your Windows OS partition as NTFS when asked.
Whenever the computer restarts, you need to hold option key and select "Windows" drive on your local SSD to continue installation. Finally go into the system and drivers from Boot Camp will automatically install.

You should keep a Time Machine backup before these operations. Even if things really mess up, you can just create a OS X Yosemite installation flash drive, re-format the SSD to one partition and re-install OS X. How to make a bootable OS X 10.10 Yosemite install driveThe newest version of Recovery HD partition will automatically come back. This worked successfully when I wrongly operated the disk in Ubuntu.

Hope this works!


iCloud Mail Not Deleting - Very Slow - Have to Delete Multiple Times

This also occurs in Outlook for iOS.

It's an iOS threading (GCD) issue of one of two kinds, either:

GCD places low-priority on threads to which calls for "delete" are dispatched, and defers to any and all other operations on, like, any other thread; or,
GCD stops waiting for a condition to be met on the mail server side, suspends or kills the thread in favor of others, and then fails to resume or reinstate the thread at a later time.

It could also be improper implementation of GCD in a networking component of iOS, which happens easily enough for programmers with less than 20 years of experience with multi-threading behind them.


Can iPhone back up to iTunes over Wi-Fi automatically?

After consulting with Apple it turns out that

Automatic sync should happen every time the phone plugs into the computer while iTunes is running
None of my the iTunes installations did this on macOS or Windows, which is an error
To work around this required manually syncing a folder with a photo in it to the phone, on both windows and macOS separately. After that automatic sync starts working.

From inspection I can conclude that:

Yes
Yes, when plugged into charger
Yes
Haven’t tried yet. Probably, since backup seems to be included as a step in the syncing process.
Backup should happen within a few seconds of plugging in the charger, five hours from the last backup the same day. Should probably happen every time, regardless of interval.


"networksetup is trying to modify the system network configuration" dialogue wont go away!

I tried to replicate your environment in a OS X 10.11 VM (including homebrew/cask and rvm). After some trying I have been able to reproduce the error at times.

In my opinion the error is related with wrong permissions in your user folder, a really crappy app (the private-internet-access app) and probably your ruby/rvm environment.

The error you get is (probably) related with SCHelper and nehelper which can't fulfill their tasks successfully.

  File Created: /Library/Preferences/SystemConfiguration/preferences.plist-new
  Modifying Program: SCHelper      Process ID: 773
  Process Owner: System Admin     User ID: 0
  Time recorded: 22:21:04, Sat. Jan. 16, 2016
  ...
  File Renamed: /Library/Preferences/com.apple.networkextension.plist
  Modifying Program: nehelper      Process ID: 183
  Process Owner: System Admin     User ID: 0
  Time recorded: 22:21:04, Sat. Jan. 16, 2016
  ...
  File ownership changed: /Library/Preferences/com.apple.networkextension.plist
  Modifying Program: nehelper      Process ID: 183
  Process Owner: System Admin     User ID: 0
  Time recorded: 22:21:04, Sat. Jan. 16, 2016

Please try the following:

Rename your bash config files:

cd ~/
mv .bash_profile temp.bash_profile
mv .profile temp.profile
mv .bashrc temp.bashrc

Remove all traces of private-internet-access in homebrew:

brew cask uninstall private-internet-access
brew cask uninstall --force private-internet-access
brew cask cleanup
brew cask doctor
brew doctor

Enable your root user, log-out your current user and login as root
Remove the following files and folders:

/Applications/Private Internet Access.app
/Users/your_user/.pia_manager (folder)
/Users/your_user/.pia_manager_crash.log
/Users/your_user/Library/Private Internet Access (folder)
/Users/your_user/Library/LaunchAgents (folder)

I tried to remove all these files and folders with sudo rm ... which wasn't successful. Some files were recreated immediately even after stopping/unloading the respective plist with launchctl. Therefore I used root.
log-out as root, reboot, login as your main user and disable your root user.
Recreate your LaunchAgents folder:

mkdir ~/Library/LaunchAgents

Download, reinstall, setup  and test Private Internet Access
Rename your bash config files:

cd ~/
mv temp.bash_profile .bash_profile
mv temp.profile .profile
mv temp.bashrc .bashrc

I recommend the following:

Follow the instructions and install and use Tunnelblick (instead of installing Private Internet Access).


How can I get iTunes 11.1 to list songs by album and show cover art

figured it out, it could be that i did this in the old itunes and because it was years ago i forgot and that updating itunes reset every setting

anyway, here are the steps i followed

click on the icon in the top left hand corner and select show menu bar (or Ctrl + B)
click on View > Show View Options (or Ctrl + J (you may be able to skip step 1 but i didn't use shortcuts))
Make sure Sort By is set to Album
Click in the checkbox beside Show Artwork
make sure that under the Music Section that the checkbox beside Album is checked, if it is not the albums will not be sorted alphabetically like they really should, while you can sort by what ever way want sorting by name will split albums and you'll only see the groups if 2 or more in the list have belong to the same album (ie. Check Mate and Cheese from Code Geass Lelouch of the Rebellion R2 - OST 2 will appear grouped and before Chemical Magical Cooking from Dream Eater Merry Character Songs - Kounagi Yui but separated from Guren which belong to the same sountrack)

Optional Parts (stuff i did because i like it)

Check in the checkbox beside Always Show - unless the size of the list of songs in an album group is greater than or equal to the height of the artwork it wont show, i would say 7 songs cause alot of Opening Soundtracks i have have only 4 tracks, with Always Show checked the list of songs in an album has 3 spots left
Set the Artwork Size slider to max (may have an affect to what i have explained above)

EDIT: these steps also work up to 12.0.1.26. Though when I installed it the default view for music was Albums. When you do step 2 make sure the view is set the view to Songs otherwise the options from Step 3 onward will not appear


I still don't understand why the system detected two screen, but I noticed "miror display" was enable.
Disabled bring the monitor list to one and at full resolution


How do you enable MouseKeys without using the mouse?

You can use the same menus and buttons you would if you were turning on MouseKeys using the mouse, but using them from the keyboard instead. There are a lot of standard keyboard shortcuts that you can use to navigate around without the mouse:

Ctrl + F2 to go to the Apple menu
Arrow keys and Return to choose an item from the pull down menus
Ctrl + F7 to cycle through the sections of a window
Tab to cycle through the controls in a section, and Space to use the highlighted button or checkbox.

This guide from the BBC's site puts it all together.


Can I stop mac 10.8 from saving previous open programs/finder windows after power shutdown?

other than wth terminal you can try omyx http://www.macupdate.com/app/mac/11582/onyx


How to add a AppleScript file to the Finder toolbar to execute the AppleScript?

If you want an AppleScript to run on its own, not in Script Editor, you need to change it from File Format: Script to File Format: Application in the Save As sheet when saving it.


Is there a sandboxing program like Sandboxie for Mac?

MacOS has a build in Sandbox feature which may help you but does not exactly have the same functionality as Sandboxy.

This Paolo Fabio Zaino's Blog post from 2015 explains how to run Applications in a Mac OS X sandbox. He summarizes it this way:

  by using sandboxing, you can restrict access an application can have to operating system resources like filesystem or network etc…

Quoting his Blog Post:

  How to sandbox an application?

  First of all, to let Mac OS X to know which resources your application
  requires to being able to run properly we need to create a sandbox
  configuration file. This activity will require some time and testing
  because each application has different requirements

  Here is an example (change MyApp with your application name):

;; This is my first sandbox configuration file!
(version 1)
(deny default)

;; Let's allow file read and write in specific locations and not
;; all over my filesystem!
;; Please note you can add more (regex "^/Users/user_name/xxxxxxxxxxx") lines depending
;; on what your MyApp needs to function properly.
(allow file-write* file-read-data file-read-metadata
  (regex "^/Users/user_name/[Directories it requires to write and read from]")
  (regex "^/Applications/MyApp.app")
  (regex "^(/private)?/tmp/"))

;; You can also add a sperate section for reading and writing files outside your
;; user_name account directory.
(allow file-read-data file-read-metadata
  (regex "^/dev/autofs.*")
  (regex "^/System/Library")
  (regex "^/Applications/MyApp.app")
  (regex "^/usr/lib")
  (regex "^/var")
  (regex "^/Users/user_name"))

;; If your MyApp requires to access sysctl (in read)
(allow mach* sysctl-read)

;; If you want to import extra rules from
;; an existing sandbox configuration file:
(import "/usr/share/sandbox/bsd.sb")

;; If you want to decide in which filesystem paths
;; MyApp is forbidden to write:
(deny file-write-data
   (regex #"^(/private)?/etc/localtime$"
     #"^/usr/share/nls/"
   #"^/usr/share/zoneinfo/"))

;; If your MyApp wants to run extra processes it's be allowed to run only
;; child processes and nothign else
(allow process-exec
  (regex "^/Applications/MyApp.app"))

;; If your MyApp requires network access you can grant it here:
(allow network*)

  Once we have done with our sandbox configuration file for our
  application, we can simply execute it using the following command from
  the command line:

sandbox-exec -f myapp-sandbox-conf /Applications/MyApp.app/Contents/MacOS/MyApp-bin

  Where myapp is the name of the application you want to run in a
  sandbox.

  If my generic sandbox file will be too generic for you and you want
  more practical examples (already implemented) then run your terminal
  application and have a look to all the examples already kindly
  provided by Apple:

ls /usr/share/sandbox

  In this directory you’ll find plenty of files like

sshd.sb

  To look into and have more insight/tutorial to write your own sandbox
  configuration file for your specific application.


What's a good replacement for MenuMeters on the newest macOS?

The best replacement for MenuMeters is: MenuMeters!

It's a port to OS X El Capitan 10.11 and later of our beloved utility MenuMeters by Alex Harper, at http://ragingmenace.com. As he has not yet released the port to OS X 10.11 El Capitan, I made a minimal modification to the source code he has kindly made public so that it runs fine.
Confirmed to run OK on El Capitan 10.11, Sierra 10.12 and High Sierra 10.13.

Take note that currently the above port is somewhat lacking in releasing a new build. To get all the latest updates and features you have to build the binary yourself.
Or: go to another fork at emcrisostomo/MenuMeters which includes the latest fixes and has an installer DMG.
Or: go to yet another fork at axet/MenuMeters which adds new features on top.


Haskell Stack is a good option as well. For marketing purposes: Features include automatic installation of packages and separately installed and isolated GHC. Installable from Homebrew with brew install haskell-stack.


Applescript code to simulate Command and Shift keys

Briefly looking at the Dragon Dictate manual:

A script like this will let you select the next item of a Finder window:

--key code 126 -- up arrow Key
--key code 125 -- down arrow Key

activate application "Finder"
tell application "System Events"
    key code 125 using shift down
end tell


Automator Print Plugin: Append Output to Existing PDF File

A very old discussion on https://discussions.apple.com/thread/2240963 had the solution.

Here is a working version of the plugin:

1   Ask for Finder Items
        Type: Files
2   Set Value of Variable
        Variable: original
3   Run Shell Script
        Pass input: as arguments
        Script: echo $2
                echo $1
4   Combine PDF Pages
        Combine documents by: Appending pages
5   Get Value of Variable
        Variable: original
6   Run Shell Script
        Pass input: as arguments
        Script: mv $1 $3
7   Open Finder Items
        Open with: Default Application

Step 3 solves the problem of appending rather than prepending the file by echoing the items in the reverse order. Steps 2, 5 & 6 takes care of creating a new file by renaming (and moving) the new file to the original.

As soon as I have tested it out more, I will post a link to a working version.


Disconnect the external drive.
Navigate to Finder -> Preferences... -> Tags.
Delete the desired tag. Confirm.
Reconnect the external drive.
The tag will reappear.
Disconnect the external drive.
The tag will disappear.

I'm curious if there's a more permanent solution, such as a way to create tags so that they're transient in the first place.


After erasing 200 GB I need to repair it using the Recovery HD

No your Mac will not reset all you files. It is just maintenance of file system and not your files.
No it will probably not solve your problems. It even can make matters worse on filesystem level. Or just ask you to do the same i.e. Repair Partition.
You should just do what it you are asked — boot to Recovery HD with CMD + R on startup and Repair Main Partition.

Word of caution: It might be that you HDD is failing so do Time Machine backup or other form of backup before going futher.


What impact can a dual monitor setup have in overall performance?

I have the same setup - a 24" iiyama Prolite and a Early-2010 Macbook Pro with 2.4ghz dual core and 8gb of RAM. Originally I had 4, but I upped to 8.

I've noticed almost no change in performance since adding the screen - even running heavy apps like Photoshop, there is very little to no lag - and for general web usage (Chrome, Spotify, Forklift and Textmate) there is absolutely no change and no lag.

I'm starting to think in hindsight that it was unnecessary to upgrade the RAM (although this was a £30 job from Crucial) - the only time where I notice the addition is in boot times.


When is the copy of files to iCloud done?

Go you www.icloud.com to check out if all your files have been uploaded successfully. The uploading or downloading indicator doesn't work so well sometimes on macOS, especially when you're logging with an Apple ID in another country. BTW, not everyone can read Chinese here, please try to upload a picture with English description next time.


What could be the cause? I/O completely died. Constant spinning, even logging in takes forever

Since this Mac is a backup, I would buy or find an external drive and install a clean OS there - leaving the internal drive and data untouched.

This lets you test the hardware with a clean OS with minimal risk to losing your data.

Then, since you don't have a drive big enough to back up all the data, you can wait to see if you want to throw out less important things until your data that needs to be backed up fits on the drive you have or you can fund a drive large enough to keep the data you choose to keep.

I wouldn't mess with things - slow IO and freezes out of the blue are usually two things:

fundamental errors / corruption to the data structures that a fsck can't or won't fix
hardware issues with spinning drives (SSD generally don't slow - they just fail when they can't accommodate any more bad blocks or the controller itself fails)

Both of the above, you need a backup to recover from in my experience and delaying making that backup, reduces what data you can save.


How can I restrict data use on an iPhone?

The full information on use restrictions in iOS is here. It doesn't include the ability to restrict the use of phone calls or data, but you can restrict apps like Safari that use the data. Third-party apps are not permitted to modify fundamental iOS functionality like this.


If you go into Preferences, Accounts, select your account, then select the "Mailbox Behaviors" tab, there's an option to disable saving drafts on the server. I know you said you didn't want to disable saving of drafts, but this option will still save the draft on your computer, yet it won't mess up Mobile Me.


Macbook Pro WiFi Painfully Slow on Corporate Network, PC Works Fine

Try this setting, it helped me in the same situation :) In the network settings change the address of DNS servers to Google's ones: 8.8.8.8 or 8.8.4.4

For this go to Settings > Network > Advanced... > DNS > press + and enter DNS address.

Or, vice versa, you may ask your system administrator for any specific DNS and probably proxy settings that your company might have due to security reasons and then enter them in the Proxy tab.


Can the document desktop stacks be split for a specific file extension?

No - Apple designed the default configuration but does allow you to stack on tags, which are user definable.

You could also make a smart folder to locate all the specific files you want, and then curate the tags easily, but not automatically out of the box.

Source:

Here's how to use tags for custom desktop Finder stacks.

In the image below, you can see the option under Group Stacks by -> Tags.

Each of the files you want to put in this Stack must have the same Tag.  When you do this, macOS will create a custom Stack for you for all files that contain that Tag.

This is the only way that I'm aware to create a custom Stack.


Is there a way to tell which OS X processes are using the most power over time?

Activity Monitor has this feature. It can chart power consumption per process in the Energy tab. You can find it in /Applications/Utilities/Activity Monitor.app.


AppleID Not been accepted in XCode account pane

Make sure the Apple ID you're using is registered as an Apple Developer, XCode does not function with normal Apple IDs since they aren't linked to Apple's developer tools.


Second language doesn't show up in keyboard - iOS 8

Never mind, figured it out. Went to settings/ keyboard/ added the second language there and deleted emotcon language there.


Current iOS is 9.0.2
Latest Xcode release is 7.0.1 - from the App Store
I'd try updating to those first.

If iTunes doesn't seem to think it needs updating, you could always get the .ipsw file from one of the many direct download links available [the files come directly from Apple, just the links are published separately] then hold  Alt ⌥  whilst clicking the "Check for Update" button in iTunes & manually navigate to the .ipsw

One source of links is always Redmondpie - http://www.redmondpie.com/download-ios-9.0.2-links-for-iphone-ipad-ipod-touch-ipsw/


Before I start up my MacBook in the library, I plug in a headset or earbuds (from my phone or iPod).  Hardware mute.  Works with either OS.


Software Upgrade causes language change in Login screen and shutdown popup window

I found the solution. In terminal, execute the following command

sudo languagesetup

choose English in the command prompt and then logout and login again or reboot. The language in Login Screen will become English.