How does Mac gather printer information (mainly driver) after a printer is selected in the list of printers to add?

After carefully looking at the DNSCache and Network:

More details on dns-sd.org however in short, for everything to work correctly, following four DNS Records for each printer are needed on client side in case of airprint/secure airprint:

PTR record of type _universal._sub._ipp/ipps._tcp  (lets call it universal): needed only if printer is airprint compatible (see dns-sd.org)
PTR record of type _ipp/ipps._tcp (lets call it ipps)
SRV record
TXT record

SRV record tells about the service related data (server/port etc.) and TXT record tells about the printer capabilities.

On Mac, "ipps" and "universal" records are queried by different processes (printtool and PKBrowserServic respectively). From observation: Queries of "universal" records by PKBrowserServic are more frequent than queries of "ipps" records by printtool. So, in a scenario: it has universal records but not ipps, it won't identify the driver.

To answer the original question: when a printer is selected, it queries for SRV and TXT record (based on universal or ipps records which are in cache already, thats how we see the printer in the list). If printer/print server is not available or if ipps record is missing, mac won't be able to do 'Auto Select' for the driver.

This problem can be fixed in multicast by self-querying both universal and ipps before TTL of the records expire so that the caches of all mac clients are updated.

In case of unicast, mac has high TTL of universal/ipps records, so it might take some time for ipps record to be updated in the cache in a new network but in few minutes (max 10 mins from observation), it has both ipps and universal and the issue does not exist anymore.
Another way to handle it quickly is to clear cache (sierra: killall -HUP mDNSResponder)


What is the current latest version of Apple's Books app for macOS?

I have v1.19, but I'm on a beta 10.14.5, so I don't know whether that's the generally-available 'latest'.

Note, though, that iOS & macOS versions are not necessarily ever in sync.


Adding words to Hiragana input's dictionary


Not directly - you need, at minimum, a plug adaptor to take the 2-way connector on the mic to the Apple standard 4-way connector.

There are a lot more advanced methods too, involving actual 'live' interfaces designed to do just that - it really depends on what kind of mic it is as to what interface would be best, though if its default connector is a 2-way mini-jack, then my guess would be it's a non-powered electret condenser, which are not always the best for music recording.

I'd consider having a look at some of the IK Multimedia iRig devices or alternatively, just start from this Google search for simpler connectors


How do I make my Apple ID sign in request silent?

The two-factor authentication alert follows the volume of Ringer and Alerts. It can be adjusted via the hardware volume buttons, although you may have disabled that functionality.

If that is the case, head into Settings → Sounds and adjust the slider for Ringer and Alerts. This will affect the volume of all notifications (including FaceTime call notifications).

If you want to completely silence those alerts, you can:

Drag the slider all the way down.
Use your iPad’s hardware mute switch (removed starting with iPad Air 2, iPad mini 4, iPad Pro and iPad 5).
Pull up the Control Center and enable the crossed-out bell icon.


.mov is a container format that encompasses a variety of codecs. .mov is also a file format, not streaming (which is presumably how video is distributed for the App Store.)

I'm still somewhat unsure of what backend is used by Apple for their video streaming, but I believe they use their own HLS backend, which uses the MPEG-4/H.264.

Note that Apple transcodes whatever you upload, so it doesn't really matter how you upload it–except for possible differences in upload times and whatever additional time is needed on their end to transcode it.


Mail.app in OS X — IMAP and Archive Mailbox subfolder creation

The only workaround I have found to add subfolders to the Archive mailbox is to add a new Mailbox (in Sidebar for the IMAP Account, Right click / New Mailbox…) Choose the account and for the name box enter:

Archive/"Name of the New Folder" (without quotes, remember the slash!)

This will create a new subfolder within Archive. :)

Anyone know any other way?


How to figure out what is causing the ownership of /usr/local to change from my-username to root

I had this exact same issue, and it turns out Sophos auto-update was to blame. I figured this out by running: sudo fs_usage | grep "usr/local"

It took a while, but eventually I saw Sophos's helpfully named "Installation" daemon messing with /usr/local's permissions.

I'm still trying to figure out an appropriate work around for this behavior.

EDIT: I believe Sophos has fixed this issue, see the link in the comments of this answer. It seems to be fixed for me at least!


Disk Utility not letting me partition my SSD or modify the current ones

You have several possibilities to repartition your CoreStoraged drive:

You may resize the Logical Volume Group non-destructively with diskutil
diskutil cs resizeStack LVUUID size. You get the LVUUID with diskutil cs list
You may revert the Logical Volume Group to a native volume
diskutil coreStorage revert LVUUID and check and resize the volume afterwards with diskutil resizeVolume DiskIdentifier limits and diskutil resizeVolume DiskIdentifier size. You get the DiskIdentifier with diskutil list.
Create new partitions with gpt

After repartitioning your SSD like that you won't be able to set-up Windows 7/8 with the default Boot Camp Assistant MBR-based method.

Most of the methods to efi-dual-boot/triple-boot/quadriple-boot require to completely erase of your SSD.

As already mentioned in the comments consider using Parallels/VMware Fusion and setting up virtual machines.


Find original sales information of MacBook by serial number

In addition to Max Ried's answer, several more sites share EveryMac.com's functionality, including the following:

PowerBookMedic
Apple Serial Number Info
http://www.chipmunk.nl/klantenservice/applemodel.html (English translation is on the site)
Apple support website (this is really a search for tech specs, and I think you've already mentioned it in your question,  but you can also search by serial numbers here)


Why does opening an email from Sent mailbox not show the complete thread it belongs to in iOS Mail app?

You are correct, the sent mailbox behaves differently than all the others in my testing with iCloud and O365 and Fastmail IMAP.
I wouldn’t presume to speak for Apple when they decided how to implement those switches, but their intent is very clear and easy to reproduce. Perhaps someone familiar with IMAP standards or other mail clients can see if this is typical for sent to be strictly ordered by time or that was just one team’s decision when they coded the app.
I see no configuration profile or setting to make sent work like inbox with respect to threaded treatment of mails.


You seem to have accidentially reversed which one is the listener and which one is not. I.e. you'll need to change the commands to the following:

Open the listener first:

nc -u -l 127.0.0.1 10000

Then the sender:

echo "test" | nc -u 127.0.0.1 10000

Then you'll see that the listener outputs "test" on the console.

You can stop the nc program by pressing Ctrl-c.


BGR - RGB Pixel layout problem. How to fix wrong subpixel optimization in "LCD font smoothing"

You aren't going to like it but turn it upside down.. Then you will get RGB


Can launchd run programs more frequently than every 10 seconds?

There is no way to bypass or decrease the time limit.

Apple's documentation regarding Creating Launchd Jobs states the following:

  Important If your daemon shuts down too quickly after being launched, launchd may think it has crashed. Daemons that continue this
  behavior may be suspended and not launched again when future requests
  arrive. To avoid this behavior, do not shut down for at least 10
  seconds after launch.

Your program or script needs to keep running for at least 10 seconds. Consider implementing a loop to check for file modification dates in the last ten seconds, sleeping for ten seconds, and repeating.

Alternatively, you can watch specific files using the kqueue or FSEvents APIs. This StackOverflow question may be helpful, File-level filesystem change notification in Mac OS X.


What physical maintenance should I perform on a MacBook Pro?

As long as you use common sense and generally look the MacBooks, you should be right. There's no need to change parts until you need to (e.g. a hard drive fails, a bad memory module, etc).

So, the number 1 thing I would recommend is to ensure you have a backup regime in place (e.g. by using Time Machine). So, invest in a number of external hard drives and regularly backup your data on all three MBPs.


How do I perform a partial clone between 2 MacBook Pros?

I would think that the easiest way is to use the Migration Assistant to copy your user account from the 13" to the 15" MacBook Pro.

This would ofcourse copy both the stuff you want to hang on to, and the stuff you don't want to hang on to. After migration has completed, you will need to delete the stuff you don't want.

The 13" MacBook Pro will continue to work as before - you will not loose your development environment there.

The only real alternative to this is to manually copy over only the bits you want - I'm guessing that it is much easier to delete what you don't need instead.

Also remember that with SSDs small files "cluttering" the drive is not the same technical issue as it could be with hard drives (i.e. fragmentation, etc).


What is the physical size of the Lightning connector?

I haven't seen any precise measurements of the connector itself, but you can see from these iPhone 5 blueprints (which come from Apple for case manufacturers) that the width of the area the connector goes is 9.05mm (including the plastic housing).

I used a hires image from iFixit's iPhone 5 teardown to get an estimate that the metal tip is about 84% of the width of the plastic housing, which works out to about 7.6mm, give or take. Using the same methodology, I'd estimate the height of the metal connector to be about 1.4mm.


How to uninstall Microsoft Silverlight from Mountain Lion?

I just spent an hour tearing my hair out, just like you. Deleted everything I could find, and still no luck! Fortunately, I found out about pkgutil when trying to research if other apps have similar issues. Run this command:

$ sudo pkgutil --pkgs

If com.microsoft.SilverlightInstaller shows up, it still thinks it is installed. I had to "clean" (kinda) the installation by using the following:

$ sudo pkgutil --repair com.microsoft.SilverlightInstaller

After that, I was then able to cause pkgutil to forget about the installation:

$ sudo pkgutil --forget com.microsoft.SilverlightInstaller

Hope that works for you!


A fan speed of 1400RPM really is nothing to worry about. And your model iMac does not require an external thermal sensor for an ssd upgrade, so that shouldn't be an issue for you.

My first step would be to try resetting your System Management Controller. To do this:

Shut down your computer
Unplug it from power
Wait 15 seconds
Plug the power cord back in
Wait for an additional 5 seconds
Press the power button to turn it back on

Software option

You can also try installing SSD Fan Control to see if that resolves your issue. However, I would only do that if the SMC reset does not resolve your issue.


Replacing MacBook Pro (13-inch, Mid 2012) logic board

The only logic boards guaranteed as compatible with the Mid 2012 13" Unibody MacBook Pros are either the 2.5Ghz (core i5) as you have now or the 2.9Ghz (core i7) unit also used for this model.

The cost of replacing these depends on where you're based, where you purchase from, and whether you buy a new, used or refurbished logic board.

Before considering such a replacement you should also consider whether you feel comfortable doing this yourself or not? You can review the MacBook Pro 13" Unibody Mid 2012 Logic Board Replacement page which details the tools required and steps involved. If you feel comfortable doing this, then you can decide whether or not purchasing a replacement logic board is an economical exercise or not.

Without knowing your location, I can't really recommend a retailer to purchase one from. However, most users who undertake this themselves will purchase replacement parts online from places such as eBay and Amazon, or from some specialised online retailers such as iFixit or We Love Macs.


Proof (data access) of a confirmation pop-up online

Safari on macOS has caching functionality that could potentially save copies of web sites on your hard drive - however, pages with dynamic content such as a order notifications, bidding confirmations, form content, etc. are generally not saved at all. I.e. the web sites forbids the browser from saving them to cache.

Therefore I doubt there's any chance to restore those pages for documentation. You would have needed to take screenshots, save PDFs or similar at the time the information was available to you.


This is a risky proposition, but it’s what I would do if I was in your position. Obviously I cannot test it myself. Use at your own risk, etc.

This is a highly important step!!!  Make a backup of your iPhone, either to iTunes or to iCloud. (Ideally, both.) If iTunes, be sure to set an encryption password.
Reset the device: Settings > General > Reset > Erase All Content and Settings.
When it restarts, don’t bother configuring anything, just skip through the setup steps as quickly as possible.
Run the update.
When the update is complete, run Settings > General > Reset > Erase All Content and Settings again.
Restore iPhone from backup.

That should give you your current setup but with the new version of iOS.

Unfortunately, some things do not carry over after a restore, so you will have to reconfigure some apps, but I think it’s the best chance that you have.

If you want to try a less-drastic option…

I would recommend going to Settings > General > iPhone Storage and looking at which apps are taking up the most space. Deleting them manually might help.


Copy iTunes playlists to external USB flash drive

Unless I miss something, you can just drag & drop the playlist to your USB drive.


Mac OS X (I'm speaking here of Lion, Mountain Lion & Mavericks) is a pretty good system to build a secured network access. But I can't agree more with your analysis: it really lacks any GUI to manage configuration.

For example, to be able to manage correctly DHCP, I finally set up a
highly inelegant way to circumvent the way InternetSharing is blocking any attempt to configure it.
This method may cause problem with any MacOS X update, so I have
to remove my modifications before any OS update.

Here is the technic I used with a solid success on a small network: How to stop InternetSharing overwriting /etc/bootpd.plist .

I haven't yet tested my /etc/bootpd.plist to enable distributing IPv6
addresses, but I'm pretty sure it would be working by defining the
correct <key>net_range</key> entry.


I haven't tried VLC for batch conversion, or CLI alternatives, but searching on Google returns Mediahuman on first place. It's a free app and it can work with .wma.

I haven't used it -install with care, watch for uninvited crapware.

I've used fre:ac with great success for batch processing. It's open source and free.

  It currently works with MP3, MP4/M4A, WMA, Small Vorbis iconVorbis,
  Small FLAC iconFLAC, AAC, WAV and Bonk formats.


What is the correct application to call to be able to use date?

That's interesting, I had never noticed this oddity of AppleScript before.  Strangely, if you create the date object using a string by value, neither System Events nor Finder has a problem:
tell application "System Events"
    set testResult to date "Friday, 21 September 2018 at 6:54:29"
end tell

is absolute fine (the format of my date string is different to yours, as per my system settings).
It's only when referencing the string's value using a variable that the issue presents itself:
tell application "System Events"
    set testDate to "Friday, 21 September, 2018 at 6:54:29 PM"
    set testResult to date testDate
end tell

as you pointed out, is not allowed.
Solution:
It turns out the solution is to refer the job to the top-level AppleScript object using my (or AppleScript's):
tell application "System Events"
    set testDate to "Friday, 21 September, 2018 at 6:54:29 PM"
    set testResult to my (date testDate)
end tell

Note to other users: AppleScript date strings are formatted according to your system's date/time settings, therefore a direct copy-n-paste of any of the above snippets—either mine or the OP's—may still generate an error.  You need to determine the appropriate format to use for the date string on your system, which is most easily done by examining the value returned by the AppleScript command current date, and using that as a template.


I just wrote this Apple Script that tests if:

SecurityAgent is running.
SecurityAgent is displaying something.
SecurityAgent lives at the correct location.
SecurityAgent is unmodified, meaning code signature is undamaged.

tell application "System Events"
    set processList to get the name of every process
    set saWindows to {}
    if processList contains "SecurityAgent" then -- does it run?
    set saPath to POSIX path of application file of application process "SecurityAgent"
    if saPath is not "/System/Library/Frameworks/Security.framework/Versions/A/MachServices/SecurityAgent.bundle" then -- assume this location is protected enough to be geniune
        tell application "Finder" to display dialog "There is a SecurityAgent, but it's the wrong one!" with icon stop buttons {"OK"}
        return
    end if

    try -- is it signed
        set saSignature to do shell script "codesign -d /System/Library/Frameworks/Security.framework/Versions/A/MachServices/SecurityAgent.bundle/Contents/MacOS/SecurityAgent"
    on error
        tell application "Finder" to display dialog "Signature broken!" with icon stop buttons {"OK"}
        return
    end try

    set saWindows to every window of application process "SecurityAgent"
end if

if saWindows is {} then -- Does it display a dialog?
    tell application "Finder" to display dialog "No official password dialog is opened." buttons {"OK"} with icon stop
    return
end if
end tell

display dialog "Seems legit." with icon note buttons {"OK"}


You probably put the plist in ~/Library/LaunchAgents/. Since /opt/local is owned by root:wheel (that's at least the default), you don't have the proper permissions to write to certain necessary folders (e.g. /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/tmp). The log files (i.e. /var/log/org.macports.selfupdate.log/err) neither can be created, because only root can write to /var/log/.

So run the selfupdate service as launch daemon:

Remove the launch agent from the launchd database:

launchctl remove org.macports.selfupdate

Move the plist to /Library/LaunchDaemons/:

sudo mv ~/Library/LaunchAgents/org.macports.selfupdate.plist /Library/LaunchDaemons/org.macports.selfupdate.plist

Modify owner and permissions:

sudo chown root:wheel /Library/LaunchDaemons/org.macports.selfupdate.plist
sudo chmod 644 /Library/LaunchDaemons/org.macports.selfupdate.plist

Load the daemon:

sudo launchctl load /Library/LaunchDaemons/org.macports.selfupdate.plist

Such launch daemon is run with root permissions and can update MacPorts data as well as write to /var/log/.


Extracting photos out of very old iPhoto Library to import directly into Apple Photos on El Capitan

You can, but you'll lose metadata such as albums and you might end up with duplicated photos if you import both the modified and the original.

Instead, you can use the iPhoto Library Upgrader to prepare the library for import into Photos directly. This Apple tool takes your pre-'09 library and allows it to be imported into Photos. For more information on how to use the iPhoto Library Upgrader, see Using the iPhoto Library Upgrader tool.

Pre-'09 is v7.x and earlier. v8.x and later can be imported directly with Photos without this tool.


Can I handout versions of multiple PowerPoint decks converted to PDF files?

It took me a few hours to come up with a solution that works in my environment.
Please note that some elements need internationalization like "Vorschau" or "Sichern". This is a german solution working with PowerPoint for Mac 16.16.27 on macOS HighSierra 10.13.6.
I had to heavily debug things with ScriptDebug ($99 well spent ..) to get things working. Please note how Preview is used for the actual PDF saving. I tried doing this from Powerpoint but it was unreliable.
https://latenightsw.com/
see https://github.com/WolfgangFahl/ppt2pdf for a maintained version of this.
Example call
ppt2pdf *.pptx

Please note that the files are expected in the current directory. The applescript ppt2pdf.scpt expects the path to the files as the first parameter and all others as just filenames. This behavior could easily be changed.
ppt2pdf
#!/bin/bash
# WF 2020-11-15
# use current path as base path
osascript $HOME/source/applescript/ppt2pdf.scpt $(pwd) $@

ppt2pdf.scpt
-- 2018-01-31
-- https://github.com/irmowan/Convert-ppt-to-pdf/blob/master/Convert-ppt-to-pdf.applescript
-- modified by WF 2020-11-15
--
-- ppt2Pdf({"/Users/wf/Projekte/2020/Infrastruktur2020/ppt2pdf", "TestMe.pptx"})

--http://hints.macworld.com/article.php?story=20050523140439734
-- passing command line arguments to applescript
on run (argv)
    log (count (argv))
    if ((count of argv) < 2) then
        log "usage: ppt2pdf basepath [filenames]"
    else
        my ppt2Pdf(argv)
    end if
end run

--
-- convert powerpoint to pdf on the given list of files
--
on ppt2Pdf(fileNames)
    log "launching Powerpoint ..."
    set pp to "Microsoft PowerPoint"
    tell application pp -- work on version 15.15 or newer
        launch
        set isfirst to true
        repeat with fileName in fileNames
            if isfirst then
                set basepath to fileName
                log "base path is " & basepath
                set isfirst to false
            else
                if fileName ends with ".ppt" or fileName ends with ".pptx" or fileName ends with ".pptm" then
                    set filePath to basepath & "/" & fileName
                    -- set filePath to POSIX path of fileAlias
                    set pdfPath to my makeNewPath(filePath)
                    log "trying to convert powerpoint file " & filePath & " to " & pdfPath
                    open filePath

                    -- save active presentation in pdfPath as save as PDF
                    -- save in same folder
                    -- https://macscripter.net/viewtopic.php?id=26342
                    --tell application "System Events"
                    --  set listOfProcesses to (name of every process where background only is false)
                    --  tell me to set selectedProcesses to choose from list listOfProcesses with multiple selections allowed
                    --end tell
                    --repeat with processName in selectedProcesses
                    --  log processName
                    --end repeat

                    if not my chooseMenuItem(pp, "Datei", "Drucken...") then
                        error number -128
                    end if

                    --my showUiElements(pp, "menu button")
                    -- my waitFor(button whose description is "PDF", 5, 0.5)
                    my choosePopUp(pp, "Layout für den Druck", "Notizen")
                    my choosePopUp(pp, "Farbausgabeformat", "Farbe")
                    --my chooseMenuButtonItem(pp, "PDF", "Als PDF sichern")
                    local myTitle
                    tell application "System Events"
                        -- the magic of Applescript
                        -- if you really want the title and not a reference to it you need to use an operator
                        -- http://books.gigatux.nl/mirror/applescriptdefinitiveguide/applescpttdg2-CHP-12-SECT-5.html
                        set myTitle to title of window 1 of process pp & ""
                    end tell
                    my chooseMenuButtonItem(pp, "PDF", "In Vorschau öffnen")
                    delay 5
                    tell application "System Events"
                        log "waiting for Vorschau to display " & myTitle
                        set timeLeft to my waitForAppearWindow(myTitle, process "Vorschau", 30, 0.5)
                        if timeLeft < 0 then
                            log "Vorschau " & myTitle & " window didn't show up after 30 secs"
                            error number -128
                        else
                            log "Vorschau appeared with " & timeLeft & "secs left"
                            tell process "Vorschau"
                                delay 0.2
                                click menu item "Als PDF exportieren …" of menu 1 of menu bar item "Ablage" of menu bar 1
                                delay 0.5
                                -- CMD-SHIFT-G to set the export director
                                -- https://dougscripts.com/itunes/itinfo/keycodes.php
                                keystroke "g" using {command down, shift down}
                                delay 0.2

                                tell sheet 1 of window (myTitle)
                                    tell sheet 1
                                        -- dereference basePath
                                        local basePathStr
                                        set basePathStr to basepath & ""
                                        set value of first combo box to basePathStr
                                        delay 0.2
                                        click button "Öffnen"
                                        delay 0.2
                                    end tell
                                    click button "Sichern"
                                    set timeLeft to my waitForAppear(sheet 1, 3, 0.2)
                                    tell sheet 1
                                        if timeLeft > 0 then
                                            click button "Ersetzen"
                                        end if
                                    end tell
                                    delay 5
                                    keystroke "q" using {command down}
                                end tell

                            end tell
                        end if
                    end tell

                    --tell application "System Events"
                    --  set timeLeft to my waitForAppear("button", button "Sichern" of sheet 1 of sheet 1 of window 1 of process pp, 5, 0.5)
                    --  if timeLeft < 0 then
                    --      log "Sichern button didn't show up after 5 secs"
                    --      error number -128
                    --  end if
                    --  click button "Sichern" of sheet 1 of sheet 1 of window 1 of process pp
                    --end tell

                    --tell application "System Events"
                    --  delay 0.5
                    --  try
                    --      set timeLeft to my waitForAppear("button", button "Ersetzen" of sheet 1 of sheet 1 of sheet 1 of window 1 of process pp, 5, 0.5)
                    --      if timeLeft < 0 then
                    --          log "Ersetzen button didn't show up after 5 secs"
                    --          error number -128
                    --      end if
                    --      click button "Ersetzen" of sheet 1 of sheet 1 of sheet 1 of window 1 of process pp
                    --  end try
                    --end tell
                    log "done ..."
                    -- close filePath
                end if
            end if
        end repeat
        -- still in tell powerpoint context
        --tell application "System Events"
        --  delay 0.5
        --  try
        --      set timeLeft to my waitForVanish("window", window "Sichern" of process pp, 60, 1)
        --      if timeLeft < 0 then
        --          log "print dialog didn't vanish after 60 secs"
        --          error number -128
        --      end if
        --  end try
        --end tell
        quit
    end tell
end ppt2Pdf

on showElement(uiElem)
    local className
    set className to class of uiElem as string
    log (((«class pDSC» of uiElem as string) & "=" & value of uiElem as string) & "(" & className) & ")"
end showElement

--
-- show all UI elements
--
on showUiElements(appName, filterClassName)
    tell application "System Events"
        tell process appName
            tell (1st window whose value of attribute "AXMain" is true)
                repeat with uiElem in entire contents of it as list
                    try
                        local className
                        set className to class of uiElem as string
                        if filterClassName is missing value or className is filterClasssname then
                            log (((description of uiElem as string) & "=" & value of uiElem as string) & "(" & className) & ")"
                        end if
                    end try
                end repeat
            end tell
        end tell
    end tell
end showUiElements

--
-- wait for the given element to appear
--
on waitForAppearWindow(elementName, parentElement, time, slice)
    set timeLeft to time
    set appeared to false
    repeat until (appeared) or timeLeft ≤ 0
        try
            set appeared to window elementName of parentElement exists
        end try
        delay slice
        log "."
        set timeLeft to timeLeft - slice
    end repeat
    log timeLeft
    return timeLeft
end waitForAppearWindow

--
-- wait for the given element to appear
--
on waitForAppear(element, time, slice)
    set timeLeft to time
    set appeared to false
    repeat until (appeared) or timeLeft ≤ 0
        try
            set appeared to element exists
        end try
        delay slice
        log "."
        set timeLeft to timeLeft - slice
    end repeat
    log timeLeft
    return timeLeft
end waitForAppear

---
--- wait for the given element to vanish
---
on waitForVanish(element, time, slice)
    set timeLeft to time
    try
        repeat while (exists element) and timeLeft > 0
            delay slice
            log "."
            set timeLeft to timeLeft - slice
        end repeat
    end try
    log timeLeft
    return timeLeft
end waitForVanish

on chooseMenuButtonItem(appName, buttonName, itemName)
    tell application "System Events"
        tell process appName
            tell window 1
                local win1
                set win1 to it
                tell sheet 1
                    log "choosing " & itemName & " of menu button " & buttonName
                    tell menu button buttonName
                        click
                        delay 0.1
                        tell menu 1
                            click menu item itemName
                        end tell
                    end tell
                end tell
            end tell
        end tell
    end tell
end chooseMenuButtonItem
--
-- choose a popup
--
on choosePopUp(appName, buttonName, itemName)
    tell application "System Events"
        tell process appName
            tell window 1
                tell sheet 1
                    log "choosing " & itemName & " of pop up menu " & buttonName
                    --repeat with pbutton in pop up buttons
                    --  local pbutton1
                    --  set pbutton1 to pbutton
                    --  log description of pbutton & "=" & value of pbutton
                    --end repeat
                    tell (1st pop up button whose description is buttonName)
                        click it
                        delay 0.5
                        pick menu item itemName of menu 1
                    end tell
                end tell
            end tell
        end tell
    end tell
end choosePopUp

--
-- https://developer.apple.com/library/archive/documentation/
-- LanguagesUtilities/Conceptual/MacAutomationScriptingGuide
-- AutomatetheUserInterface.html#//apple_ref/doc/uid/TP40016239-CH69-SW17
--
on chooseMenuItem(theAppName, theMenuName, theMenuItemName)
    try
        -- Bring the target app to the front
        tell application theAppName
            activate
        end tell

        -- Target the app
        tell application "System Events"
            tell process theAppName

                -- Target the menu bar
                tell menu bar 1

                    -- Target the menu by name
                    tell menu bar item theMenuName
                        tell menu theMenuName

                            -- Click the menu item
                            log "clicking " & theMenuItemName
                            click menu item theMenuItemName
                        end tell
                    end tell
                end tell
            end tell
        end tell
        return true
    on error
        return false
    end try
end chooseMenuItem

on makeNewPath(f)
    set t to f as string
    if t ends with ".pptx" or t ends with ".pptm" then
        return (text 1 thru -5 of t) & "pdf"
    else
        return (text 1 thru -4 of t) & "pdf"
    end if
end makeNewPath


Is it possible to disable Apple Watch iMessage notifications while my MacBook Air is unlocked?


Adding SMB share to sidebar in OSX Mountain Lion

It works on 10.8.2 without creating an alias. You can drag the shared folder to the sidebar. It will auto mount after you have disconnected.


I've been searching for cal -3 functionality on Mac as well.

From your quote, there's an alternative, GNU gcal, which is radically different from cal command. There's a tutorial that's easy to follow as well.

So I settled with it. You can type gcal . for cal -3 equivalent.


Can I make an OS X ESD (or other USB drive) read-only?

One thing I have tried is using Sharing & Permissions to set rights to Read only for myself, like so:

This prevents some writes:

megaweapon:Mac OS X Install ESD matt$ touch foo
touch: foo: Permission denied

but if I try to make modifications through the Finder, I'm prompted for my password for administrative access.

Unfortunately, this is not a hard defense against write access.  To accomplish this, a USB stick with a write lock switch (hard to find) or perhaps an SD card in a reader might work.


It depends:

There are a few universal apps (the ones that will have a + icon in their purchase area), which means that they run in a native UI on both devices. Many developers have added this to their apps for free to the user. In this case, you probably even have the updated version already, and it will work just right on your iPad. Some examples may be like Instapaper, NewsRack, 2Do, The Incident, Infinity Blade, etc.
Other apps differentiate between the two versions, usually a normal version and what many call an HD version. Since this is a different app, they usually are priced differently and can not be updated between versions. An example would be Flight Control or Angry Birds, both have a different iPhone and iPad app, where you would have to buy both.

There is no way currently to upgrade to the better version for a discount between devices. So to answer your question, you would have to rebuy anything you want on your iPad (that's specifically made for iPad) that wasn't provided for free from the developer in an upgrade to the app (where the developer made the app universal with an update).


Why can't I upload pics on certain sites

Mobile safari before iOS 6 does not have access to data from the camera roll or photo application by design.
iOS doesn't have a common space to store files like computer users have come to expect. Instead, each app is "sandboxed" and can only see the data it created/downloaded. Apple provides API for one program to request data from another. Mobile Safari would need to have hooks to allow a web site to ask to use the photo chooser for image upload to work. So the design makes it hard to upload files in the way most web sites expect on iOS.
The best you can do is use another app like the flickr app to push photos to the internet and then link back or upload from a URL. It's clumsy but works without you waiting for mobile safari to change or updating to iOS 6.


Why do my hidden photos still show up in the Albums?

You can delete it! Hide works only for moments, so in moments hidden photos won't appear


Using all trackpad gestures via Apple Remote Desktop

You can use BetterTouchTool to recognize all gestures and than send a keystroke to Remote Desktop which in turn will invoke the desired functionality on the remote machine.

BetterTouchTool can configure actions for gestures based on the current active application. This way you are able, for example, to map "three finger left" to the shortcut for "history back" which you can configure as the action of "three finger left swipe" for Remote Desktop.


Mavericks - strange behavior creating simlink in root directory

/home is already used by automount, see /etc/auto_master and the various man pages for details.


Apple Cinema Display 27" with early 2015 MacBook Pro

You won't need any separate cable to connect the display to your 2015 MacBook Pro.

A Mini DisplayPort cable is attached to the display which can be plugged into one of 2 Thunderbolt 2 ports present on the left side of your MacBook Pro (besides MagSafe 2 connector).


You can use Keyboard Maestro with a macro such as this. The following macro will add the link to the Reading List if the link is clicked whilst holding control and alt. Holding control means it will be right-clicked anyway and typing the text means it will select the option from anywhere in the list.

If you have multiple services enabled, you will need to add a step to select the Services submenu.


Battery Not Charging and Light Not Showing Up Again

The first thing you should do is examine and clean the MagSafe connector, both on the cord and on the machine. MagSafe's have five spring loaded pins; if one of the pins is stuck, or grime is blocking a connection, that can cut the power output of the cord, meaning the computer will run but the battery won't charge. Apple says:

  To clean the MagSafe connector and pin area, disconnect the adapter
  from the wall outlet and from the computer. Remove debris gently with
  a cotton swab or a soft bristle toothbrush. Be careful not to get any
  cotton fibers stuck in the pin receptacle and to not bend or otherwise
  damage any of the pins. (see: MagSafe Troubleshooting)

Failing that, this likely needs repair.

The MagSafe board is inexpensive and relatively quick to replace. Next is the battery and all cables, most expensive and difficult to exchange is the logic board.

You would want to replace parts one by one until the hardware issue is resolved.

Resetting the SMC is a once every 6 months thing, if you do that more often it’s hardware repair that’s needed.


Is there any difference installing command line tools with xcode-select --install or through developer.apple.com


Different speed for Magic Mouse and built-in trackpad

In my testing just now, the trackpad and mouse have separate tracking speeds. I moved the trackpad to the slowest setting, and the mouse to the fastest. The trackpad was slow and the mouse was fast. The two did not seem to affect each other.

The answer should be to move each to the setting that works for you.

Could you elaborate more on what happens when your adjustments affect each other? Have you tried setting each to a different extreme to see what happens?


Installation of Adobe Creative Suite 6 hangs at AdobeHelp on Mac OS X El Capitan

Here is a workaround for this issue:

Restart the system, as the installer had to be force quit, and could not be relaunched easily.
Mount the ProductionPremium_CS6_LS7.dmg disk image. (Or I assume any of the other CS6 products)
In Finder navigate to CS6 ProdPrm, then Adobe CS6 Production Premium, then payloads, then AdobeHelp, and execute Adobe Air Install.app.
Once the previous step is complete navigate to CS6 ProdPrm, then Adobe CS6 Production Premium, then payloads, then AdobeHelp, and execute AdobeHelp.air.

Note: As Karl pointed out, the AIR installer bundled with certain CS6 products may not install on Mac OS X El Capitan. If this is the case, you will need to navigate to https://get.adobe.com/air/ and and download and install Adobe AIR.
Once the previous step is complete navigate to CS6 ProdPrm, then Adobe CS6 Production Premium, and run Install.app.


iPad iOS6 built-in Notes app - where are the notes stored?

Notes are stored locally without limit other than storage space on the iOS device. They sync to iCloud and there is a web app for viewing / editing the notes.

They do count towards your 5 GB of free iCloud storage that you get by virtue of operating an iOS device. Should you need more storage than that, you can pay yearly.

If you don't sync the notes to the cloud, then that limit is not in effect. Whether or not you sync with iCloud, the notes are stored locally on the iPad.


Is it worth is to get a headset with AAC codec for iPhone?

It's hard to say whether it is worth it as it highly subjective.

A headset with AAC codec support will be able to receive audio at a higher quality than the alternative SBC codec at similar bit rates.

The question is whether you are able to hear the difference in sound quality, and if that translates into enough value for you that you're willing to pay a premium for it.

So basically, if you're into high quality audio - go for the AAC support. If you don't care, you're probably not going to notice the difference between AAC and SBS anyway.


How to transfer music from one iTunes Library to another on the same computer?

The easiest way is to create a folder, say on the Desktop, then open that folder. In iTunes, create a playlist, and add all the music you want there. Select all these items, then drag them to the window you opened for the folder on the Desktop; the Finder will copy the music files. Next, quit iTunes, launch it and choose the second library, and add the files by dragging them onto the iTunes window. You can then go back and delete the files in the original library, if you want.


Migrate SSD to another Mac...should I reinstall macOS?

MacOS is largely hardware-agnostic, in that every installation contains all the drivers for all the hardware that it supports. The only exception to that is special builds of the OS created for brand new hardware, released after the latest OS version.

I have physically swapped or cloned complete drives from one Mac to another for many years, across a range of different models, and OS versions, largely without incident.

The only time cloning didn't worked for me was transferring to a Mac with a T2 chip, and yes, the issue (non-booting) was fixed by reinstalling the OS on top of the cloned data. I have not seen any other problems since then.

Migration Assistant is a lot better than it used to be, but is not without problems itself, (such as not migrating stuff), but if you want to go that way: copy the drive's contents to some other disk; erase and install the new OS; and then Migrate the data from the backup copy of the SSD's data.

FWIW, I have just migrated the contents of a 2012 MacBook Pro onto a brand new MBP, connecting the old hard drive directly with a SATA/USB cable, and it took about 8 hours for c. 600 GB of data.

It does seem broadly unnecessary to wipe the disk and then put everything back onto it!


Remove shortcut for paste and match style

Go to App Shortcuts defined in System Preferences → Keyboard → Shortcuts → App Shortcuts and override the default shortcut.


Approach this in either of two ways, depending on the size of your old drive and your new drive.  The second is quite involved and requires a lot of technical know how.

Method one:

Buy a new drive with an enclosure. Replace the failing drive with the new one.  Put your old drive in the enclosure, install Mac OS X on the fresh drive and transfer your data from the old drive.

However that is not what you requested.

Method two:

The second method is to use the dd command and ssh via terminal. The two machines will need to be on the same network, and will need to be able to see each other.

I've looked up both your machines on everymac.com and will assume that your dying drive is 500GB and the new one has 1TB.

You will need more than 600GB of free space on the new machine for this to work and you need to know what you are doing.

You need to download and burn a copy of any selfbooting Linux distribution (I have tested this with an old copy of Ubuntu 12.04 I have lying around).

Once you have the disk burned you need to boot your dying machine with the DVD/CD you just created by holding the alt key while your machine reboots, then selecting the media in your DVD drive to boot from.

You will need to set up your old iMac on your network, I would use cables rather than wifi (because there is less to go wrong and it is easier).

Make sure both your old and new machines can "see" each other via ping.

On your mac open System Preferences>Network>Ethernet.

Configure the IPs:
I used the IP 10.10.0.1 and subnet mask of 255.255.0.0, on the "Linux" mac I used 10.10.0.2 with the same subnet mask. From the command line on either machine you should be able to ping 10.10.0.1 and 10.10.0.2 before you proceed to the next step.

Enable remote login on your new machine.

Find the partition on your old mac you want to copy via Linux command line.  This is most probably going to be /dev/sda

You will need to be root on your "Linux" machine so do sudo -s

From your old machine (Linux) issue the command (via the shell):

dd if=/dev/sda | gzip -1 - | ssh user@hostname dd of=image.gz

This assumes that the drive on your old machine you want to copy is called /dev/sda, you will need to replace user with your username on your new machine, and hostname is the IP address of your new machine.

The command will take a long time as it copies your old disk perfectly to a new image on your working iMac.

Once you have replaced the old disk on the failing machine you can restore the image by booting Linux again and issuing the following command:

ssh user@hostname dd if=image.gz | gunzip -1 - | dd of=/dev/sda

This will take the created image and put it on your new harddrive.


I hope someone comes up with something better than this, but…

X-out the search - this awkwardly leaves you in the now empty search box rather than in the mail list.
Select any mail in the list. [Or hit Tab until you get back into the list. Depending on how you have your tabbing set up that could be three presses, or about 10:\ ]
Press Home [or Fn/Left Arrow if you don't have a dedicated Home key]
Select the top mail.

Basically, with this method all you're gaining is the Home key-press to get you back to the top. The rest is still very manual.


How many times can I attempt to guess the pin code of the restrictions settings on iPad?

If you are talking about Parental Control type of restrictions on the iPad, I believe that to be entirely iOS software level. You have 6 attempts before it locks you out for a minute. It then increases the locked-out time after further failed attempts. Since you have two failed attempts, it should let you have four more without consequence, which, if one goes through, all is well, if not, you will be locked out, before you can do a 7th attempt for 1 minute - to start with.

If you fail the 7th time, it will increase the time to 5 minutes.
The eight time increases it to 15 minutes.
And if you fail the ninth time, the timer increases to sixty minutes and will be that amount until you enter the right one.


Browsers Keep popping phishing websites (I think)

Macperfomance is malware advertising mackeeper, so first of all keep yourself out of this soft, never install mackeeper.

In order to clean this shit your should first delete file mackeeper.plist and all other files you can't recognize as your desired software from folders /library/LaunchAgents,  /library/LaunchDaemons,  /users/%yourusername%/library/LaunchAgents

After that close all your apps and reboot your Mac


How to skip Safari's "Do you want to allow this page to open X" dialog?

If the application you want to use is already running (or is in the dock), you can drag and drop the magnet link onto the application's dock icon to avoid the dialog.

There's also a discussion on the Transmission forum on this. The dialog that appears when clicking on such a link seems to be a Safari security feature that currently can't be disabled.


Safari now has a ScreenCapture feature built-in, as explained in the article Full Page Screenshots in Browsers:

  In Safari DevTools, select a node, right-click, and you'll see Capture Screenshot in the context menu.

There isn't a keyboard shortcut AFAIK, but it is available without additional third-party software. To capture the entire page, you would right-click on the <html> or <body> node, as demonstrated in this image from the CSS-Tricks article:


Is there a way to remove the artist name from a large number of titles in itunes?

Try Doug's AppleScripts for iTunes . I think This one does it if not there will be something similar


I'm a big fan of Daisy Disk. It gives you a graphical display of the usage of your drive. It lets you delete items pretty quickly too. You can try it for free. (Disclaimer: not associated with Daisy Disk except as a satisfied customer.)


SSD is not recognised with the internal SATA cable (13" 2010 MBP)

The actual problem here was that I installed the OS while the SSD was in an external enclosure, not installed in the internal bay. When I wiped the drive, installed it in the bay and then installed the OS from the old HDD, now in an external drive, my problems were solved.

I also tried another SATA cable before switching the positions, and that didn't help.


Get rid of “us international pc” and use “us”or “abc” instead.  You do this in system preferences/keyboard/input sources.


How do I use RemotePC to access a Mac from an iPad?

Macs come with VNC automatically, no additional install. If you can trust everyone on your local network and your VNC ports are closed on your router/firewall, then I would just turn it on. There is a check box under advanced remote management or remote desktop options that says something about allowing VNC users to log in. There's an optional password field. I use iTeleport then to VNC into my mac. There are other cheaper VNC programs too, but iTeleport is pretty excellent.


Get Dragon Dictate to move cursor to The end of the current line?


How to disable scrolling while clicking with the Magic Mouse?

Since we've established that your Magic Mouse doesn't have this behaviour with another computer, I'd reset your NVRAM and also do a boot into Safe Mode.

Resetting the NVRAM

Older Macs had what's called Parameter RAM (PRAM), newer Macs use Non-Volatile Random-Access Memory (NVRAM).

Since you haven't specified what model of Mac you're using, below are some generic steps that will work with all models (including all Late-2016 MacBook Pro models):

Shut down your machine. Yes, a full shut down, not just logging out.
Press the power button and then immediately press the commandoptionPR keys.
Keep these keys pressed down for at least 20 seconds!
Let go of the keys and let your Mac reboot normally.

Now test your Magic Mouse to determine if the issue is still present. If this doesn't resolve it for you, proceed to booting into Safe Mode.

Note 1: When you log back in you may need to readjust some of your system preferences (e.g. speaker volume, screen resolution, startup disk selection, time zone information, etc).

Boot into Safe Mode

Follow these steps to boot your Mac into Safe Mode:

Fully shut down your Mac
Restart your Mac
Immediately press the Shift key and keep it down
Let go of the Shift key when you see the login window (NOTE: If you have FileVault enabled you may need to log in twice).
Take a note of what happens (i.e. test your Magic Mouse)
Now exit Safe Mode by restarting your Mac as normal
Again, take a note of what happens (i.e. test your Magic Mouse)

Once you've booted into Safe Mode, let me know how you went and we'll go from there.

Trash Magic Mouse .plist files

Since your issue persists both in and out of Safe Mode, I would trash the relevant Magic Mouse preference files.

As you don't specify what version of macOS you're using, I'll assume you're running a version from Mountain Lion and above. Follow these steps:

Go to Finder
Press and hold the option key
While keeping the option key down, click on the Go menu and select Library from the list
This should open up your user's Library folder in a new Finder window
Locate and open the Preferences folder (it's within the Library folder)
Within this folder find the following two .plist files:

com.apple.AppleMultitouchMouse.plist
com.apple.driver.AppleBluetoothMultitouch.mouse.plist

Now Trash these files
Restart your Mac

Your Mac will now create a new set of default preference files for your Magic Mouse.

Note: You will need to go back to System Preferences and reconfigure your Magic Mouse settings. However, before doing that I would test the Magic Mouse first to see if the problem behaviour still persists.

Reset Bluetooth Device List and Bluetooth Controller

This is something I've had a number of users do to resolve issues with 3rd party Bluetooth devices (usually a keyboard and/or mouse, but also headphones etc).

Since you're using a genuine Apple Magic Mouse you my decide not to bother, but I think it's worth trying.

In a nutshell you need to reset both the macOS Bluetooth Device List and Bluetooth Controller. However, this will reset all connected Bluetooth devices, including your keyboard and mouse, so each Bluetooth device will need to be paired again.

I have some steps you can follow, but I strongly suggest you read all of the steps first before commencing (or perhaps print out the instructions / view them on another device).

Before starting, ensure you have the Bluetooth icon showing in the menu bar. If it is not there, open System Preferences > Bluetooth and enable the option Show Bluetooth in Menu Bar.

Also, since you're trying to resolve an issue with your Magic Mouse,  you will need to use another mouse to follow these steps:

Hold down both the Shift and Option keys and at the same time click on the Bluetooth icon in the menu bar. Once the menu is showing, release the keys.
From the Bluetooth menu, choose Debug > Remove All Devices
Hold down both the Shift and Option keys again and at the same time click on the Bluetooth icon in the menu bar.
From the Bluetooth menu,  choose Debug > Reset the Bluetooth Module
Shutdown your Mac
Ensure your Magic Mouse is fully powered off
Restart your Mac
On your Mac, click on the Bluetooth icon in the menu bar
Select the Set Up Bluetooth Device option
On the mouse, turn the power on
Once the Setup Assistant finds the mouse, select it from the list and click on “Continue”.
Now pair your mouse
If you have any other Bluetooth devices, you can go ahead and pair them now (or you can do it later).

Let me know how you go.


Apple Developer Program enrolment outside of Apple listed regions

I'm a developer in South Africa and I don't have a bank in USA.
You enroll with your Apple ID, and the $99 will deduct from the card you have added to it. If you don't have an Apple ID, you can create one and add your card details there.
It doesn't need to be a credit card, you can pay with a debit card as well, as long as it can do online payments (usually cheque accounts). If you don't have a credit card or a cheque card, you can buy a pre-paid MasterCard/VISA card and just recharge it with money (might have problems with the cardholder name, see below). I don't have a credit card but I do have a chipped VISA debit card (from South Africa) which works for online payments and works for Apple Developer Program.
And anyone can register from any country. :)

What payment methods can I use?
You can pay for your items with a Visa, Mastercard, Discover, or American Express.
Can I use a credit card other than my own to complete my purchase?
The payment information you provide must match exactly with your enrollment information. If this information does not match, your enrollment will be delayed and you may be asked to provide a copy of a government issued identification.


Edit / Amended a previously annotated image in preview.

Preview app and the jpg and png file formats do not have this capability. You'll need a layered image editor like the affordable Pixelmator, Acorn, or the expensive kitchen sink Photoshop or Photoshop Elements.


Embedded YouTube videos on mobile Safari - has something changed?

(This info is in response to a slightly different question on this forum)

I don't know what the actual answer is, but I am having the same issue. The page https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/AudioandVideoTagBasics/AudioandVideoTagBasics.html

has some good info. And the page https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html#//apple_ref/doc/uid/TP40009523-CH5-SW1

states

"Optimization for Small Screens

Currently, Safari optimizes video presentation for the smaller screen on iPhone or iPod touch by playing video using the full screen—video controls appear when the screen is touched, and the video is scaled to fit the screen in portrait or landscape mode. Video is not presented within the webpage. The height and width attributes affect only the space allotted on the webpage, and the controls attribute is ignored. This is true only for Safari on devices with small screens. On Mac OS X, Windows, and iPad, Safari plays video inline, embedded in the webpage." -

Which, I believe, means on the iPad, that the video plays at the resolution of the initial window (determined by the programmer), and does not naturally play on the YoutTube player, or at a higher res if you enlarge the video.

This seems to be the "problem" that we're encountering - that its a "feature" specific to Safari on the iPad. Why they do this, I dunno. In my case, the video plays at a higher res (and better) on my smaller iPhone than does on my iPad mini with Retna. Go figure.

I came upon this post, hoping to find the answer and a work around. If you get the Youtube app, and find the video through that, it will play at the highest resolution, but not through Safari. So far as I can tell.

Enjoy


Crash with error "No more room to grow table"

Seems it's a Google Chrome issue and the team is working on a fix.

Check this issue.


How to quickly delete multiple albums in Photos app (OS X)

Select View: Albums. Click the first album, than shift click the last album. Then right-click any of the selected albums and select Delete, to delete them all.


Is the increased weight of the ipad 4 worth the retina screen, in comparison to the ipad mini?

No. Unless you are showing clients pictures or using a remote desktop access to control a computer and do work, the mini is so much lighter than the retina iPad that it's not even fair to compare them in terms of ease of use.

Yes, you can tell the difference between something drawn with retina versus the mini screen - especially for foreign texts and line art, but in practice it doesn't matter much.

I have and use both and easily, my use slants 10 to 1 in favor of the lighter mini - especially for short bursts and casual reading and gaming. For several apps, I do increase the font size one notch from what I prefer on the retina display, but I don't find any critical failure in not having a retina display despite using the device heavily for work and pleasure.

At half the weight and almost all the power, the mini is the device to get except for some very specialized situations. You can also put the money you save into AppleCare plus or a wireless keyboard or just apps and have a better all around solution.


iTunes randomly freezes on startup on Windows 7

The following iTunes version seems to work (tested in Windows 7 x64): iTunes 12.1.1.4.


Finding the path of a folder inside another script bundle

Try this. The key issue is probably that you did not include the script bundle extension in r2, which makes savePath incorrect.
tell application "Finder"
    set recName to "audio_rec.m4a"
    set pathName to (container of (path to me)) as text
    --> "MacHD:Users:username:Desktop:"
end tell

set appName to "PlayPro.scptd"
set intPath to ":Contents:Resources:AudioFiles:"

set afPath to pathName & appName & intPath
--> "MacHD:Users:username:Desktop:PlayPro.scptd:Contents:Resources:AudioFiles:"

tell application "Finder" to open afPath
set savePathName to afPath & recName
--> MacHD:Users:username:Desktop:PlayPro.scptd:Contents:Resources:AudioFiles:audio_rec.m4a"

tell application "QuickTime Player"
    activate
    set doku to new audio recording
    start doku
    delay 4
    stop doku
    set untDoc to front document
    export untDoc in file savePathName using settings preset "Audio Only" with replacing
    close untDoc saving no
end tell

NB I didn't see any intent for requiring posix paths so I removed them. Unless you expect some other script to meddle with your quicktime player windows, you can simplify that reference. I'm assuming that the folder 'AudioFiles' exists already, and that the destination script bundle is in the same folder as this script.
As an aside, why an Excel file? It might be worth considering using csv, which would be easier to get the string from and probably make your process quicker overall as you don't have to deal with Excel just to acquire a few characters. Finally, on the matter of making a good question, it is helpful when the details include what happens. 'It didn't work' isn't helpful at all — you wouldn't have asked the question if it worked. For example, your problem here isn't with quicktime player — as you suggested, it's about referencing a folder correctly.


Script to Update/download most recent iTunes podcast WITHOUT opening iTunes at all?

Since the iTunes uses a encrypted database you (almost) won't be able to do it (without opening iTunes).


Asset Management, Zip Application with File previews?

BetterZip is fairly comprehensive & has a preview mode, which can be toggled from prefs as to whether it will uncompress or open to preview by default. It also has a Quick Look plugin, which remains free even after the trial period.

Zipster tries to go one better by integrating zip files into the system so you browse them just like folders & can add/remove files without appearing to do anything other than drop/remove a file in a folder.

Overall, BetterZip is the more comprehensive tool… but Zipster is free, vs 20 bucks for BetterZip.


Tried to reinstall osX and ended up getting folder with questionmark on boot

First things, power on with the space key pressed to eject the CD if needed.
Then power on with command+s held - if there is any OS X volume that's bootable, you can get some basic info
If not, reset the NVRAM - (Command Option P R) and hold until you hear the third boot chime.
After the third chime, hold option only and you should end up at a grey screen.

Take a picture of that and post a follow on question with more details / less broad open-ended. If you want to boot from the CD/DVD and wipe everything, ask that. If you can get to single user mode, then you might be able to patch things together.


Update Dock after defaults write without `killall` restart

Send the Dock process a signal called the 'hang-up' or HUP, also known as signal number 1 as defined somewhere in a system signals.h header file.  POSIX convention, I believe.

The quick and dirty:

sudo pkill -1 Dock

What a HUP signal should effectuate in the receiving process is an internal halt and re-evaluation, which usually includes a re-reading of any relevant config files.  The process will not terminate, only 'refresh' itself.

Hope this helps.

F.


How do i delete a group of files ending with specific characters?

Assuming there are many files that meet the specifications and may be in more then one location, I'd use the find command from Terminal, as shown in the following simple example:

$ find . -type f \( -iname '*_n.png' -o -iname '*_s.png' \)
./Pictures/foobar_n.png
./Pictures/Temp/barfoo_s.png
$

In the output of the find command above, we see it found the two sample files I created for testing. As I'm sure those are the files I want to delete I run the same command but with adding -delete to it, as shown below:

find . -type f \( -iname '*_n.png' -o -iname '*_s.png' \) -delete

If all the files are in the same directory or you just want to delete these files in a specific directory, use:

cd /path/to/directory
rm *_[ns].png

NOTE: Using find with the -delete option or rm immediately deletes the files found, they are not placed in the Trash and they are generally not recoverable!

So do not use this commands unless you're okay with the note above!

If you prefer to use a GUI method, there is a nice freeware app by DEVONtechnologies, LLC called EasyFind and is available in the App Store or the developers website.

EasyFind - Mac App Store Preview
EasyFind - Developers Website

As you can see in the image below, EasyFind found the sample files created for testing. Simply select the ones you want to delete and then click Delete on its Toolbar to place the selected items in the Trash.

The nice feature of EasyFind is , with its various setting and controls, it's capable of making some searches that are not possible to perform in Finder while providing the user with a GUI interface, and without having to use Terminal.

Note that I'm not affiliated with the developer of EasyFind, just a happy user of the product.


How can I transfer data from a G5 iMac to an i7 iMac?

Does the migration assistant work well across OS versions and CPU architectures?

Yes, this will work just fine. The best way to do it is to get a firewire cable to connect the two iMacs, boot the older iMac into Target Disk Mode, and let the installer on the new iMac perform the migration.

I believe that Rosetta isn't installed by default, but when you try to launch a Power PC app you will be prompted to install it.


Why don't accepted event invitations through MS Exchange show up in iCal?

Some time ago I wrote a script to fix the problem that Exchange had with incorrect time zone data. The script will import Exchange events into iCal. There are several post on my blog concerning the script and how it functions.

Go to my blog, Surgical Diversions, and search for iCal. You'll see at least 3 posts regarding the script.

This solution is for those without an Exchange account and/or who don't want to set one up. The simplest solution is to create an Exchange account within iCal.


The typical fix is to choose log out from the Apple menu when this happens.

This closes out your work more cleanly than trying to force quit apps. Also, it has the benefit of forcing the OS to name any apps that are not responding or have work to be saved.

Next, restart the os and possibly test making a new user account. Let us know how it goes...


What are the best mnemonics to remember important short cuts?

Spotlight:
I've heard it remembered as 'space command'. Like you're the commander of a futuristic spaceship and you're talking to the computer, asking it to look for something or open something. You're commanding the space ship.
Press command-space to access Space Command.


how do I upgrade my processor on my MacBook Air?

You don't. Mobile processors aren't necessarily made to be replaceable - often, they are soldered directly onto the logic board itself. Aside from the obvious voided warranty/extreme risk of damage to the board, you would need to either try the software for download to see if it'll actually run on your machine regardless of specs, or you will need to purchase a new laptop.


How to extract third party application data (mp3 files) from iPhone6 to Windows 10 computer

iFunbox or iTools is the program you need to backup iPhone data to computer. iFunbox provides an easy way to manipulate app data in sanbox. Both of them are free programs and easy to use.


Why do I have to restore the iTunes Library folder permissions every time I update iTunes?

You could try repairing permissions on the hard drive containing your iTunes Library folder.


How to save and exit "nano .bash_profile" in Terminal?

No, :w is a /usr/bin/vi command. Use the combination control+x to exit. You will be prompted to save the file if you have made unsaved changes.

Nano is intended to be a bit friendlier / simpler to new users than vi/vim or emacs which both cater to more power users that have spent time learning how to use them effectively.

To get started in nano - look for commands along the bottom of the window when nano is open. (^ stands for the control key)

^X      (F2)            Close the current file buffer / Exit from nano
^O      (F3)            Write the current file to disk


How to strip a filename of special characters?

If you have a specific set of characters that you want to keep, tr works very well.

For example

tr -cd 'A-Za-z0-9_-'

Will remove any characters not in the set of characters listed.  (The -d means delete, and the -c means the complement of the characters listed: in other words, any character not listed gets deleted.)


Macs and local DNSMasq - clients keep forgetting results given by local DNS

Yes - this has been a pain for a long time and many generations of networking hardware and software.

Personally, I've given up on running my own dns and now pick one of two items.

Use mDNS and host.local for resolution and let DHCP assign addresses from a pool.
Set DHCP reservations for each device I care to connect to and use http://xip.io to resolve that IP by name.

In your case, I use 192.168.1.3.xip.io in place of server.example.com where I need to put a FQDN in for resolving a server name. I've never had this be unstable, but if you do, there are other providers like http://nip.io do the same service.


When minimizing, not have new window of same app come to focus

Have you considered using CMD-H to hide the application instead of minimize it? If you minimize a window, the app that owns that window is still the focused app, but if you hide an application, it will change focus to the next app in the switcher.

I can't help with the second part of your question. I assign apps to spaces so they don't clutter my spaces (even though they do sometimes - I'm looking at you, Photoshop).


What is a quick way to duplicate a tab in Safari?

I have two alternatives:

Press Cmd+L (go the Location/Search field), then Cmd+Return.
Click the back button (<), then press Cmd while clicking the forward button (>).

Both of these will open a tab in the background. (Often, Cmd + click opens the click target's reference in a new tab.)

If you also press Shift while performing the second step of either of these alternatives, the tab will open in the foreground.


Lion Recovery Terminal will not allow me to run TestDisk?

Have you tried booting from a Linux LiveCD (well, instead of a CD, you'll need a USB thumb drive, but it's the same idea)? From there you could copy data to an external hard drive and just wipe the internal hard drive and reinstall.

If you have another Mac laying around with Thunderbolt, you can boot your Mac into Target Disk Mode (hold down T while booting), connect the Macs together with a Thunderbolt cable, and perform any disk recovery from there. (You might be able to go to an Apple Store and use one of their Thunderbolt Macs to recover your drive; they can be surprisingly permissive at times.)


I'll bet you have a font corruption problem.

Split the uninstalled fonts into two groups.
Import the first group.
Check to see if they imported successfully.

If yes, you know the problem is in the second group, so go to step #1.
If no, the second group might be okay, so try importing that.

And so on.

You should be able to narrow down the problem without having to import each font one at a time. But my guess is that one or more of your fonts is corrupted.


Headphones Jack not pluggable into Macbook-pro retina socket

When you insert the headphone into the socket, it makes connections internally against a number of poles which connect to the different rings on the jack end (left audio, right, mic, ground, data etc..).  These are essentially tiny spring loaded contacts which the jack must push aside when inserting, that then rely on sprung pressure to maintain a permanent connection to the ring on the jack.  Here are a couple of pictures, a diagram, and a photo or a replacement part that shows one of the poles:

These poles can jam, get stuck, fail etc etc.  Usually a vigorous insertion is enough to free them, but this is relying on the chamfered edge of the jack to transfer vertical motion into a horizontal movement of the pole.  You could use something slimmer than your jack, and insert (carefully, ensuring you don't insert it too far) before applying sideways pressure directly to the poles to try to get more energy into making them move.


Change default app for all files in a folder

This is not how it works.

A file type (i.e. PDF) is registered with the system through a process called “LaunchServices.”  It’s what associates a file with what opens it.  It can even have multiple entries to do things like “Open with Preview” and “Edit with TextEdit” for example.  It can’t, however, dynamically change based on a folder because folders aren’t registered with LaunchServices.

Looking at this pragmatically, how would the system know which folders to monitor for application associations of its contents?  Folders are created and deleted all the time - it wouldn’t be efficient to manage those relationships.


42 Spaces Open on Mission Control on starup (mavericks)

It may be a bit tedious, but try closing all of the spaces and then restart your machine.  OS X will keep the spaces you had open when you restart, so if you restart with none it should start with none.


How do I move the cursor past the end of the line in Insert mode when using vi-style line editing on bash?

It turns out the solution is simple: update bash to 4.3. The default bash on Macs (even Yosemite) is 3.2. (My question above says I did update and it didn't work, but I think it took a while for it to "take.")

Install Homebrew with

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

then do

brew install bash

then change your default shell path (in Terminal Preferences) to

/usr/local/bin/bash

and that's it. Check your bash version with

bash --version

and as an added bonus, you can get mode indicators!

bind 'set show-mode-in-prompt on'

and it will show a + for Insert mode and : for Command mode.


Turns out the xpath=( xcode-select --print-path ) line in the if statement of the original function was the problem.  Additionally, once I got the error message suppressed, I noticed there was an unnecessary stdout message, so I decided to suppress that as well.

I was able to suppress the stderror and stdout messages by changing the function to the following:

function check_clt() {
    if type xcode-select >/dev/null 2>&1 >&- && xcode-select -p >/dev/null 2>&1 && test -d $(xcode-select -p) >/dev/null 2>&1 && test -x $(xcode-select -p) >/dev/null 2>&1; then
        echo ""
        echo "The required Xcode command-line-tools are already installed! Moving on!"
        sleep 3
    else
        instructions
        sleep 45
        xcode-select --install
    fi
}


Outlook - Keyboard shortcut for searching across all folders

Perhaps if you could clarify your request a bit.

Outlook for the Mac has several keyboard shortcuts for find here:

EDIT --> FIND --> (etc)

That all open a text input field for finding things. In fact COMMAND-OPTION-F brings up the search tab with the focus on the find field where you can type your query in.

Since this is so easy to find I can only conclude that you are looking for something more than that?

BTW, I just remembered that Outlook uses Spotlight to do it's searches, so you could do your search there and add criteria to the searches you need and save the searches as smart folders.


How can someone coming from Windows learn Mac OS X file system and Finder?

In windows you got:

Desktop, and
My Documents

On OS X:

You got $HOME folder ( represented as ~ which also comes from OSX's unix heritage) . Here is the usual and expected place for user files. Your Documents, Music, Downloads as well as the Desktop folders all live in your home folder.

So, everything, what is YOURS put into $HOME folder somewhere. Make your own hierarchy if the default one is unpleasant or unuseful.

Music, Movies, Pictures are - as in windows
Public - your own Shared folder
Documents - for your documents
of course, you can make any number of sub-folders in your HOME.

Applications belong in /Applications or ~/Applications folder. You can put them in the another place too and OSX will find and run applications no matter where they are stored. You can make hierarchy here too, as I told once in my older post.

One more thing - Fonts, you can put fonts into $HOME/Library/Fonts, or into /Library/Fonts (for all users)

For the start, this is enough. Don't touch other folders yet (you don't need). If something needs to be used by multiple users on the same Mac, generally store it in /Users/Shared or change the permissions in the alternate place you store them.

for the common unix standard: http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard


The path shown in the crash log is within Xcode, specifically the iPhoneOS.platform iOS.simruntime. This Spotlight is the one running in the simulator, not the one in macOS. This is not a ‘real’ issue and can safely be ignored unless you’re testing Spotlight functionality within the app you’re running in the simulator.
This is a commonly reported issue, especially since Xcode 12. Solutions posted elsewhere that may or may not work include

Disabling Allow Spotlight Suggestions in Look Up on the simulator Settings app
Adding CoreSimulator to Spotlight privacy

To make crash reports show as a notification first to avoid interrupting your work, set the following preference:
defaults write com.apple.CrashReporter DialogType UseUNC 1


How to Remove a Sound Output Device Created by an Application

Posting here for  reference if you still have the problem and for other searching the answer was found at the Apple Community Site

Remove the following files:

/Library/Audio/Plug-Ins/HAL/Audiojingle.driver
/Library/LaunchDaemons/com.audiojinglex.soundtree.agent.plist
/Library/LaunchAgents/com.audiojinglex.soundtree.agent.plist

Then restart coreaudiod using terminal sudo /bin/launchctl kill SIGTERM system/com.apple.audio.coreaudiod || /usr/bin/killall coreaudiod

or use the following script it does the same thing (I personally did it manually)

#!/bin/bash

# remove driver
DRIVER_NAME="Audiojingle.driver"
DRIVER_INSTALL_PATH="/Library/Audio/Plug-Ins/HAL/${DRIVER_NAME}"
if [  -d "${DRIVER_INSTALL_PATH}" ]; then
    /bin/rm -rf "${DRIVER_INSTALL_PATH}" || exit 1
fi

# remove helper plist

LAUNCHD_PLIST_INSTALL_PATH="/Library/LaunchDaemons"
LAUNCHD_PLIST_INSTALL_PATH_BACKUP="/Library/LaunchAgents"
LAUNCHD_PLIST_FILENAME="com.audiojinglex.soundtree.agent.plist"
LAUNCHD_PLIST="${LAUNCHD_PLIST_INSTALL_PATH}/${LAUNCHD_PLIST_FILENAME}"
LAUNCHD_PLIST_BACKUP="${LAUNCHD_PLIST_INSTALL_PATH_BACKUP}/${LAUNCHD_PLIST_FILENAME}"

# romove the plist.
if [ -e "${LAUNCHD_PLIST}" ]; then
    /bin/rm -f "${LAUNCHD_PLIST}"
fi

if [ -e "${LAUNCHD_PLIST_BACKUP}" ]; then
    /bin/rm -f "${LAUNCHD_PLIST_BACKUP}"
fi

#/usr/bin/killall -u "_coreaudiod" "coreaudiod"
/bin/launchctl kill SIGTERM system/com.apple.audio.coreaudiod || /usr/bin/killall coreaudiod

echo "restart coreaudio"

sleep 2


Move application to another desktop directly

On desktop 1, open the Mission Control (four fingers, swipe up), you will see desktop spaces on top of the screen.  Move the application to desktop 2.

Or, on desktop 1, drag the application, move it to the right edge of the screen, wait two second, the desktop will be switch to desktop 2, and your application will be there.


When you delete something in iPhoto it goes to iPhoto's trash. Then from there it goes to the OS X trash. So you need to empty both of those trashes to reclaim the drive space.

Also, I use DaisyDisk to see where I have the most space being taken up. They have a free trial, but you will find it invaluable for freeing up drive space.

Something I use to move videos from iPhoto to external storage is the iPhoto Manager. It will copy the actual event from iPhoto do a different iPhoto library. In my case I have different libraries on different external drives. So I sync everything to the library on my internal drive. From there I can edit, share, etc. Then later I hook up the external drives and copy the events to the correct drives, then delete them from the internal library.


How to remove duplicate icons from Launchpad?

This helped me. Try to move the Xcode App to Trash and put it back.

https://stackoverflow.com/questions/12519772/two-xcode-app-icons-in-launchpad-after-4-5-install


How can I disable the red Software Update notification bubble on the System Preferences app in MacOS Mojave (not App Store)?

After some unsuccessful googling, followed by loads and loads of digging and grepping through binary files, I stumbled upon a key in a .plist which, when written, appeared to make the system temporarily forget it had any updates to bother me with. Running:
defaults write com.apple.systempreferences AttentionPrefBundleIDs 0

fixed my issue for now on 10.14.1. (Apparently, you may also have to restart the dock with killall Dock, but I don't remember having to do so).
If you have automatic checking for updates turned on, this might not work for you. Not for long, anyway. In my case, on a fresh install, I went to the settings page to turn off checking for updates, at which time it checked for an update before I could close the page. After running that command it went away again, though. Basically, turn off automatic update checks, or it'll come right back and you'll have to run the command again.
Re-running the update checker should undo this. One might be able to find that .plist (I believe it was in /Users/[username]/Library/Preferences/com.apple.systempreferences.plist) and set the immutable bit on it/give it read only permissions to prevent it getting modified, but I have no idea what the fallout from that could be. You'd probably not be able to change any other per-user settings anymore.


Apple Mail - my sent email marked as spam in client's inbox

It seems that the problem was with my SMTP settings. I had to authorise my IP address in my website control panel, and in apple mail I had to turn OFF 'automatically manage connection settings', so that I could select the port, SSL, and authentication recommended from my web host.


Getting list of Apps instaleld on my iPad from iTunes

I assume you mean from the App tab for your iPad within iTunes desktop app, that allows you to select which apps to sync, and re-order your home screens in.

If this is the case, then no.  To start with, the sort options are only for Name/Kind/Category/Date/Size, so there is no way to separate between installed and not installed.  Even if there is, there is no way to cut that information in any way.

Third party tools like Phoneview and such may be able to provide a directory listing of installed apps which you can then manipulate to use on your website, but I don't use any so I will just throw it out in case it jogs anyone else's memory.

The only simple way to share, is to either take screen grabs of the iTunes windows to just screenshot (hold HOME and tap POWER) your whole iPad.  Or type them up...


How do I update my jailbroken Apple TV to 5.3?

If you are doing over the air(thru apple tv) update, you may have installed a hack that disables automatic updates so you won't lose the jailbreak.
Connect to your computer and do a DFU update or uninstall the hack that disables the update from within apple tv/nito or where ever it's installed and try updating again. Although I recommend DFU upgrade.


Apple Mail's "Remove Attachments" not removing attachments from hard drive

I stumbled onto a solution after several hours. Hopefully this can help others.

Background

I wanted to remove attachments larger than 1MB from emails older than 5 years. I made a smart mailbox with criteria for "has attachments" and "date recieved not in the past 5 years". I did a "select all" on the ~25k results and chose "Message > Remove Attachments" from the menu bar. Mail chugged away for half an hour, and afterwards the attachments were removed from the email messages, but the "Library/Mail" folder hadn't changed in size. Drilling into the "Library/Mail" folder structure in the Finder, I confirmed that the files were still there.

The missing step

I have my email sorted in folders in the Mail sidebar:

On my mac
     Project 1
     Project 2
     Etc

In order for the removed attachments to actually be deleted from the file system, I had to click on each folder in Mail's sidebar. Something about opening the folder in Mail seemed to cause that folder's messages' removed attachments to be deleted from the file system.

**Important to mention that this was using a POP email account, and the messages were long ago deleted from the server, so there wasn't an issue of Mail re-downoading the attachments from the server.


What's going wrong with context menu's Save Attachment in Apple email

OS X 10.10.3, email 8.2 seem to have fixed the problem. If I go to the header of an email having attachments, I'm offered an iconized menu that allows me to save attachments to the folder of my choice. That seems to work.


How do I disable message sending using the return key on Ipad or Iphone? While using a bluetooth keyboard

By experience, latest macOS (11.1) and iPadOS (14.4) versions let you get a new line by pressing the Shift ⇧ + Enter ⏎
In older versions of iPadOS it would be pressing Option ⌥ + Enter ⏎ (same as for macOS)


How to change apple ID while it has been disabled for security reasons

According to this Apple KB article, it may be a case of entering the password incorrectly too many times, in which case you can try resetting the password at Apple's iForgot site.

Another option, if you don't have any purchases linked to that Apple ID, is creating a new one using a different email address. You just have to sign out of the current Apple ID (if that's even necessary) and sign up for a new one. All of that is done from within Settings -> iTunes & App Store, although the sign up process might be easier to do on a computer with a real keyboard, from within iTunes (Store menu -> Create Apple ID...)


Installing VirtualBox guest additions on v4.3.28 (IE no Devices menu tab)?

You'll only get that menu once you start the Virtual Machine, which launches in a separate application in the Dock. That Virtual Machine application has a devices menu, or you can right click on the CD icon in the status bar.


Front camera on an iPhone 4S no longer works

Thanks to @IanC to find the duplicate, so before we close this here is the answer.

https://apple.stackexchange.com/a/61350/46541

  This is a hardware problem. This comes up when the ribbon connector
  from the camera to the main circuit board comes loose or gets
  disconnected altogether. If you have the right tools and enough DIY
  skills to open up your iPhone, it's a very simple fix that should be
  fairly obvious to see. Otherwise, the Apple Store should be able to
  repair it for you (I would think free of charge, but who knows).

  If you do want to take apart your iPhone and attempt the repair
  yourself, PowerBook Medic has some really nice instructions for taking
  apart all versions of iPhones from 3GS and above. They also sell
  replacement parts and will repair it for you as well if you want.
  (Disclaimer: I have no affiliation nor prior experience with this
  company, so use at your own risk.)


How to change mail server for an IMAP account in OSX 10.11 when mail server greyed out?

I found the answer after some searching via HERE

Select the Advanced Tab, uncheck the box to “Automatically detect and maintain account settings”, save change.
Go back into Preferences > Accounts, update the Incoming Mail Server to: mail.comporium.net


How can I get iTunes not to consider "Various Artists" an artist in the artist view?

I only really see two options here.

1) Get rid of the Album Artists field altogether, select all tracks and Get Info. Set the Album Artist field to blank, meaning song are grouped solely by their Artist and not Album Artists. The songs in the various artists albums will still be linked by the album name if you just want that album.

2) Create a smart playlist with the filter being Artist is (or contains) "The Monkees". This will, of course, filter all Monkees songs into the playlist regardless of the Album Artist.

Beyond this, there doesn't seem to be much room for configuring various artist albums better.


Any way to set/add tags on a file with Applescript under Mavericks?

You can use xattr. This copies the tags from file1 to file2:

xattr -wx com.apple.metadata:_kMDItemUserTags "$(xattr -px com.apple.metadata:_kMDItemUserTags file1)" file2
xattr -wx com.apple.FinderInfo "$(xattr -px com.apple.FinderInfo file1)" file2

The tags are stored in a property list as a single array of strings:

$ xattr -p com.apple.metadata:_kMDItemUserTags file3|xxd -r -p|plutil -convert xml1 - -o -
<?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">
<array>
    <string>Red
6</string>
    <string>aa</string>
    <string>Orange
7</string>
    <string>Yellow
5</string>
    <string>Green
2</string>
    <string>Blue
4</string>
    <string>Purple
3</string>
    <string>Gray
1</string>
</array>
</plist>

The tags for colors have values like Red\n6 (where \n is a linefeed).

If the kColor flag in com.apple.FinderInfo is unset, Finder doesn't show the circles for colors next to files. If the kColor flag is set to orange and the file has the red tag, Finder shows both red and orange circles. You can set the kColor flag with AppleScript:

do shell script "xattr -w com.apple.metadata:_kMDItemUserTags '(\"Red\\n6\",\"new tag\")' ~/desktop/file4"
tell application "Finder" to set label index of file "file4" of desktop to item 1 of {2, 1, 3, 6, 4, 5, 7}

'("Red\n6","new tag")' is old-style plist syntax for this:

<?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">
<array>
    <string>Red
6</string>
    <string>new tag</string>
</array>
</plist>

xattr -p com.apple.FinderInfo file|head -n1|cut -c28-29 prints the value of the bits used for the kColor flag. Red is C, orange is E, yellow is A, green is 4, blue is 8, magenta is 6, and gray is 2. (The flag that would add 1 to the values is not used in OS X.)


Apple AirPods pair and connect but no sound

If you did a hard reset and they don't work with either your iPhone or your laptop (multiple devices) it's safe to say that they died.
They're under a month old so I would return them for refund/replacement immediately.  Products fail - it happens.  You're just lucky enough that it happened during the "return to retailer" period (usually 30 days) and not when the warranty runs out 48 weeks from now.


Can I connect three monitors and provide power to my MacBook Pro with a single cable?

Official Apple specs

Officially your MBP supports two external displays at up to a maximum resolution of 4,096 x 2,304 pixels at 60 Hz at millions of colours or a single external display at a maximum resolution of up to 5,120 x 2,880 at 60 Hz at over a billion colours.

So, running the two external displays along with your built-in display is officially supported.

Unofficial real-life scenarios

However, unofficially you can exceed this. More specifically I've seen a user connect three external displays while in clamshell mode. However, this did seem to result in the MBP's fans spinning at a higher rate when they were watching videos, playing games, etc. Not something I would really recommend.

Your setup

So, I wouldn't recommend three external displays. But, as for your setup, you say that you only have one free USB Type-C port. So for you to do what you want may require you using your ports differently so that you have at least two displays connected directly, and another different display connected via an adapter and your other devices connected via a dock or hub.


No. In fact, Apple is removing the web server functionality from server app entirely in the very near future and documenting how you would migrate your data to apache to serve web pages.

http://krypted.com/mac-os-x-server/apple-releases-service-migration-guide-macos-server/
https://developer.apple.com/support/macos-server/macOS-Server-Service-Migration-Guide.pdf

The PDF above has pages 22 to 32 dedicated to how you would migrate any data to an open-source web server. If you like apache, the homebrew tool might be a good one to use for managing that install and patching and service state (stop / start / restart the web server on command or boot).

From there, you'd be on your own (or need to ask a flown question - possibly on another site about how to enable the SSI you want on the version of the web server you have chosen).


How do you switch dictionaries used for the "Tap with three fingers" lookup?

You select the dictionary in Dictionary.app > Preferences.

For info about adding dictionaries, see

http://m10lmac.blogspot.com/2011/12/more-dictionaries-for-dictionaryapp.html


Submitting Swift 2 apps before the release XCode 7 ?

Swift 2 is supported only from xCode7, and xCode7 doesn't allow to ship apps to iTunes Connect so, actually, is impossible to submit app in Swift 2.


Limiting network access for individual applications, on a per-WIFI-SSID basis?

Use ipfw to bind a rule to your specific interface, blocking the site in question outright. For example, if CrashPlan's IP is 224.2.2.4, the rule would write as follows:

ipfw deny ip from 224.2.2.4 to me in via en0

The "ip" tag blocks all traffic (tcp and udp, alternatively, you can set either or if you like). The IP address can be set to a range for more efficacy (e.g., 224.2.2.0/24). The "me" tag is self-explanatory. Alternatively, you can actually set that up to a specific IP address too. So if your home network assigns you 172.16.1.4 and tethering assigns you 168.128.1.5, then you can further ensure you only block the site when tethered, and not all the time. The "in" tag deals with direction of the traffic (in or out). And "via en0" deals with binding it to a specific interface.

You can also set ipfw to launch during boot, so you don't have to run this manually all the time. It's not a trivial process but does require some cli. Alternatively, you could check out WaterRoof. It's a free ipfw front-end that pretty much automates the entire thing. A terrific ipfw primer and setup assistant.


Wrong line-drawing characters when write "tree" command output to file

Use either of these to get compatible characters.

tree --charset=ascii > a.txt
tree --charset unicode > a.txt

https://unix.stackexchange.com/questions/127063/tree-command-output-with-pure-7-bit-ascii-output


Install a clean Mavericks and then use TimeMachine makes it unclean again?

It depends on your definition of 'dirty' — indeed, restoring from Time Machine will restore many preferences, but won't restore any system files, as they will come from your fresh OS X install.

If you want the cleanest possible OS, manually copying the files you need will be the best option — even though it's time consuming, you'll only get what you need.

The OS itself will remain 'clean' if you restore from Time Machine since the files will be kept from the OS X install and won't be restored from Time Machine.


First - yes, the OS in general will use RAM before swap. There's no loss of computational power involved in that.

You seem to have jumped to the conclusion that macOS is using swap, when it could as well be using free memory based on the htop screenshot. You cannot make that conclusion from a simple sample of the memory usage.

In reality, you could have been running programs that were using a lot of RAM forcing macOS to swap memory to disk. Then you quit some of those programs (or they deallocated a chunk of RAM). Then if you take a htop sample now, you'll see that RAM usage is low (lots of free RAM), but you're also using lots of swap.

But that is not a problem - in fact it is intended to be this way!
It wouldn't be wise for macOS to start swapping in those pages that have been placed on disk. It will do this when they're required (i.e. used by programs), but until that happens, it could be that those pages would never be used - and thus time spent swapping them in will be lost.

You write that in comparison to your Ubuntu PC you observe a different behaviour. You should know that you can actually change that behaviour. On Linux you can use sysctl to set the vm.swappiness variable. It will change how aggressive the OS is in swapping things out to disk.

You also ask why your macOS system does not use fixed size swap as Ubuntu does. In fact, Ubuntu also supports dynamic sized swap using the "swapspace" command. You can set minimum and maximum sizes, and it will dynamically add/remove swap space as needs change.


Time machine migration has been preparing for 14 hours, is this normal?

It seems like it's because our time capsule is incredibly slow just generall, it takes 20 seconds - 1 minute to open a folder, "preparing" to copy a reasonable folder can take 10's of minutes. This is independently of me being plugged in directly to the time capsule or going over wireless.

There doesn't seem to be a solution except possibly to do a factory reset, but first I'm going to get a 2TB disk and use the airport disk archiving function to save what I have.

I've found a few threads where people similar issues, like this one:

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


How does iOS know if a web site is restricted?

Settings → Restrictions → Websites and select your preferred option for Allowed Websites.