There could be multiple causes to this issue.

First, have you tried restarting Apache?
You can do so by typing sudo apachectl graceful in the Terminal.

If that doesn't work out, try to create a folder in the predestined folder (Sites), and see if it works. Alsoo, make sure you've enabled the proper settings:

And just for the record, my httpd-vhosts.conf file (on a Windows though) looks like this:

NameVirtualHost *:80

<VirtualHost *:80>
    ServerName dev.test.be
    ErrorLog "logs/test.log"
    CustomLog "logs/test.log" common
    DocumentRoot "C:\Users\me\workspace\test\drupal"
</VirtualHost>


Charging Magic Mouse 2 when the device is turned off…

Yes, you can turn it off while charging.

However, according to Apple:

  For the fastest battery charging performance, be sure your device is
  switched on when connecting the Lightning to USB cable.

Source: Recharge the built-in battery in your Apple accessory


how to make more display only few lines at a time?

less -10 <file> on macOS 10.13 also scrolls forward 10 lines at a time.  The major difference is that it fills the first screen, as opposed to more which only generates the specified number of lines even on the first screen.

If that's not acceptable, the LINES env variable can override the number of lines on the screen.  So something like

env LINES=10 less <file>

will force 10 lines on the first screen, and also scrolls forward 10 lines at a time.


Preferences Error on IMac Yosemite 10.10.2

Solved.

Deleted the file desktoppicture.db  located in user/library/applicationsupport/dock.  Then re-started.  This restored the default wallpaper.

Even though my previous wallpaper displayed without issue, it apparently caused a problem for the Desktop & Screen Saver Prefs.  I checked the jpg and it wasn't corrupt.

If I pick another image for my wallpaper the Prefs error returns, but at least for now everything is stable!

Many thanks to Kevin G. and Buscar for the suggestions.


How to add permanent environment variable in zsh

Bash

Since Bash is typically the default shell you can open up this file in your home directory:

$ vim ~/.bash_profile

And add your variable to this file:

export ENV_VAR=12345

You can do this without even having to edit this file if you like, using the following one-liner:

$ echo 'export ENV_VAR=12345' >> ~/.bash_profile

And then confirm like so:

$ cat ~/.bash_profile
for i in ~/.bash_profile.d/[0-9]*; do
  . "$i"
done
export ENV_VAR=12345

After doing the above, if you open a new terminal you should see that environment variable has been set:

$ echo $ENV_VAR
12345

Zsh

If you find that you're using an alternative shell such as zsh, that uses a different set of configuration files maintained within your home directory, ~. Luckily the syntax of the changes is basically the same, just different files. So you can add the above example to this file instead:

$ echo 'export ENV_VAR=12345' >> ~/.zshenv

And then when you launch a zsh:

$ echo $ENV_VAR
12345

References

Zsh Startup Files


Syncing iPhone Contacts with an Exchange Server

I'm using Google sync, which works like an Exchange server, so my experience may not be 100% the same as with a full Exchange set up.

I had to import all of the contact to the server (I did this through the Apple contacts app on my Mac) then synchronised them from there. I deleted all of the contacts from my iPhone to prevent contacts being displayed twice. So in short I'm not sure that it is possible to synchronise that group at all.

FWIW I also disabled synchronising contacts with my Mac through iTunes, leaving Exchange to handle all the contact syncing.


GarageBand stopped recognizing my piano/keyboard after installing MacOS Mojave

The article Mac OS X - Problems with MIDI devices after an update gave two possible solutions. The first had no effect but the second one, listed below, fixed my problem and now everything works beautifully.

  When installing a major Mac OS update over an existing one (not using a clean install), or when using Apple's Migration Assistant to transfer files and preferences from one Mac to another, you will often run into trouble with drivers not working properly, authorizations being lost or corrupted etc. When files are mixed between systems, or are transferred to a system they weren't specifically intended or created for, difficulty is always a possibility. (...)

  Empty the contents of the following two folders by moving their files into to two new folders on your desktop:

  Macintosh HD > Library > Audio > MIDI Drivers
  Macintosh HD > Users > [Your User Name] > Library > Audio > MIDI Drivers

  Note: the second location above is hidden on Mac OS X 10.7 and above.  To access it see these instructions.
  These are the places where third-party MIDI drivers are stored. If they have become corrupt, or they haven't been installed correctly, removing them and starting over may help.
  Restart your computer.
  Try your MIDI device again.
  If the symptom has been resolved, you should...

  Reinstall each of these drivers by visiting the home page for the respective device manufacturers. Note, if your MIDI device is Class Compliant, it doesn't require any extra drivers to be installed.
  Find and download the latest drivers for the product(s), and install them.
  Confirm all of your devices now work properly, then trash the files you had moved from your MIDI Drivers folder to your desktop.

TL;DR - I left the usb connected during the update which I guess corrupted the driver, so I had to delete and reinstall the driver (UM-One MK2)


Avoiding all apps reopening when OS X crashes

Permanently prevent macOS High Sierra from reopening apps after a restart

Works in macOS El Capitan, Yosemite, Sierra, High Sierra.

Solution: deny OS X access to the file it uses to store your session state.
It prevents reopening apps even after reboot/shutdown from Terminal, from AppleScript, and system crash.

GUI method

Open Finder
Cmd+Shift+G (Go to folder)
Copypaste ~/Library/Preferences/ByHost/ and confirm
Find the file starting with com.apple.loginwindow
Doubleclick (opens in TextEdit)
Remove all content and save the empty file. An additional confirmation dialog may appear.
Right click, Get Info
Lock the file (check the checkbox)

GUI method (undo)

If you wish to undo this change later and re-enable the feature, simply delete this file and the OS will recreate it.

Open Finder
Cmd+Shift+G (Go to folder)
Copypaste ~/Library/Preferences/ByHost/ and confirm
Locate the file starting with com.apple.loginwindow
Simply delete it

CLI method

Open Terminal.app
Make the file owned by root (otherwise the OS will just replace it)

sudo chown root ~/Library/Preferences/ByHost/com.apple.loginwindow*

Remove all permissions, so it can't be read or written to

sudo chmod 000 ~/Library/Preferences/ByHost/com.apple.loginwindow*

CLI method (undo)

Re-enable "reopen all apps" after login

sudo rm -f ~/Library/Preferences/ByHost/com.apple.loginwindow*


How to exclude certain particular files from Spotlight?

.noindex

  One of the fastest ways to hide a file or folder, from Spotlight, on
  the fly is to add the .noindex extension to the end of the filename or
  folder. The simplest way to get those files hidden is to create a
  folder, preferably named something innocuous, and add the extension to
  the end of the name. I’ll end up with a folder named “Nothing to See
  Here.noindex” or something similar.

Hide just a single file

  Select the file to be hidden. Right-click and select Get Info, or
  click Command+I. Find the Name & Extension field, and replace the
  current extension with .noindex. When prompted to confirm that I want
  to change the extension, I agree. Now my file is properly hidden from
  Spotlight search.

Finlay:

Finder won’t know what to do with my file anymore, though. Look to the drop-down labeled Open With, and select an application to handle the file. Be careful of setting a single application to handle all .noindex files, as many different file types may be hidden from Spotlight, and OS X sometimes creates .noindex files itself


How to edit presenter notes in Keynote '09?

Unfortunately, Keynote '09 can't achieve such a feature. You can, however, this feature has been added in the 2013 version of Keynote.

Enable the presenter view (in this example, I'm going to use the "Rehearse Slideshow" feature).

If you don't see the presenter notes, go to the top right corner of the screen and select the middle icon, then check off the "Presenter Notes" box.

Now that you see the presenter notes, it may not look like you can edit them at first, but if you slide your cursor to the top right corner of the notes box, the "Edit" button will appear. Click on it, and start typing (you can also edit it by double-clicking anywhere on the box).

Hope this helps.

(P.S.: For some reason, I'm unable to upload any pictures in order for me to show you better. Once StackExchange fixes those bugs, I'll update the answer with the appropriate pictures).


Can I search for folders of a certain size (say more than xxx mb)

I recommend using a disk space analyzer application for this purpose, specifically because of the concerns you bring up.

Some options include DaisyDisk (Free to try, Full Version US$9.99) or  GrandPerspective (free), OmniDiskSweeper (free)


Sounds like the digitizer (the part that recognizes your touches) is also broken. My experience with Apple store is they will try to replace your screen first (at a cost).

Many third party repair shops can help you get a working digitizer connected without erasing the device. Expect to pay them extra for the data transfer as part of the repair. You could even just pay them for the data transfer and then go back to Apple for a repair that has warranty from the manufacturer.


MacBook Pro late 2011 cannot boot using regular tactics

First of all, there is a good chance your hard drive may be dying, in which case you could lose all your data if it is not backed up. Hopefully you already have a backup. If not, let me know and I can walk you through that.

This assumes you have a full backup of your computer already:

What happens when you hold Command + R while turning on your Macbook Pro with the power button? If you can get into the Recovery Partition this way, the first thing to try would be repairing permissions.

You do this by first clicking "Disk Utility" then selecting Macintosh HD. Click "First Aid" and then let it run. Once that's complete, restart your computer and see if that resolves the issue. If not, let me know and we can move on to the next troubleshooting step.


Time Machine Backups taking too much space?

I would probably do two things:

Let time machine run until it fills up the 1.6 TB and then see how long a windows you have. macOS will clean up the destination - purging old files as needed.
Use tmutil compare or a tool like Backup Loupe to check what is taking the space. Other tools do a lousy job of showing you actual space usage in time machine.

Why does Time Machine estimate a 109GB backup size, but then need 235 GB?
Time Machine - List of Files that were backed up


Verify DNSSEC being used by Safari when visiting a web site

DNSSEC is an extension of the DNS infrastructure. Usually a browser is not involved in domain name resolution. So there is no way for Safari to detect DNSSEC directly.

There is an Safari DNSSEC extension though which allows you to check the existence and validity of DNS Security Extensions (DNSSEC) records and Transport Layer Security Association (TLSA) records related to domain names. You can download it for several browsers here: DNSSEC/TLSA Validator

Direct link of the Safari extension:

dnssec-tlsa-plugin-2.2.0

(this is a shell script which has to be executed in Terminal.app)


How to synchronize data from iPhone to iPod?

If you backed your iPhone up and saved it to iCloud, you can do the following:
Before you do it, Make sure to backup the iPod!

On your iOS device, go to Settings > General > Software Update. If a newer version of iOS is available, follow the onscreen instructions to download and install it.
Make sure you have a recent backup to restore from.
On your iOS 8 device: Go to Settings > iCloud > Storage > Manage Storage, then tap a device listed under Backups to see the date and size of its latest backup.
On your iOS 7 device: Go to Settings > iCloud > Storage & Backup > Manage Storage, then tap a device listed under Backups to see the date and size of its latest backup.
For information about backing up manually now, see Back up your iOS device to iCloud. If you don’t see a backup you expected to be there, see the Apple Support article If you need help restoring from an iCloud backup.
Go to Settings > General > Reset, then tap “Erase all content and settings.”
In the Setup Assistant, proceed to “Set up your device,” tap Restore from a Backup, then sign in to iCloud.
Proceed to “Choose backup,” then choose from a list of available backups in iCloud.
For help deciding which backup to restore from, including information about restoring from another device’s backup, see the Apple Support article If you need help restoring from an iCloud backup.

Source: https://support.apple.com/kb/ph12521?locale=en_US

However, this will delete all the data on the iPod and put the iPhone data in. Ignore the iOS 7 and iOS 8. They are there for distinguishment.


Unfortunately this is a regression with the current version of Pages at the time of writing. It's not possible to move the equations in Pages 7.0.

Documents created with previous versions of Pages will preserve the equation position. If you still have the previous version of Pages, you can copy-paste the graph into the older version, move the equations and paste it back into the newer version.


Terminal command to quit Google's "Backup and Sync"?

Weird, just tried killall "Backup and Sync from Google" and it failed.

Try killall Backup\ and\ Sync, that worked for me for some reason. Adding \ from seems to break things.


In your current terminal session you can select the JVM using
/usr/libexec/java_home -v 1.8 see java_home --help for more options.

For GUI applications you should set JAVA_HOME as an environment variable.  Setting Environment variables in Mac OS is explained in Environment variables in Mac OS X on StackOverflow. Be aware that ~/.launchd.conf is deprecated: man launchd.conon Yosemite

  ...launchd.conf is no longer respected by the system. ...


Generally without jailbreaking the device, no. Apple makes it quite difficult to access the filesystem of your iOS device - whether attempting to navigate directories on the device directly, or remotely from your computer.
However, there are certain programs recently made available which enable one to do so. For example, iFunBox is an iOS file management application for your desktop that allows you to browse and manipulate the filesystem without jailbreaking the phone.
Additionally, you may find it helpful to use iOS's Spotlight feature to quickly find and access content on your device:

"To access Spotlight, swipe down on your home screen to reveal the search field."
"Spotlight searches certain text fields in the content of your device for text beginning with your search phrase. It is not case-sensitive, so you can search using uppercase or lowercase letters and get the same results."


iCloud use as storage and not "reflective" like dropbox

iCloud is not 'storage' it is 'data distribution'.

It isn't designed to 'keep things on', it's designed so that whichever device you pick up, you have access to the same files.

The closest it comes to being 'storage' is if you have a small, overloaded drive it will start to offload such as full-size images, leaving smaller versions locally.

Purely personal opinion:
Many people were sold laptops with far too little drive space on them & are now paying the price for economising/marketing strategy.
256GB is absolute bare minimum, imnsho, & 128GB is simply not enough for much more than the OS.


How can I copy the path of a file in Finder?

Right click on the file, hold down Alt/Option, and an item to copy file path will appear as Copy "<FILENAME>" as Pathname.

This is the easiest option for day to day usage, without involving Automator.

This seems to be a relatively new feature that was added in OS X El Capitan. (It also works on macOS Sierra).


Where does Macbook Pro store wifi information?

Your Mac also stores the information about Wi-Fi access points it connected to in NVRAM.
From the Apple Support article:

https://support.apple.com/kb/HT204063

NVRAM (nonvolatile random-access memory) is a small amount of memory that your Mac uses to store certain settings and access them quickly.

While iCloud keychain also stores the Wi-Fi access point information, it's tied to a users Apple ID.
So if you are looking for a scenario where you want to give away your Mac to someone else, and do not want the Mac to retain crucial information such as your Wi-Fi access point password, you could, in addition to wiping the hard drive/reinstalling the operating system also take additional steps to reset NVRAM and PRAM on your Mac.
The linked article describes the steps to reset NVRAM and PRAM.

How to reset NVRAM
Option + Command + P + R
Shut down your Mac, then turn it on and immediately press and hold these four keys together: Option, Command, P, and R. You can release the keys after about 20 seconds, during which your Mac might appear to restart.


Which options exist for a Macbook air (2010) SSD upgrade?

Actually it's Other World Computing (OWC, also known as macsales.com) that offers 3rd party SSDs for the MacBook Air. They're based on the fairly widespread Sandforce controllers (also used by OCZ). You can find them here.

The only other option I've heard about is RunCore, which announced in May it was going to make a MBA compatible SSD, but as far as I can tell, nothing's been released yet, and it may only be compatible with 2011 and later models.


LG Ultrafine 5K always keeps my Mac charging, is this bad?

It’s not actually charging.

Your Mac uses the power from the charger for its power needs without going through the battery. If that power is not enough then it takes some more power from the battery. If not all power from the charger is needed and the battery is not full only then will the battery be charged.


Update (September 2019)

Some of the information provided in the answer is no longer valid (specifically discussed in point #1), due to the changes introduced in the subsequent releases of iPhone hardware and iOS 13 software. They are discussed in the latter part of the answer.

The original answer applies well to iPhone equipped with 3D Touch hardware capability, and running iOS 12 or earlier supported version of iOS. Here's a list of iPhone that shipped with 3D Touch hardware:

iPhone 6s/6s Plus
iPhone 7/7 Plus
iPhone 8/8 Plus
iPhone X
iPhone XS/XS Max

Original Answer

It is not possible to share an app directly from one iPhone (iOS device) to another. What can be done instead is to share the App Store link for the app. Your friend can then install the app from the App Store onto their iPhone. There are different ways you can share the App Store link with your friend. I'll list them down, starting with the simplest and quickest one.

1. Using 3D Touch Quick Actions:

iPhone 6s and newer (excluding iPhone XR), namly 6s Plus, 7, 7 Plus, 8, 8 Plus, X, XS, XS Max include a feature called 3D Touch. It gives users an additional mechanism to interact with the iPhone by using pressure to peek into and pop open content on iPhone. This is a hardware feature built into the display, and is not available on any other iOS device (iPod touch, iPad mini, iPad and iPad Pro).

You can use use Quick Actions to easily and quickly share the link for the app with your friend. On your iPhone, go to the Home Screen, locate the app, and apply a little pressure on the app icon until the iPhone gives a haptic feedback and reveals the Quick Actions menu like this:

Now simply tap on the Share Odyssey item to reveal the Share Sheet. You can AirDrop the link to the app to your friend, which will directly reveal the app in the App Store on your friend's iPhone. He/She can simply proceed to install it.

To use AirDrop, you'll need to ask your friend to enable it on their iPhone. AirDrop can be turned on by going to Settings app → General → AirDrop and tapping on Contacts Only or Everyone. AirDrop can also be turned on from the Control Centre (revealed by swiping from the bottom of the screen on the model of your and friends iPhone).

This is the quickest, easiest and the most newbie friendly way to share an app from one iPhone to another.

2. From your App Store purchase history:

Open the App Store app on your iPhone. Now tap on your profile picture shown at the top right. Tap Purchased to see the list of all the apps that you have bought and are linked with your Apple ID. Make sure All section is selected at the top.

Now locate the app in question from the list. You can also use the Search facility if your list of apps is lengthy. Once you have filtered down to locate the app, tap on the app icon to reveal the App Store page. Now tap on the blue circular button with three dots to reveal the action sheet. Tap on Share App... item to open the Share sheet. You can choose the usual sharing options to share the app with your friend (AirDrop, Messages etc.).

3. Searching on the App Store:

Quite often, the display name of an app (the one shown below the app icon) differs from the actual name. Searching the App Store by the display name shows the app in the results in most cases (you may have to scroll through in some cases). To search for the app, open the App Store app, tap on the Search item and enter the app display name in the search bar.

Once you have located the app under the search results, simply tap on the icon to reveal the App Store page for the app. Now tap on the blue circular button with three dots to reveal the action sheet. Tap on Share App... item to open the Share sheet. You can choose the usual sharing options to share the app with your friend (AirDrop, Messages etc.).

4. Searching on the Web and sharing the link:

You can also search by the app name or the display name on Web using a query similar to "app name + iTunes link" (Odyssey + iTunes link in this case). This is sometimes more efficient than searching on the App Store. (There's no right or wrong approach, the search logic for App Store and Web search work differently).

Now once you have the link for the app, you can share it by any suitable means as discussed above with your friend. When searching on Web on your iPhone, tapping on the link opens it directly in the App Store app.

The app in question is a beautifully designed game called Alto's Odyssey. You can share the following App Store link for the game with your friend:

https://itunes.apple.com/app/altos-odyssey/id1182456409

Update

3D Touch, a hardware feature has been subsequently been removed from the recent generation of iPhone. The functionality is simulated using a software based feature called Haptic Touch. Instead of detecting a physical pressure on screen, long tap is detected, and the device provides a Haptic feedback using the build in Taptic Engine in iPhone 6s and later (barring iPhone SE). Here's a screenshot from an iPhone 7 running iOS 13 with Haptic Touch in action for sharing App Store link to an installed 3rd party app.

Long press was earlier reserved to make the app icons wiggle, so that users can easily uninstall or rearrange apps, move them into folders and rename folders. As Haptic Touch has taken over it in iOS 13, the options are now made available in a similar menu as peak menu shown earlier. While earlier, an app could only display a share command, now every 3rd party apps shows at leat two commands, namely, Rearrange Apps and Share App.

Performing either a 3D Touch or a long tap on the devices that have the 3D Touch hardware, presents the same peek context menu.

iPhone XR, introduced in the year 2018 was the first iPhone to get rid of the 3D touch hardware, while the concurrently introduced iPhone XS and XS Max retained it. 2019 line of iPhone, namely, iPhone 11, iPhone 11 Pro and iPhone 11 Pro Max all got rid of the 3D Touch hardware. They all rely on Haptic Touch to offer the similar functionality as discussed in point #1 above.

One of the earlier iPhone models, namely iPhone SE lacked 3D Touch hardware but supports running iOS 13. Since Haptic Touch is a software based feature, it received the similar functionality, which was not available previously.

P.S.: A quick and informative guide on difference between Haptic Touch and 3D Touch can be found here:

Haptic Touch vs 3D Touch: What's the Difference?


Fonts showing in Font Book but not in Finder

Apple does provide additional fonts as optional installs that can be downloaded if you want. From the linked Apple Support document, Baloo is one of those.
https://support.apple.com/en-us/HT210192
If you have Creative Cloud, then you have access to Adobe's font library: CC apps can install any font for their own use directly from Adobe Fonts, independently of macOS's font management.


tic doesn't read from STDIN and segfaults when adding terminfo to support italics in tmux

So this works for me, notice I edited use like @mtklr suggested:

# A screen-256color based TERMINFO that adds the escape sequences for italic.
# run to add to term db: tic tmux.terminfo
tmux|tmux terminal multiplexer,
  ritm=\E[23m, rmso=\E[27m, sitm=\E[3m, smso=\E[7m, Ms@,
  use=xterm, use=screen,

tmux-256color|tmux with 256 colors,
  use=xterm-256color, use=tmux,

Then tic -x tmux.terminfo

Shouldn't have errors

Then added to .tmux.conf:

set -g default-terminal "tmux-256color"
set -as terminal-overrides ',xterm*:sitm=\E[3m'


If you type brew info nginx you should get answers to many of your questions.  In particular, you should see something like:

To have launchd start nginx at login:
    ln -sfv /usr/local/opt/nginx/*.plist ~/Library/LaunchAgents
Then to load nginx now:
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist

So I expect if you link the plist to /Library/LaunchDaemons instead of ~/Library/LaunchAgents it will load at boot.

I don't know what you want to change, but it's the same nginx as you use on Debian, so you can copy over your Debian nginx.conf if you want.  Also the brew package comes with a set of default/example configuration files installed under /usr/local/etc/nginx/.

The default conf runs on port 8080, so you have to edit it to run on port 80, and yes it will conflict with Apache running on port 80 so you have to turn Apache off or put it on another port.  Apache config files are in /private/etc/apache2/ and you can turn it off via System Preferences -> Sharing -> Personal Web Sharing.  (Note that this option has been removed in Mountain Lion.  Mountain Lion still ships with Apache, but it is disabled by default.)

You can, of course, set it up however you want, but if you're looking for what's easy and Mac-like, just follow the Apache setup, which uses user and group _www and uses /Library/WebServer/Documents as document root and serves user content out of ~user/Sites.


How to completely, utterly, disable spell-check on OS X Yosemite?

Right-click or control-click in the field where you're working and look at the Spelling and Grammar submenu. You can also disable the various substitutions from that submenu.


Remap "Home" and "End" to beginning and end of line

The default shortcuts for moving to beginning or end of (wrapped) lines are ⌘← and ⌘→. ⌥↑ and ⌥↓ or ⌃A and ⌃E move to the beginning or end of unwrapped lines (or paragraphs). ⌥← and ⌥→ move backwards/forward by words, and all of these are compatible with holding Shift to select during the corresponding moves.

You could remap home and end by creating ~/Library/KeyBindings/ and saving a property list like this as DefaultKeyBinding.dict:

{
    "\UF729"  = moveToBeginningOfLine:; // home
    "\UF72B"  = moveToEndOfLine:; // end
    "$\UF729" = moveToBeginningOfLineAndModifySelection:; // shift-home
    "$\UF72B" = moveToEndOfLineAndModifySelection:; // shift-end
}

Most of the keybindings for editing text in OS X are defined in /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict.

Applying changes requires reopening applications. DefaultKeyBinding.dict is ignored by some old versions of Xcode (works with latest version 6.3.1), Terminal, and many cross-platform applications.

See Cocoa Text System and my website for more information about the customizable keybindings.

Terminal's keybindings can be customized in Preferences > Settings > Keyboard. \033OH moves to the beginning of a line and \033OF to the end of a line.

In Eclipse, key bindings should be modified in Preferences > General > Keys. You need to modify default bindings for commands Line Start and Line End (replace ⌘← by ↖ and ⌘→ by ↘). For selection to work, also modify Select Line Start and Select Line End.

PS: You may need to logout and login again for the ~/Library/KeyBindings/DefaultKeyBinding.dict change to take effect.


Python stopped working after Mountain Lion upgrade

MacOSX SDK 10.6 is a component of Xcode. It is at least available in Xcode version 3.2.6.

Xcode is available for download from Apple after registration as a software developer.

The file is named MacOSX10.6.pkg and is located in the /Volumes/Xcode and iOS SDK/Packages folder.


Does Homebrew get removed after upgrading Mac OS?

You should run brew update and see what happens. If Homebrew refuses to run, reinstall it using the command at https://brew.sh.

You should then run brew upgrade to make sure you're running the latest packages. If brew list shows no packages, then it looks like you'll have to re-install these packages.


Why do Downloaded Google Maps expire after 29 days?

There hasn't been any info from Google as to why the maps expire in 30 days.

A theory postulated in this Android SE site states

  ...I'd say it's highly likely that this time limit is related to contractual limitations at least in some areas. Kindof like how iTunes rentals expire, or Spotify Premium offline playlists expire: if there was no expiry date at all, then there's no difference between 'accessing' and effectively 'permanently buying for free/cheap'.

I also guess that Google wants to refresh the business list in the downloaded map data.  They charge businesses to advertise (not appear) in Maps and so they have an interest in keeping the downloaded data 'fresh'. <-- my $0.02


How do I make Siri send text messages to a specific number?

These settings can be harmonized so that no matter how the sender responds, you receive your message on any of your devices including your Mac.
For complete details on setting up Messages for all your devices, see this Apple Support article.
iOS - Settings

Go to Settings in iOS and select Messages
Scroll to the Send & Receive setting and select it (tap)
Here you can add email addresses associated with your Apple ID

Mac Settings

Open Messages app
Select Preferences... from the Messages Menu
Under the Accounts tab, add email addresses where you can be reached at on your Mac

If your phone number is missing:
If your phone number is missing from your Mac Sign out of iMessage and FaceTime on your Mac:

Go to Messages > Preferences > Accounts.
Click iMessage in the left column, then click Sign Out.
Go to FaceTime > Preferences.
Select your Apple ID, then click Sign Out.

Sign back in to iMessage and FaceTime on your Mac:

Go to Messages > Preferences > Accounts. Click iMessage in the left column, then enter your Apple ID and Password to sign in.
Go to FaceTime, then enter your Apple ID and password to sign in.

With these properly set, you should be able to see and respond to messages no matter what account they are sent to.  Siri will not even notice a difference.


What will happen if I export a 720p video in Photos to 1080p?

You've only got so many 'real' pixels to play with, so when you stretch that out to 1080p, you've got quite a few holes.

From there it all comes down to what approach the software you are using takes to create the missing pixels.  Typically the stretch it out to the edges, and then interpolate back to fill the holes, based on what the two pixels look like either side of the gap.

Some software does this better than others, and the best method to use can depend on the image content also.  Typically it makes things look softer, blocker if bad, and highlights poor quality issues such as moire etc.

Premiere Pro includes a simple algorithm as standard, and you can use plugging more targeted to the task if you want also.
There's no right or wrong.  A full HD TV will be doing this 720p to 1080p conversion ever time you watch anything less than full HD anyway for example.

Here is a simple graphics showing what happens


Does the iPhone 7 have true tone display?

True Tone was not implemented in the iPhone 7 or iPhone 7 Plus' display. There is, however, a wider color gamut (P3) and "improved color management".


Does opening the Mac mini 2018 for cleaning void the warranty?

The iFixit Teardown shows the Mac mini 2018 is relatively easy to open.
Apple even returned to the user replaceable RAM option, thus indicating that they expect users to open the case. Unless you start digging around and removing components (other than RAM) I don't think you'll be in any danger.
As always, make sure you follow proper ESD procedures to protect the logic board & RAM from getting zapped by static electricity.


Backing up iPhoto pictures and folders from the command-line

Your whole iPhoto library is stored in ~/Pictures/iPhoto Library. If you look at it in the Finder it appears as a single file but it's actually a package (aka directory structure). So in order to back it up over ssh/scp you can use one of

scp -r ~/Pictures/iPhoto\ Library user@remote_host:
rsync -a -e ssh ~/Pictures/iPhoto\ Library remote_host:


MacOS 10.12 (Sierra) - Missing "SystemCACertificates.keychain" file

This is currently being discussed here: Centrify LInk and it seems like many of us are in the same boat.  I found a link to the certificates:  SystemCACertificates from git site, and I am able to import it into my keychain.  However, the icon for the original SystemCACertificates is still in my keychain.  Also, I've notice that the most recent certificate in that SystemCACerts is CA30; my CAC card requires a CA32 certificate for validation.  Both of these issues may be to blame for why it doesn't work.  I'm planning on going back to 10.11.


How do you update the default version of Nano on MacOS X without using the homebrew package manager?

Recent Macs ship with GNU nano version 2.0.6, which is a far cry from the latest version 4.3.

GNU nano is written in C and thus very easy to build from source. To do this, try the steps below that are reproduced from the README file that is included in the source code which you can find here:

curl -O  https://www.nano-editor.org/dist/v4/nano-4.3.tar.gz
tar xvzf nano-4.3.tar.gz
cd nano-4.3
./configure
make
make install

You should then have an up to date version of the binary. This does not replace the nano that ships with macOS - but it allows you to have one you can patch faster (or to a different level) than Apple updates it. You will have to make sure you add the path to the nano above to your path before /usr/bin/nano is in the $PATH

Many people like https://brew.sh since it fixes your path and then installs nano and other tools correctly so they run before the system versions.


Pasting images into Pages document very cumbersome - Inline vs automatic

First make sure that the image you want to replace is defined as a media place holder.  To do this click on the image that you want to replace so that it is active.  Now go to format at the top of your screen and choose "Advanced" from the "Format" drop down.  You should see the following bold text with a check mark in front of it "Define As Media Placeholder".  If it is not bold with a check mark in front of it click on it so that it is.
Once the image has been defined as a media placeholder right click on it and choose "Replace Image".  You will be given a choice of file paths to choose your new image which should then replace the original image and keep its formatting.  This only hitch is that you might be limited to choosing only those images which have been saved to your photo stream.


storing a directory name with spaces in a bash variable

OK, found this by broadening by googling without specifying mac or osx - this is a generic bash issue:  Stackoverflow how to add path with space in bash variable

And, translating that to my question, both "interactive approaches", i.e. quoting or \-escaping work, as long as you wrap the bash variable in its own double-quotes when you run the commands:

dn='/Users/myuser/Library/Application Support/'
ls -1 "$dn" | tail -5

dn=/Users/myuser/Library/Application\ Support/
ls -1 "$dn" | tail -5

Don't use single quotes above - there is no bash substitution happening in that case and you get ls: $dn: No such file or directory.

The drawback here is having to wrap the variables in double-quotes or not depending on embedded spaces.

dn="'/Users/myuser/Library/Application Support/'" and then not having quotes doesn't work, btw.


Yep they changed it.

Now there is no more within the Video screen popup controls, unless you are in full screen mode.

Option is to use the media keys on your keyboard, or right click to control it.

Not sure I like the change.


What do these dashed-box symbols mean on Japanese keyboard?

Your image seems to have disappeared so I added one myself.

The dashed boxes represent the space that a normal character would occupy so you can see how the characters you're typing will be positioned.  On the middle row shown, the first key puts a mark in the lower-left position, the second key has the same position, the third shows that the dot will be in the middle of the character space and the last one shows the line will be beneath the normal character space, almost like an underscore


Lost everything after iPhone sync--How can I get it back?

If you've backed up recently, you might want to do a full restore, which will wipe your iPhone clean and reinstall iOS. After it's done that, it will offer to restore from a backup, reinstalling all apps, calendars, email accounts, etc.

http://support.apple.com/kb/ht1414


iTunes always asks me whether to back up apps from my iPad and iPhone

Please check out this page by Apple

You can change this in the iTunes settings, called Automatic Downloads.
Check the box, as the image displays and the applications should download instead of ask for a backup.

If you cannot click the checkboxes, you have sign in to the iTunes Store with your Apple ID.


iPod Nano 7th generation (w/ lightning connector) - will video work with a treadmill?

I picked up an official Apple Lightning -> 30 pin adapter (that set me back $40), and I couldn't get the treadmill to play video from my iPod Nano. The treadmill recognizes that I've plugged in an iPod, but then when I try to browse, it doesn't show any of the video that's loaded on the device, and I can't play anything on the monitor. I've confirmed with an iPad that the treadmill works and plays video just fine from older devices, but it doesn't work with Lightning and an adapter.


To close the current window with several tabs use:

⇧/shift⌘W

This works fine at least in Finder, Safari, Firefox and Google Chrome.


Airdrop Cancels Transfers with no error message

I Googled this issue and found a question on Apple's forums, but sadly with no answers.
Comparative Analysis:
I was fortunate to have uploaded the same folder successfully on an iPad Pro (2018) running IOS 14.2. This proved it was certainly possible, just not on my iPad Air 2 running the same version of IOS 14.2
So same folder containing same files, both devices running the most current version of IOS- 14.2. Airdrop succeeds on the iPad Pro (1TB storage), but reports a "cancelled" error on the sending device, a Macbook Pro (2018) running OSX 10.15.7 despite the iPad Air 2 (128 GB) having the required free space.  Oh, and Bluetooth was doing nothing other than Airdrop at the time of the issue.
Testing:
The Airdrop was attempted again after rebooting the iPad Air 2.  I also tried disabling and re-enabling the Bluetooth on both the sending and receiving devices for the sake of completeness.
Did some testing to see if file size was a limiting factor by incrementally removing chunky files and retrying the transfer.
Solution:
That was it: only after I got the folder size down to 1.5 GB, did Airdrop succeed.
Then I had to airdrop the chunky files I removed to get the total folder size down to 1.5 GB and move them back into the folder on the receiving iPad Air 2. So the same volume of data was transferred in the end, proving that it wasn't down to insufficient local storage.
Conclusion:
Since Airdrop worked with my more modern iPad Pro 2018, may only be an issue for folks using Airdrop as target devices with older legacy iPhones/iPads. Anyhoo, at least I can tell you what worked for me; YMMV.  Hope this gets you out of a hole if you bump into the same problem-


Recovering an entire partition that has been somewhat formatted (I seriously messed up an external HD's filesystem)

You should be able to restore at least the boundaries of the old NTFS volume:

Windows (like OS X) uses some default partition schemes to partition and format a disk.

An MBR/NTFS disk usually has an MBR in the first block (block0). The first partition usually starts at the 1 MB boundary (that's block2048) with a special block - the NTFS Boot Sector - and ends with a special block. Both blocks start with EB 52 90 4E 54 46 53 20 (hex) or ∂RENTFS(x20). The last 4096 blocks (2 MiB) are empty space usually.

Depending on how much was written while creating ("erasing") the new main HFS+ volume (usually about 120 - 160 MB after the process finished) the success of a data recovery may vary.

Detach any external drive except the broken one!

To recover the old NTFS volume boundaries you have to delete the GUID partition table and restore an MBR partition scheme:

To remove the GUIDpt, first open Terminal.app and get an overview (below I assume the disk identifier of the falsely formatted disk is disk2):

diskutil list
sudo gpt -r show disk2

The result is similar to the one below (your total size - here 1953525760 blocks and the main volume - here 1952853936 blocks - may differ slightly):

         0          1         PMBR
         1          1         Pri GPT header
         2         32         Pri GPT table
        34          6
        40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
    409640 1952853936      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
1953263576     262151
1953525727         32         Sec GPT table
1953525759          1         Sec GPT header

Remove the GUIDpt:

diskutil umountDisk disk2
sudo gpt destroy disk2
dd if=/dev/zero of=/dev/disk2 bs=512 count=1

Search the disk for the string ∂RENTFS(x20) in the last sectors of the disk:

hexdump -s 930g /dev/rdisk2  | grep "eb 52 90 4e 54 46 53 20"

-s: Skip offset bytes from the beginning of the input. The size is KiB/MiB/GiB. In my example the disk has a size of 931.51 GiB, so I searched the last 1.51 Gib only.

The result is e8e0bffe00 eb 52 90 4e 54 46 53 20 20 20 20 00 02 08 00 00 with e8e0bffe00 being the offset in hex.
Converted with a hex2dec service this means an offset of 1000203091456 (dividing this by 512, the result is equal to block 1953521663).

Since this block is the last one in the previous volume you can determine the old volume size: 1953521663 (last block) - 2048 (probable start block) + 1 (counting starts with 0). The result has to be divisible by 8!

You may also check the first blocks of the disk with:

hexdump /dev/rdisk2  | grep "eb 52 90 4e 54 46 53 20"

You should get at least one line like this: 800 eb 52 90 4e 54 46 53 20 20 20 20 00 02 08 00 00. This is the NTFS Boot Sector at block 2048 - the 1 MB boundary - since these blocks are usually not erased by Disk Utility. Enter ctrlC to stop hexdump.

Now having the first block and the last block of the NTFS volume you should be able to restore the old MBR partition with fdisk:

fdisk -e /dev/disk2
Would you like to initialize the partition table? [y] y
fdisk:*1> auto dos
fdisk:*1> edit 1
     Starting       Ending
#: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
*1: 0C    0   1   1 - 1023 254  63 [        63 - 1953525697] Win95 FAT32L
Partition id ('0' to disable)  [0 - FF]: [C] (? for help) 07
Do you wish to edit in CHS mode? [n] n
Partition offset [0 - 1953525760]: [63] 2048 #probable start of the NTFS volume
Partition size [1 - 1953523712]: [1953523712] 1953519616 #use the probable size of YOUR NTFS volume found previously here.
fdisk:*1> write
Writing MBR at offset 0.
fdisk: 1> q

Now you may be lucky and the NTFS volume just pops up or you have to use a data recovery tool.


Hold down and release right-click with a single click

This can be done using ControllerMate. Simply create this chain:


Renewal of App Store Developer Contract (Paid Applications)

Don't worry. You will receive instructions by email. You'll have to refill the form with your CC info and fax it again (I'm in BG, done this twice already).


How do I change my apple id country without a credit card?

It looks like your question is 2 fold:

  Can I accept an iTunes gift card from another country?
  Can I change my apple id country without providing a credit card?

Looks like in both cases it's a No.

1. Can I accept an iTunes gift card from another country?

From the Apple Forums

  You can't redeem it outside of the USA. You also can't change the
  iTunes Store country while any of its balance remains.

2. Can I change my apple id country without providing a credit card?

For this you can enter a credit card, but it's not charged unless you purchase an item from iTunes or the App Store.

There appear to be a bunch of different hacks around this, but nothing definite from my estimation.


Signing into a different Apple ID for Media and Purchases

You will not lose the apps already installed on your device. These apps will stay installed and registered to the previous ID. You may need to enter the Apple ID used to first install the app after a while when you come to update them and automatic updates will stop working for these apps. You will be prompted for this at the point of updating if this applies — you don't need to remember nor sign out and back in.


Unfortunately OS X Disk Utility refuses to modify partitions on MBR disks. You can modify partitions form the command line using fdisk. If you have a Ubuntu machine you would be better to use this e.g. using gparted to resize/move/create the partitions.


How to delete audio input option in system preferences macOS

I've found a solution:
Go to System preferences → Accessibility → Voice Control.
There you can choose the desired audio input. Setting it for voice control sets it for dictation as well.
You do not have to turn on voice control.


Restarting the terminal should have solved the problem since you didn't append what you have typed to a bash start-up file.

Also, even if what you have typed was directed to a bash start-up file it wouldn't affect where bash would find brew since you're prepending to the original path and not overwriting it.

Your problem lays in something else you've done that has changed the settings for your path in a bash start-up file or have deleted/altered the location of the executable.

Why aren't you able to install MySQL? What errors do you get? What form of package are you installing? Is it from the MySQL official site?

Recommended installation of brew makes it reside in /usr/local/bin/. Do you have that in your echo $PATH output? Also, normal brew installation is a simple command that doesn't need brew to start with. So do you mean you get -bash: brew: command not found after attempting the installation of brew?


how to resend a imessage containing URLs on IOS 12.4?

On a message, simply touch and press lightly while holding until Copy and More comes up at the bottom of the screen. Select More, then check the message(s) you want to resend and then in the lower right of the screen, tap the curved arrow. Fill in the To field and then send the new message.

Once you get used to the right touch pressure and holding it, this will become second nature for you.


What is an alternative to a BAT file on Mac?

Being pretty unfamiliar with batch files, I'm not sure of the functionality available, but there are two main scripting methods on OS X which are similar:

AppleScript

AppleScript is a scripting language which lets you control OS X and many applications.

AppleScripts are generally easy to understand and write whilst providing a lot of advanced functionality. Here is an AppleScript which counts the files in the Applications folder:

tell application "Finder"
    if folder "Applications" of startup disk exists then
        return count files in folder "Applications" of startup disk
    else
        return 0
    end if
end tell

For more information about AppleScript, see:

https://developer.apple.com/library/mac/documentation/applescript/Conceptual/AppleScriptX/AppleScriptX.html

Shell script

A shell script is a script for a Unix shell.

The equivalent shell script to the above AppleScript is the following:

if [ -d "/Applications/" ]; then
    ls -1 "/Applications/" | wc -l
fi

As you're probably going to use bash, this is a good guide to get you started:

http://www.tldp.org/LDP/abs/html/


I backed up my Android device and I want to restore it on my iphone 5!

Backing up Contents of Android Phone to Compter

On your Android phone, go to your Contacts. Tap the menu button and tap Import/Export. Tap Export to Storage, select the contact data you want to transfer ("Phone") and select OK.

Connect your Android to your PC (USB) and put your phone in Disk Drive mode. Your phone will appear as a drive (or two drives if you have an SD card) in My Computer or on your Mac desktop.

Create a new folder on your desktop. Look through the files on your Android device and drag and drop the content you want to transfer to your iPhone (photos, music, and videos).

Finally, search for a VCF file on your Android phone and save that file too (Don't put it in the folder necessarily; just keep it on your desktop). This is where all your contacts are.

Drag and drop that folder to your iPhone data folder. You're now ready to transfer the saved data to your iPhone.

Photos and Videos to iPhone

Connect iPhone to computer and open iTunes. Click on the iPhone on the top right corner (assuming iTunes 11.0 here), then go to the Photos tab in the main window. Check Sync photos In the drop-down menu, click Choose Folder and navigate to the Android data folder on your desktop. Your photos will appear in your iPhone's Photos app.
You can do the same for videos; just click Videos instead and choose that same folder.

Music to iPhone

Drag the iPhone folder from your desktop over your iPhone's name in the iTunes sidebar. All of your songs will be transferred to your iPhone. (You can also use this trick to transfer any other music from your desktop to your iPhone.) The music can be found in your iPhone's Music app.

Alternatively, if the first option didn't work for you, click File, Import Folder, and select the folder with all of your music from your Android phone. This will import all music into iTunes. After this is done (it may take awhile), go back to your iPhone by selecting it in the top right corner. Click Music, Sync All Music, then Sync Now.

Contacts to iPhone

You need to set up an e-mail account on your iPhone for this one to work. Then, back on your computer, send yourself an e-mail with the VCF file as an attachment. Open that e-mail on your iPhone and tap the attachment. A message will pop up at the top. Tap this button "Add all contacts." Your contacts will be saved to your iPhone.


Font Book reports "serious problems" with Code 2000?

In my experience Font Book warnings rarely have any real consequences.

It's also hard to imagine any issues that could not be easily fixed by just removing the font.  Install it manually in Home/Library/Fonts and see if you find any problems.

To get to Home/Library, hold down the option key while doing Finder > Go.

If your goal is to ensure complete Unicode coverage, I suspect MacOS already has more of this than the very old Code 2000.  To expand coverage beyond what Apple offers, I would recommend the Google Noto fonts and Symbola.

To see what font has a specific character when Apple's Character Viewer is empty, try Fileformat.


Is there a way to download Screen Time data from iPhone or other Apple iOS devices?

I am looking into this for quite some time already and I believe there is no option to do so as of now.

However there are two ways I found to get around this issue:

Option 1 (without jailbreak):
Use an App like Moment to track your phone usage and export the data via this app. My problem with this soultion is the fact that I potentially give away my data to the app's developer.
Option 2 (with jailbreak): I found this great resource that makes use of the data Apple collects anyways. The data still needs to be extracted via a script file and you still need to put some work in in order to process the outputs, but I think this is the safest bet. With this scripts you are able to extract a lot more than 'just' the phone usage.


is there anyway to directly email videos or upload a video from iphoto to youtube?

I haven't tried this myself. But I know if you have a video open in QuickTime the Youtube option is available there.

So basically you can 1)select "Reveal in Finder" from the File menu, 2) open the video in QuickTime and then 3)share to Youtube. Good luck.


download iCloud photo to mac OS X Yosemite 10.10.3

You can simply drag single Photos from the Photos app into the desired folder or there is an Export option for albums in the File menu. Select album on the top bar (cmd+3) and mark the desired album and go to File -> Export (shift+cmd+E).


When you initiate port forwarding, you don't specify the user.

localhost:~ user2$ ssh -L 8022:server2:22 user1@server1

You need to specify user in the second command:

localhost:~ user1$ scp -P 8022 user1@0.0.0.0:file .

That should work fine for you


There's a reason why Apple appears to onlookers to be so anti-Flash, and it's because Flash sucks on Macs (it may also suck on other OSs, but I don't use them enough to be knowledgeable).

What to do about it depends on what browser you use (your question doesn't say, as Mozilla's Plugin Check isn't FF-only):

Safari - the answer is ClickToFlash. Honestly, C2F is something that should just come pre-installed on every Mac.
Firefox/Camino - As Ken mentioned in a comment, you want the FlashBlock extension.
Chrome - use the FlashBlock for Chrome extension.

As has already been said: you can get along fine on almost all sites without Flash. Here's some additional recommended reading, both of which are from John Gruber at Daring Fireball:

Going Flash-Free on Mac OS X, and How to Cheat When You Need It
Masquerading as Mobile Safari to Get Websites to Serve HTML5 Video to Safari on Mac OS X


Office 2016 for Mac has a stable release available for Office 365 subscribers. It'll be available as a standalone purchase at some unspecified date in September. Until then, it looks like Microsoft has taken their beta down. What you could do is wait as long as you can bear to live without Office and then sign up for a free trial of Office 365, and then unsubscribe and buy Office 2016 once it comes out in September.


Where to find the Mac OS X Lion security configuration guide?

I have it on good authority that the Apple Security Guides take a long time to compile and produce, and publication trails the release of the operating system by some time. The same people working on that guide are also producing documentation for various security certifications and other purposes. Once the guide is released, it will be available at Mac OS X Security Configuration Guides

With Apple's recent decision to move to annual OS updates, I wonder if we'll ever see a current security guide again.

Though overkill for most computer users, the US National Security Agency also publishes hardening guides for Mac OS X and other operating systems. (They haven't published for Lion either, and their own guidelines are very likely an expansion  of the procedures Apple recommends.)

When considering the NSA advice remember that security is always a balance between safety and usability and that most of us aren't protecting secrets of State. If you don't know why you're doing it, and have a good reason to believe you need to do it, don't!  There are relatively few users who need to lock down this tightly, and the negative effect on usability, and in some cases functionality, can outweigh the benefits.


Is there a way to trace the reason 'fseventsd' process hogs CPU?

fseventd is the filesystem event logging process, you can read a lot about it in the ars technica review of Mac OS X Leopard. You can use programs like fseventer to see the same kind of output it sees.

From the article:

  The FSEvents framework relies on a
  single, constantly running daemon
  process called fseventsd that reads
  from /dev/fsevents and writes the
  events to log files on disk (stored in
  a .fseventsd directory at the root of
  the volume the events are for). That's
  it. That's the super-high-tech
  solution: just write the events to a
  log file. Boring, pragmatic, but quite
  effective.

You can check that log though I dont know how useful it will be for you. I would not be that surprised to see Time Machine, which deals with many files, and sometimes many many tiny files, to possibly cause some issues with fsevents.


How can I search for an App in the ITunes App Store in a webbrowser

iTunes has a search API as documented here, you don't need to use Google. To search for apps only, set entity to software. If you want to call this from your website via JavaScript, you'll probably also need to set callback to something appropriate.

Here is an example search URL which will return results for apps with "myApp" https://itunes.apple.com/search?term=MyApp&entity=software


Sort folders first, then files [El Capitan]

I think the simple answer is no, if the question is whether the native ls command can be configured to list directories before it lists non-directories. One of the comments suggests a shell pipeline, but rather than going to that trouble it might be easier to write a script.

The following python code is by no means intended to be a complete substitute for the ls command, but complicating it to handle more of what ls provides feels doable (python's argparse module would help with that).

#!/usr/bin/python

import os
import sys

for top in sys.argv[1:]:
    for (name, dirs, files) in os.walk(top):
        print("{}:".format(name))
        for dir in dirs:
            print("{}/".format(dir))
        for file in files:
            print(file)

What makes the separation of directories from non-directories easy in this example is that python's os.walk does that for me, in its return value. The use of os.walk implicitly imposes the equivalent of ls -R, but that should be easy to fix by adapting code from os.walk, which is native python code built on top of os.listdir and os.path.isdir, rather than invoking os.walk directly.

With respect to the question of native capabilities versus external utilities, python is native to recent releases of MacOS. Where scripting like this ranks compared to pulling in external functionality is a matter of taste.

There might be an invocation of find which fits your criteria, similar to the ls pipeline in a comment, using the -type option in multiple invocations of find, but to me that feels clumsy compared to python code.


Homebrew wants me to delete /usr/local/lib?

That's kinda the problem; Homebrew doesn't know what they are either, and randomly sourced libraries tend to break builds.  (MacPorts makes the same recommendation.  In fact, I was under the impression that was one of the things Homebrew relaxed.)

If you don't know what they are or if they're used, the simplest solution is

$ sudo mv /usr/local /usr/local.keep

and watch to see what breaks.  Chances are they're used by whatever's in /usr/local/bin, though, so look there first.


Macbook Pro early 2011 16G Memory Upgrade

While not officially supported, 8GBx2 PC3-10600 modules should work fine. Did you try both the new ones individually with a current 2GB module? If so, I'm not sure there is an option other than getting replacement modules. You could try resetting the PRAM but that's a long-shot.


Firefox plug-ins save into diffent folder Mac

The /Library/Internet Plug-Ins folder contains plugins that can be used by any browser run from any account on your Mac. The /Users/reashedzamil/Library/Internet Plug-Ins folder contains plugins that can be used by any browser but only when it is run by you.

However a better way to check which plugins are actually being used by Firefox is to type about:plugins into the address bar in Firefox. It will list all the plugins loaded into Firefox and tell you where they are. You can also visit http://www.mozilla.org/plugincheck/ which will analyse your browser plugins and tell you which ones are out of date.

You will also find another folder called something like /Users/reashedzamil/Library/Application Support/Firefox/Profiles/RANDOMTEXT.default/extensions that contains plugins (also known as Extensions or Add-Ons) that will be run within Firefox only when it is run by you. However if you think that extensions are the cause of performance issues, the best way to remove them is to open Tools -> Add-Ons from the menubar and uninstall them from there.

Another thing you can use to check for performance problems in Firefox is to type about:healthreport into the address bar.


How to retrieve data from iphone 4s when connector/charger is broken

You can take it to any of the various iPhone repair kiosks that appear throughout most malls.

I took an old iPhone there and had the charger replaced for $45.


How can I associate OpenOffice documents with OpenOffice apps instead of TextEdit?

Go to one of your OpenOffice documents in the Finder and Get Info (⌘+I). In the "Open with" section, choose the appropriate app in the popdown (OpenOffice or LibreOffice), then click the Change All... button and hit Continue in the confirmation dialog.


Why does Notes only show a sub-set of the Share extensions enabled on my Mac?

It's up to the individual share extension developer to tell the system which inputs are compatible with their extension, and to then implement the necessary code to be compatible with each.


How do I create and save multiple iPhone backups in iTunes?

Well, there is always the option to copy the contents of

~/Library/Application Support/MobileSync/Backup

to some other place on a regular basis.


Why is my iCloud storage full, even after deleting videos?

With the help of AppleCare support, after a very lengthy exchange spanning 6 months, this issue finally got resolved.

It turns out that photo and video original files were still erroneously being kept in the iCloud storage, even though I had deleted them completely from all GUI interfaces. I discovered this by downloading the entire library to my iMac using the Download and Store Originals settings in Apple Photos, and then in manually inspecting the ~/Pictures/Photos Library.photoslibrary file, by right-clicking the file in Finder and opening it with Show Package Contents.

I was then able to see old photos and videos that were supposed to be deleted long ago;  which led me to understand that they were also "stuck" in the iCloud storage and therefore held my storage space "hostage" at a higher plateau than necessary. This had forced me to increase my storage plan.

The photos and videos not deleting properly happened pre-iOS 9.11, and it's not certain if the bug causing the actual issue is still alive in later iOS versions. However, if you have under unusual circumstances encountered this bug before the update to 9.11, the originals can still be stuck there, because iOS updates will not get them out of limbo. If looks like you have used up far more disk space/iCloud storage than the amount of photos and videos in your library can account for, I suggest that you inspect the photoslibrary file.

You will then need Apple Support help to reconstruct your iCloud photos library which their engineering support team can do, once you've explained the issue to a AppleCare senior adviser. Just be warned that they are not used to this issue and a lot of explaining may be needed to get them to take the case seriously. In my case, I had to collect a lot of evidence and do some real argumentation to get them to understand that there was a problem in their system.


Could my iPhone be installing malware on factory reset?

Yes, it is completely normal to see loading bars / progress while the phone reboots after a "factory reset". It is not a sign of malware being installed.

Perhaps your suspicion is because your phone is managed - i.e. owned and controlled by your employer, school, or similar?


Recurring system.log process: "com.apple.dpd: Service exited with abnormal code: 75" - Catalina 10.15.7

Fixed! I'm not sure if there will be unintended consequences to doing this but I removed the dpd daemon from /usr/libexec/, which is a hidden folder (literally dragged it into the trash and removed it). No more recurring messages!
DPD in the Man Pages


Time Machine does not use the internet, but iCloud does. If you use an iPhone or iPad, iCloud will backup the images to iPhoto, and that can use significant bandwidth.

Calendar, Mail, Contacts, Messages, Notifications, Twitter, etc all use bandwidth, and all are on by default. iCloud will also backup your documents and data, if you have configured this. If you have more than 10GB of files in your Documents folder, iCloud could be simply backing them up from the new hard drive.


Applescript Service fails because of missing constraints

Since it was requested in the comments (sorry it took that long), here's a working version of the script. The trick is to put the filename (which contains spaces) into double quotes, because those can be escaped.

on run

    if (get output volume of (get volume settings)) < 50 then
        set volume output volume 50
    end if

    do shell script "afplay \"/Library/Application Support/HelloWorld/hello.mp3\""

    return
end run


Problems running Lion Server for 10.6 Client (as Calendar-/Adressbook-Server)?

Not everything is working smoothly.
We notice that 10.6.8 clients among them have issues with delegated calendars; if user A logs in to the CalDAV server and connects properly, the calendars are downloaded to the client and the own calendar plus the delegated calendars are shown.

When user B creates an account and logs in, chances are that she can successfully connect to the server but by then user A sees his account changed to B and everything in his iCal calendar is wiped. Disabling (taking the calendar offline) the calendar and adding account A again adds the data back in.

At that moment user B sees a blanked calendar and her name changed to A. Disabling this A calendar and re-entering the account for B puts things straight. Sort of.

This has happened multiple times; two users had the problem among them, then another group of four users had the same problem. You just have to keep disabling and re-adding the desired account until all users see only the account they need.

A peculiarity of delegation is that when adding delegates, only three, not more and not less, letters of a delegate should be typed to get a popup that you can actually choose (by pressing Enter). UNLESS the short user name consists of only three or four letters. In that case, the ENTER is rejected, you cannot choose the delegate and you HAVE to ADD a space and one more (fake?) letter. Then the three or four lettered username pops up which you then CAN select. Weird. Now the user is delegated.

Another issue we have is that changes made in a delegated calendar do not always trickle up to the server; consistently from some 10.6.8 clients, but not every client. Neither when you have 'push', nor when you have 'every x minutes'. Annoying.

10.7 clients work flawlessly as far as we can see.


Your first sync will bring items from your iPad to your iTunes library. Once that is done via iBooks on your mac drop the PDF into that app. Then when you sync again that PDF will show up on your iPad.

Or you can just email (iMessage, AirDrop) the PDF to your iPad and then open it and save it into iBooks.

If the iPad already has media content then you will want to this - https://discussions.apple.com/thread/4256950?start=0&tstart=0


Can I make push notifications for some email addresses only and not others on my iphone?

Go to

  Settings > Mails, ... > Fetch New Data > Advanced

From there, you can chose how to get new email from each account.

It could be push, fetch (every X minutes) or manual (only when you open the app)


Final Cut Pro 10.0.7 Yosemite Compatibility?

Final Cut Pro (10.0.7) is incompatible with Yosemite. When I was updating my mac to Yosemite, I had to update many apps so they would work including Final Cut Pro.


Mac Pro 2,1 Only Shows Flashing Question Mark After Update

A flashing question mark means it can't find system software, however, it is able to find the boot volume.  If the boot volume is on the RAID array, then it's not the RAID card.

Try booting from installation media to see if you can see the drive.  If you can see the volume and mount it, you can recover your data.

As for the RAID battery, it keeps the last last set of write commands in the controllers memory in case there is a power failure.  I would replace it because you lose that safety net if the battery has no charge, but it's not the cause of your issue.


LG UltraFine 5K Display connected to a MacBook Pro mid 2015 - Webcam/Mic/Speaker not working

Does the Monitor support webcam/mic/speakers from a thunderbolt 2 <-> 3 adaptor?

No.  According to the specifications, it's a Thunderbolt 3 monitor that provides connectivity.  You need a Thunderbolt 3 port.  The adapter only allows you to convert Thunderbolt 3 to 2 or 1 but it doesn't give you any more bandwidth than what you have on your existing MacBook.
You have enough bandwidth to drive the display, but not enough to drive all the peripheral devices connected to it.


Is it possible to transfer images from iPhone to SD card directly?

From my own testing, I have verified that unfortunately, you can only use the SD card reader with the iPad. You can also only transfer photos/videos from the SD card to the iPad, not the other way around. I think these would be great features (take it from a 8GB iPhone 5c owner) to have, but unfortunately they are not available at this time.

You can send feedback to Apple at http://www.apple.com/feedback/iphone.html as I have.

Edit: Now you can use the Lightning to SD Card adapter with the iPhone if you update to iOS 9.2! However, you can still only import from the SD card to the iOS Device and not from iOS Device to SD card. They have even updated the item description to mention iPhones at http://www.apple.com/ca/shop/product/MJYT2AM/A/lightning-to-sd-card-camera-reader. Still not sure about iPod touch (don't have one).


Does Windows 2008 Server run acceptably on a Mac Mini with Bootcamp?

I bootcamped windows server 2008 R2 on a mac mini that had OSX lion on it and installed the drivers for windows 7 and it works fine. I am now testing to virtualise OSX lion on virtual box in Windows server 2008 R2.


Unless you actually backed up your photos, they are, unfortunately gone.

  This ensures I have two back up devices.

This is an incorrect assumption.  What you did was ensure that you had two devices that were selectively synchronized.

There's a major difference between synchronization and backing up.  Synchronization keeps changes consistent across all devices.  This includes deletions.  Backing up makes a copy of the file(s) for safe keeping.

If you delete a photo, file, album, and it's synced with multiple devices, that deletion will propagate across all your devices.  If you had those same files backed up to a USB drive or another service (like DropBox or OneDrive) anything you accidentally deleted would be available for recovery.

As for your albums - they are "containers" that allow you to organize your folders.  If you deleted these containers, the change synched across all your devices.  As inconvenient as this is, consider yourself fortunate that you didn't lose your photos and think of this as a wake up call to implement a proper backup procedure before you inadvertently lose all your photos.


Change default highlight format in preview

The Preview help mentions:

  Use highlight mode: Click the Highlight button  (so it turns blue), click the down arrow next to the Highlight button, then choose a highlight color, underline, or strikethrough. Now, whenever you select some text, the highlighting style you chose is automatically applied to the text.

So de-select any text in an open PDF. Click the Highlight button - nothing should be highlighted additionally in your PDF now - click the down arrow and choose a color or strikethrough.

You can also determine several different highlight colors in a single PDF with this method (here yellow, pink and underline):


Problems with apache after update of php and mysql using homebrew

OK, so I found the culprit.

It is amazing that no error message was visible in console or in the error logs, but I found a site which helped me a lot.

http://blog.joshdick.net/2012/07/28/troubleshooting_apache_in_os_x_10.8_mountain_lion.html

In that post, the author, Josh, suggested restarting apache using the following command:

sudo bash -x /usr/sbin/apachectl -k start

This command provides some error information, and overcomes the frustrating silent termination of Apache.

When I issued the command, it gave me the following output:

$ sudo bash -x /usr/sbin/apachectl -k start
+ ARGV='-k start'
+ HTTPD=/usr/sbin/httpd
+ test -f /usr/sbin/envvars
+ . /usr/sbin/envvars
++ DYLD_LIBRARY_PATH=/usr/lib:
++ export DYLD_LIBRARY_PATH
+ LYNX='lynx -dump'
+ STATUSURL=http://localhost:80/server-status
+ ULIMIT_MAX_FILES=
+ LAUNCHCTL=/bin/launchctl
+ LAUNCHD_JOB=/System/Library/LaunchDaemons/org.apache.httpd.plist
+ '[' x '!=' x ']'
+ ERROR=0
+ '[' 'x-k start' = x ']'
+ case $ARGV in
+ /usr/sbin/httpd -k start
httpd: Syntax error on line 118 of /private/etc/apache2/httpd.conf: Cannot load /usr/local/Cellar/php54/5.4.11/libexec/apache2/libphp5.so into server: dlopen(/usr/local/Cellar/php54/5.4.11/libexec/apache2/libphp5.so, 10): Library not loaded: /usr/local/opt/zlib/lib/libz.so.1.2.7\n  Referenced from: /usr/local/Cellar/php54/5.4.11/libexec/apache2/libphp5.so\n  Reason: image not found
+ ERROR=1
+ exit 1

At the end of that snippet, you can see that it is trying and failing to load /usr/local/Cellar/php54/5.4.11/libexec/apache2/libphp5.so

Well, when I upgraded my homebrew installs, php5 was upgraded to 5.4.15, so that path was no longer valid. (Actually, the path was valid, since php was now at 5.4.15, and the path pointed to the older 5.4.11 lib, apache was terminating.

Modifying that line in https.conf solved the issue.


Trying to connect to iCloud but nothing happens

I was tired of trying everything so i formatted the hard drive and re installed OSX. That fixed it.


How can one jump to a specific line in Numbers?

If you have trouble opening the file and you just want to see that line try the following in Terminal. If you have never used Terminal before, note that you must navigate to the directory where the file is first, the easiest is to copy that file to your Desktop and run the following command in Terminal to navigate to your desktop folder:

cd ~/Desktop

Then run this command:

head -4223860 mybigfile.csv|tail -1 > export.csv

where "mybigfile.csv" would be your filename and export.csv is the name of the exported file. You can also display the line in terminal without saving to any file with:

head -4223860 mybigfile.csv|tail -1


Setting a durable pin-mark in maps by using Siri

I think this is not achievable via Siri, but you can still use Siri and a couple of taps to get what you're asking for.

"Hey Siri, where am I?"

All you have to do to Mark your current location, using Siri, is following these few simple steps:

Ask Siri "Where am I?" or similar questions;
It will pop you up a preview of your location in Maps, tap on that preview to get into it;
Tap the blue circle (which represents you) and tap on Mark my location.

That's it, if you want to use Siri and a shortcut to get in Maps at your current location, this are the steps to follow.

In case you would prefer to directly share your location, you'll want to follow the same exact steps, except the last one, where you'll have to Tap on Share my location, rather than on Mark my location, and that's it.

Hope this helped you out!


Missed Apple Keyboard Recall Window: What are my Options?

No. Once the 4 year extended warranty program elapses the computer is no longer covered. This, of course, is problematic given that the issue recurs regardless of the age of the computer or previous repairs.
Since current models do not suffer this issue, the only real solution is to get a new computer - or pay the repair price.


How to rewind/fast-forward audio messages in iOS

I found one way (tested on iOS13).

Long press on the audio in Messages, a pop up will appear with 3 options: "Copy", "Save" and "More..."
Choose "Copy"
Switch to the Files app and go a folder of your choosing (I chose a folder under "On my iPhone")
Long press and chose "Paste"
Open as audio file, where you can scrub, pause, fast-forward, etc.


How do I disable the three finger double tap to zoom gesture?

The three finger double tap to zoom is controlled in System Preferences > Accessibility > Zoom > Advanced > Controls.  I suspect you have the "Use trackpad gesture to zoom" enabled.  Untick it!


I'm having trouble setting up my email for my Mac, it's version 10.7.5

First, remove his account from the list of accounts in preferences.

Go to Mail > Preferences [command ⌘+,
Go to the Accounts tab [Looks like an @ symbol]
Select his old account
Click the Minus button at the bottom of the list to remove his account [see picture below]

Now, add your email account.  Note: Not to be confused with your Apple ID and password.  Even if your Apple ID is the same as your email, the passwords may be different.  One accesses Apple services (iCloud, iTunes etc.) the other is your email account.


Do I need to be concerned with timezones when creating events in my iCloud calendar?

If you have a number of events you want to enter and you have their times in another zone, it's very handy to use Calendar's time zone support.

First, go to Calendar->Preferences, and click Turn on time zone support.

This will enable a dropdown in the titlebar of your Calendar window:

You can then use this menu to change the display of everything in your calendar to a new time zone.  Pull it down and select Eastern time (or whatever other time zone or city your event is in), and Calendar will convert all your times to that zone.

At this point, you can start entering events, using the times listed in the program for the event.  You will also see a new detail in the event detail popup:

This shows what time zone the event is in.

Once you've entered all the events, turn the time zone back.  That will display all your events in your own time zone.  If you are syncing with your phone (which knows what time zone it is in) all the events will remind you at the right time.


Uses for an iPhone 2G that can't connect/sync to iTunes, but charges & works just fine

If it's jailbroken, and you are looking to get movies and music to it, then can you scp them onto the device?

So first I would check I could ssh onto the device when it was on the same wireless network as my laptop.  Then (assuming scp works anywhere that ssh does, not sure there) I'd scp files I wanted to watch over (possibly converting them with Handbrake first) and then use iFile (from cydia) to navigate to the file and watch.

If iFile is not available because of the operating system, you might have to work a little harder to put the files into the correct place for the iphone native apps to find them.


Some audio (but not all) coming out of MacBook speakers instead of Display speakers

Follow these steps to solve this issue on a Mac running macOS 10.12:

Open System Preferences
Go to Sound
Click 'Sound Effects'
Set Play sound effects through: to Selected sound output device
Optionally: Select 'Output' and set your desired sound output device (e.g. your external display).

Was this helpful?


Relocating /Users folder in MacOS 10.15 (Catalina)?

You have missed out on a hidden and not easily discoverable preference for moving your /Users/[USERNAME] folder to another location that has been built into macOS for (at least) a few years.

Open System Preferences
Go to Users & Groups
Click the padlock and authenticate
Right (or control) click on your username and select "Advanced Options.."
Click on the "Choose..." button and point it to where you want your home folder to be.

Once that is done all you need to do is copy your stuff from the old location to the new location and never deal with symlinks ever again.


Crawl computer for node_modules, add .nosync file

You can run the following to create a .nosync file in each node_modules folder
find ~ -type d -name node_modules -exec touch {}/.nosync \;

This will look through everything in your home directory. You can limit it to the Desktop folder by replacing ~ with ~/Desktop.
To have the command run regularly you can create a crontab entry:

Run EDITOR=nano crontab -e to start editing. If you haven't created another entry before the file will be empty
Add
0 * * * * find $HOME -type d -name node_modules -exec touch {}/.nosync \;

to have it run every full hour, or
0 */3 * * * find $HOME -type d -name node_modules -exec touch {}/.nosync \;

to run it every three hours
Type Ctrl-X and answer "Y" on the save prompt


Why is the process bluetoothd taking up to 100% of a CPU core

It seems to be quite a complex issue as Apple doesn't comment it/claims it doesn't happen: macOS Catalina blueoothd high CPU IOBluetoothBroadcomSchedulerWorkaround issue


AFP works over the internet assuming that port 548 is not blocked by your ISP. If you are using a private IP behind a NAT you'll need to forward port 548 to the computer that you want to connect to on the router.  Using DHCP makes this much more difficult.  If the DHCP requirement is so that your computer can join other networks easily, you might want to create a DHCP reservation for your computer on the router so that it always receives the same IP address.

That being said, the AFP experience in the Finder is pretty poor with a slow connection to the server (which is common when connecting over the internet).  Using SFTP (really SSH/Remote Login) or another protocol and a standalone client app such as Transmit or Cyberduck would be a much more responsive experience, but not as integrated as the Finder and AFP.


import file view on Mac El Capitan Not there

Apple has removed Cover Flow view from Open file dialog.

As a workaround use a separate Finder window with Cover Flow view to locate your file in and then drag&drop the file into an open Open file dialog in your browser. The Open file dialog will then switch to the folder containing the file you dropped and highlight it.


The problem you have is that EasyCapViewer 0.6.2 isn't supported on versions of macOS above Mac OS X Yosemite (10.10). In other words, it will work with versions of the Mac OS from OS X Leopard (specifically 10.5.8) up to Yosemite, but won't work on El Capitan or Sierra.

According to the developer:

  2015-10-31: Reports indicate EasyCapViewer doesn't work on OS X El
  Capitan. This would be a good time for other developers to pitch in. I
  will spend some time investigating too but no guarantees.

Source: https://bentrask.com/easycap/

Unfortunately there has not been an update since from the Developer.

In the absence of other macOS alternatives, you may have some joy from using a Windows installation via Bootcamp or via software such as VirtualBox, Parallels, or VMware Fusion.


What are these folders and files in my library folder?

If you can’t be sure they are safe, make a backup and check you have a copy of the files and then delete them.

Library can be finicky when you delete something the system needs, but Application Support with a space is legitimate. The others you show in th image don’t come from Apple so they’re malware at worst or third party created at best.


iOS 9 call log/recent calls doesn't show blue number to identify which number is referenced

I believe I found the answer (from someone else) and would like to post it in case someone else will be interested.

--//--

It's no longer blued. It just shows the label under the name or number.