MacBook Pro going to sleep by itself because of watchdog daemon

Here is the readout from your logs.

Your BTLE (Bluetooth low energy) is shutting down (normal ?)

The watchdogd is shutting down the corresponding processes, but is is not meant to shut down your system.

The SystemWillSleep is for the coreaudiod, due to the airplay shutting down, it does not mean the OS X shutting down.

All of the above is happening because the OS X received the sleep command (they happen after the command was issued).

The OS X will sleep if you have something like kernel[0]: sleep

and more info can be found

kernel[0]: Previous Sleep Cause: 5

New logs show:

Your system did enter the sleep mode.

It was woken up by the RTC Alarm. Check your Energy Saver settings-

It was woken up by the WOMP since it is enabled (Wake On Magic Packet) a network.

To see all wake up reasons use syslog |grep -i "Wake reason" in your Terminal.

So far your system is not acting strange, just doing what you asked it to do. The "restarts" you are referring to are the wakes ups from sleep mode. There is no log entry showing that the system has restarted.

If it did the restart then you would see for example:

shutdown[15811]: SHUTDOWN_TIME: 1424885403 656386

bootlog[0]: BOOT_TIME 1424885410 0


Catalina introduces a new file system layout. Where Mojave and earlier had one filesystem that combines the system and user data, Catalina has a read-only system volume and a read-write user volume interleaved on a folder by folder basis using firmlinks.
The easy way to move forward is just save your additional files to /usr/local and other traditional places where Apple expects user modifications to their default system to be saved.

Check out What's New in Apple File Systems from #WWDC19
PDF summary of the above video presentation

Some of the implementation is quite normal for Unix/Linux like sparse files not being allocated and copy on write and cloning of an entire file system / snapshots. Other items like Firmlinks that act as “wormholes” between two containers / filesystems to present an unified file tree, System Integrity Protection and APFS specific features are quite new still to everyone.
You can see this better with df or diskutil apfs list command line tools than the Disk Utility view.


Share wifi connection from macbook to airport express

Go to System Preferences -> Sharing.
Enable Internet Sharing.
Set Share your connection from to Wi-Fi
set the To Computers using to  Ethernet.
Connect the ethernet cable from Macbook to your airport's Ethernet WAN port (Dotted circle).
That's it.


What is the relationship between `launchctl limit` and `ulimit`?

In the shell, ulimit provides "control over the resources available to the shell and to processes started by it" (see man bash). Therefore, it applies only to the shell and its children. The limits for launchd are related to it and the processes that it manages. The two are separate.

Individual programs can set their own resource limits by calling the Standard C Library routines ulimit() or getrlimit() and setrlimit(). Certain resource limits cannot be elevated unless the process is running as the super-user.

As a practical example, I debug large software projects and the shell's default limit for the number of open files isn't big enough. In my .bashrc file, I have the following:

# Increase the upper limit on the number of open files:
ulimit -n 1024

Now my debugger won't complain that it can't open all the files it needs. Obviously, this should have no impact on launchd.


Catalina import iTunes Library.xml from Music app

Take a look at ~/Music/Previous iTunes Libraries/. There are old copies of your .itl file stored there.

See: https://support.apple.com/en-gb/HT203225


Generate Safari Developer Certificate for building extensions

Apple unified all the developer programs (iOS, Mac and Safari) under one umbrella program entitled Apple Developer Program. This is what you need to enrol with to obtain a certificate for Safari extensions.


Can I clone an ESD.dmg file to an external disk without having admin password?

You can just set a new admin password and then you're able to enter the password for cloning the ESD.dmg file (which you'll then perhaps not even need at all).

You can set a new password by doing the following:

1) Power on the Mac while holding down the Cmd key and the S key

2) When the Mac has booted into single-user mode, type the following commands:

mount -uw /
launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist
passwd roger

You need to replace "roger" with the actual account name for your admin user.

When you're done, restart the system by typing this command:

reboot

Now you should be able to login with the newly entered password.

For others: If you're running a newer version of macOS (10.8+) you can do the same in a much simpler way by holding down the Command and R keys while booting up to start in Recovery mode. From there open Terminal from the Utilities menu. Enter the command resetpassword and you'll be guided through the rest of the process.


Changes in terminal are not displayed in finder and other programs

When these weird things happen I noticed that I was logged in as another user: in my terminal user name was different. The way I solved is by executing exit and opening new tab.

Thanks


iBooks - The file X couldn't be saved in the folder Y

2 ideas...

1) Try using a symlink rather than an alias - http://www.macupdate.com/app/mac/10433/symboliclinker is a freeware contextual menu plugin that saves you having to learn how to do it in Terminal.

2) Disable iTunes Prefs > Advanced > Keep iTunes Media folder organised.


This video shows how to replace the rubber ring using the end of a water balloon: http://www.youtube.com/watch?v=L5CMVrpKxrE


Do I need NVRAM/SMC reset to restore a used MacBook Air to defaults?

Erasing a hard drive with Recovery HD (or better - a flash drive) will remove everything. You don't need to do a NVRAM/SMC reset (you can if you'd like)


iPhone 5S storage filled with "Documents and Data"

Short answer:
Restore to Factory Defaults
Long answer:
I had essentially this situation 3 weeks ago, although my capacity was "consumed" by Other.

iPhone 5S 32GB
iOS 9.3.2 (later updated to 9.3.3)
synced with iTunes 12.4.1.6
on Mac mini OS X 10.11.5

The iPhone Settings > General > About > Available showed 0.25GB.
When syncing with iTunes, it showed unstable capacity numbers on each sync -- occasionally over-capacity with Other consuming 4.6GB, but settled down to 5.5GB available.  The 5GB discrepancy was concerning.
I tried:

rebooting => nothing
hard reset (Lock + Home, past Apple logo, to plug-in-to-iTunes image) & update (re-install iOS) => freed 60MB
iOS update to 9.3.3 => nothing

The final option was what prior searching had said all along -- Restore to Factory Defaults.
I just followed Apple's procedure and it freed 9.5GB!
(Not sure where it came from, but I'm glad to have it back...  and disappointed that it was missing in the first place...)

Make sure your backup is current and you know the password, if encrypted.
Disable Find My iPhone.
Restore to factory (10-15min).
Went through the basic setup tweaks (it defaults to 6 digit passcode, now).
Restore backup (I enabled encrypted backups long ago and it took 4 tries to get the right password... oops!) (15min).
Authorize (iCloud?) from another device (my iPad).
Restore iCloud (It asked for iCloud security code or another authorized device.  I used the security code, which generated an iCloud Keychain verification code that was sent to the iPhone, which was in the middle of setting it up, so it showed momentarily and moved on.  Fortunately, it was mirrored to the Mac mini.  Then I never had to enter it...  perhaps a race condition with the previous step?)
Strangely, a few apps appeared to be installed, but a big sync with iTunes put everything where I expected it to be.
Finally, iTunes said 10.1GB free & iPhone said 9.9GB free.  Not too bad.  So, yay?

Good luck.


How to prompt Safari to save website's username and password to keychain?

Check in the preferences if you denied saving passwords in the past for the website. Go to Safari Preferences (CMD + ,), passwords tab. Unlock it and sort the list by passwords column. If the site shows "Never Saved", site will not prompt for saving credentials. One can also search for the site using the search bar in this password window.

Otherwise, manually adding the credentials is the way to go. In the same place, use add button and fill in the site URL and the password. Even then, some sites may not support autofill partially or even fully. It's upto the web developer. See if this site works that way or not after manual addition.

  Safari may be unable to tell which fields are for username and password, credit card number and expiry date, and so forth.

https://support.apple.com/en-in/guide/safari/ibrw1100/12.0/mac/10.14


How can I find the macOS version codename?

The version number is the correct thing to report when you have issues. You should also include the subversion.
The marketing names are from macOS - Wikipedia article, up to and including macOS Catalina.
╔════════════════════════════╦════════════════════╗
║          Version           ║      Codename      ║
╠════════════════════════════╬════════════════════╣
║ Rhapsody Developer Release ║ Grail1Z4 / Titan1U ║
║ Mac OS X Server 1.0        ║ Hera               ║
║ Mac OS X Developer Preview ║                    ║
║ Public Beta                ║ Kodiak             ║
║ Mac OS X 10.0              ║ Cheetah            ║
║ Mac OS X 10.1              ║ Puma               ║
║ Mac OS X 10.2              ║ Jaguar             ║
║ Mac OS X 10.3              ║ Panther            ║
║ Mac OS X 10.4              ║ Tiger              ║
║ Mac OS X 10.5              ║ Leopard            ║
║ Mac OS X 10.6              ║ Snow Leopard       ║
║ Mac OS X 10.7              ║ Lion               ║
║ OS X 10.8                  ║ Mountain Lion      ║
║ OS X 10.9                  ║ Mavericks          ║
║ OS X 10.10                 ║ Yosemite           ║
║ OS X 10.11                 ║ El Capitan         ║
║ macOS 10.12                ║ Sierra             ║
║ macOS 10.13                ║ High Sierra        ║
║ macOS 10.14                ║ Mojave             ║
║ macOS 10.15                ║ Catalina           ║
║ macOS 11.0                 ║ Big Sur            ║
╚════════════════════════════╩════════════════════╝


How come the Podcast app is hogging so much GPU?

Not an answer, but I was looking for an answer to the same question when I found switching workspaces away from the one with podcasts up dropped GPU utilization. So even with a podcast still playing, GPU usage goes back to ~0 if you aren't looking at the actual app. So it might be the app visualization is the real culprit. Hope this helps!


macOS Sierra Archive Utility compress popping up new windows

After some experimenting, I finally found a solution of sorts.

Before I get to it, just a word on the Archive Utility preferences. As far as I can tell, the preferences on the lower half of the window no longer have any effect on the Finder's archive creation process. It may have in the past, but the Finder no longer uses Archive Utility for archive creation, only for expansion. For the record, Archive Utility is located at /System/Library/CoreServices/Applications/Archive Utility.app.

The problem arises from the Finder's desire to reveal the archive it's just created. If you are in column view and are viewing the contents of a folder, and want to compress that folder and do so like in the image below, the Finder may open a new window to reveal the archive because it doesn't want to lose your folder selection in the current window.:

If instead in column view, you select a file (it must be a file) in the same column as the folder, and then right-click on the folder you want to compress, like in the image below, the Finder won't open a new window (it will change your current file selection to the newly created file).

So far, that's the closest I've come to any kind of "solution".


New Snow Leopard ... "Select All" won't Trash

Likely there's an item in your 'select all' that cannot be trashed; a .dmg in use or a mounted disk (your hard drive, a CD-ROM, a flash drive), for example.
That'll prevent anything in your selection from going into trash.


How can I change the background and text colour for messages in Mail.app

Yup. Go to preferences -> Fonts & Colors -> click "Select" on "Message font" -> do your thing. :)


When finished, it puts them in the Applications folder.

OS installers are all called "Install OS X [OS Name]" which might not be what you expected, if you're looking alphabetically for instance for El Capitan.

Prior to completion they are squirrelled away deep inside /private/var/folders & not easy at all to find.


Create a text encoding conversion service in Automator

Change:

for f in "$@"
do
    iconv -f gb18030 -t utf-8 f > f.new
done

To:

for f in "$@"; do
    if [[ ! $(basename "$f") =~ .*\..* ]]; then
        iconv -f gb18030 -t utf-8 < "$f" > "${f}-new"
    else
        iconv -f gb18030 -t utf-8 < "$f" > "${f%.*}-new.${f##*.}"
    fi
done

And set Pass input: to as arguments on the Run Shell Script action.

To address the comment made by Gordon Davisson to handle a filename with no extension, I've modified the code in my answer above.

The code tests the filename portion of the fully qualified pathname passed to the Run Sell Script action using a regex to see if it has an extension, or more literally a . as part of the filename, and if there is no . in the filename it process the if branch, otherwise it processes the else branch.

Also note that using a glob instead of a regex, e.g.:

if [[ ! $(base name "$f") == *.* ]]; then

Would also work to test for an extension. Either way the new fully qualified pathname will appropriately follow one of these two examples:

/path/to/filename becomes: /path/to/filename-new
/path/to/filename.ext becomes: /path/to/filename-new.ext

Note: This answer assumes fully qualified pathnames do not contain null characters and or carriage returns and or linefeeds. IMO Proper pathnames do not contains such characters and I will not test for them.


Create macOS High Sierra and newer bootable recovery partition on a separate standalone disk

What you suggest is no longer possible with Big Sur. When booting to Recovery, you are required to enter a password of an existing account. AFAIK, these passwords are not stored in the Recovery volume. This would make it impossible to boot from a standalone Recovery disk.
Before Big Sur, there is no reason the an AFPS Recovery volume could not be placed on a standalone disk. However, getting the firmware to boot Recovery from such an arrangement might require a third party boot manager such as rEFInd. I an unaware of any manual which would explain how to do this. On the other hand, I can not imagine a reason one would want to do what you are proposing.


Two SSDs in a Macbook Pro with OSX on one and Windows 7 on the other

If you use a conversion kit to fit the second SSD into the optical drive bay there is no reason why this shouldn't work. Personally I equipped my MBP late 2009 with a HD and a SSD (which ran dual boot some time ago) using Optibay Conversion Kit, but there might be cheaper ones on eBay.


you can use certain apps to do this, things like google voice will provide you a virtual phone number which can do voice and sms.  as long as you have wifi, they do a decent job.

there's also a log of voip or messenger programs that do voice, but that's not so transparently behaving like phone number.


Disk Utility "restore from" list does not include any volumes

I tried the route of making a disk image and restoring from that.  I got an error message saying that an APFS volume can only be restored from an APFS volume.  So apparently I must find another way to copy all the data.


Safari searches instead of connecting to localhost

I solved it.
It was related to the "Startpage" extension. Startpage is a search engine that is supposed to be private. However, it searches from the address bar, and I guess it does not recognize localhost.


Can you connect iPhone/iPad to Apple TV without WiFi network in place

You cannot connect directly to the Apple TV, so you will have to bring a router.


What does "leverages the Apple Watch menu" mean when refusing my App

Could it mean possibly that your app icon somehow detracts from the design of the home screen or somehow doesn't fit into their design guidelines? That's a I could think of, but I've never heard it stated with that terminology.


Are these temperatures on non-retina Macbook Pro 13 Mid-2012 normal when browsing?

Yes - everything looks normal. Battery and charger are good. HDD and GPU are fine. CPU and cores running cool.

T-JUNCTION of the processor is 105 °C for the i5 (Intel® Core™ i5-3210M Processor) and the i7 (Intel® Core™ i7-3520M Processor ). The Junction Temperature is the maximum temperature allowed at the processor die.

The temperature shown in your screenshot is ~30 degrees Celsius lower than the max. allowed. So I would expect it to be still completely normal.

Surfing with a Intel® Core™ i7-2720QM Processor (T-JUNCTION 100 °C) in a MacBook Pro with a CPU-load of 15% and an environmental temperature of ~10 °C I get an average of about 60 °C.


My old voice memos don't sync via iTunes

Voice memo's didn't sync like music with older versions of iTunes. With any current version of iTunes it should sync properly.

I doubt that this question is still active, but for future problems I've added an answer.


The answer can go both ways. The "metal" part, which you use to connect the iPhone with can get damaged if you use it without the plastic adapter piece.
However, I've been using myself that same construction over 6 months now and everything is still fine.

My answer: If you dare to risk it, just try it :) But don't look sad if the metal bends.


How do you send a photo from your photo files? The enter key does not act as a submit key

There are a number of ways you can send a photo from the Photos app on your iPad.

To send photos, you can:

Launch the Photos app
Tap on the photo you want to send (or, in the case of multiple photos, tap on the Select option and select the photos you want to send)
Tap on the share icon (see image below)

Now select how you want to send it (e.g. via Message, Mail, etc)

You can also send photos directly from within apps. By way of example, you can compose a new email message and tapping on the screen will give you the option to Insert Photo or Video. Doing this will open the Photos app from where you can select the photos/videos you want to attach to your email. Likewise, within the Messages app you can tap on the camera icon to be presented with a choice of taking new photos or accessing existing photos in your Photos library.


How can I verify a Lion FileVault recovery key?

This is much easier to do beginning in Mavericks. The fdesetup command was expanded to support recovery key changes and verification.

$ sudo fdesetup validaterecovery
Password:
Enter the current recovery key:
true

This will prompt you for the key, which should be entered in all caps with the hyphens.

true means you entered a valid recovery key.


How to Enable Spotlight Search Files And Directories

Though I'm not entirely sure about Spotlight, Alfred (http://www.alfredapp.com/) is an incredible app I've come to wonder how I ever lived without. You can bind it to Spotlight's default keybind (Command-Space) and set it to search your entire system.


Almost all Functions in Numbers on MacOS Give Me Syntax Errors

Try using ; as a separator between parameters instead of ,.
If you start typing the function name in a cell and let it autocomplete you should also be able to see which separator will work and how the function should look.
It seems that in locales with a comma as a decimal point the separator for functions is different. The same thing happens in Microsoft Excel which is why I knew to look for it.


Boot Camp won't work: why don't I have disk0s0 or disk0s1 partitions?

I can hardly imagine someone will have a similar problem, but if they do:

Seems like Bootcamp wants to see an EFI partition. Once again, here was the gpt show output from above:

my-MBP:~ uname$ sudo gpt show disk0
       start        size  index  contents
           0           1         PMBR
           1           1         Pri GPT header
           2          32         Pri GPT table
          34      409606
      409640  1464477344      1  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  1464886984      262151
  1465149135          32         Sec GPT table
  1465149167           1         Sec GPT header

As per the details in this question, i learned that the EFI partition should start at 40 with a size of 409600. To mess with disk0 (for me, the current and only disk), i booted in internet recovery by holding ⌘-R, unmounted disk0 with

diskutil unmountDisk disk0

then re-added by EFI partition using

sudo gpt add -b 40 -s 409600 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B disk0

I removed the -i 1 bit (setting the partition index to 1) for fear of messing with the main partition (which had itself moved to index 1). Here's the man page for gpt.

(The above apple.stackexchange answer describes how to reformat the EFI partition. I didn't do that and haven't run into any trouble so far. Maybe i'll regret it.)

To fix the incorrect indices, i followed Rod Smith's instructions here. It's all pretty clear, but briefly:

Download and install the package.
Run gdisk /dev/disk0 (or whatever disk you're working with)
type ? to get to the main menu
typed s to sort the indices, then w to write the changes

No more Bootcamp errors. Hooray!


Choose from list apple script service execution from Safari opens Firefox to display the dialog with list

Firefox is likely opening because the script includes:
tell application "firefox"
    …
end tell

Based on your description, these lines require AppleScript to launch Firefox to determine if the script is correct – even if the involved lines are never run. Firefox needs to be launched for AppleScript to obtain the application's scripting language support.
The other browsers implement AppleScript using a more modern approach. They provide their language support through an embedded Scripting Definition file (SDEF) within the application bundle.
open a URL on macOS
You can avoid this behaviour by using the macOS open command line tool and passing the desired browser's bundle identifier with the URL to open.
This removes the need to write browser specific sections of AppleScript.
Be sure to quote the arguments:
try
    set myURL to "https://duckduckgo.com/?q=" & "42"
    set bundleID to "com.apple.safari"
    do shell script "/usr/bin/open -b " & quoted form of bundleID & " " & quoted form of myURL
on error (e)
    display dialog e
end try

Calling open without a bundle ID will open the URL in the default browser.
Open URL with Safari
 /usr/bin/open -b com.apple.Safari 'https://dssw.co.uk'

Open URL with Chrome
 /usr/bin/open -b com.google.chrome 'https://miln.eu/apps'

Open URL with Firefox
 /usr/bin/open -b org.mozilla.firefox 'https://indie.miln.eu'

| and Error Checking
You could surround the application names with | to defer script error checking from compile time to runtime. See user3439894's answer for this approach.


How can I drag and drop email attachments in Mail on Lion?

I had this problem and tried restarting Finder in the Force Quit menu, and my drag/drop functionality came back.


How can I advertise my app on the App Store?

You can link to apps in the appstore. For example:

http://itunes.apple.com/us/app/pinball-arcade/id455826958?mt=8

(This is just a random app I picked to serve as an example)

Now, if you have your link to your app, you can:

Write a blog about the app and link to it
Have websites review your app and they will link to it
Does your app serve the need of a particular community? Maybe they have a forum or mailinglist where you can link to your app and explain the benefits they will get from it.
Tweet, facebook or Google+ about the app


Cannot restore due to older version of iOS

Now that you've upgraded the phone, you should be able to go in to Settings > General > Erase All Content and Settings.    This will reset the phone like new, except having the latest version installed.    When it restarts, you'll be able to restore from your newer backup.


Macbook Pro Retina 15" Mid-2015 and Ultrawide Monitors (LG and Acer)

Yes, Thunderbolt 2 is indeed compatible with DisplayPort 1.2. On top of that you should have no issue running a resolution of 3840x1600 on an external monitor via your MacBook. You will likely have to set the resolution manually though. After connecting the monitor, just head to System Preferences>Display>Your Monitor and hold option while clicking the "Scaled" radio-button to show a full list of available resolutions.

However do be wary that Night Shift is not officially compatible with any displays besides the internal Mac displays, the Apple Thunderbolt Monitor, and the LG UltraFine 4K/5K monitors. There is a common problem on unsupported external monitors where Night Shift will become permanently enabled, and will even stop Night Shift's scheduling and intensity settings from working properly on the Mac's internal monitor. I wrote a guide about fixing this by tricking your Mac into thinking your external monitor is internal. This will also prevent another problem where some external monitors get stuck in mirroring mode on newer versions of macOS. You can find that here: Fixing Night Shift incompatibility with external monitors


Where are images metadata and album data stored on iPhone? and how to extract them?

In this article, I'll answer the question on how to examine photo metadata with the exiftool.

There is the apple supplied sips command. man sips

$ sips -g format  /Users/mac/Desktop/rockSlab.JPG
/Users/mac/Desktop/rockSlab.jpg
  format: jpeg

I give an example of exiftool for use on a mac. The use of exiftool on Windows  command line will be the same.    I have heard a lot about exiftool.  I wrote an applescript to use this tool.  You could use any language you like.

I assume you were connecting your iPhone to a mac, but the some concepts should apply.  Applescript is supposed to be readable to about anyone.  It's in "English".

fyi:

(* *)
  is a comment
--
  is a one line comment
set a to b
  is a = b in normal languages
log
  is a print statement
display dialog
  put up a dialog box
common(dropped_items)
  means call function common with argument dropped_items
on common(input)
  is the function header

applescript app:

    (*
  This script provides an example of using the command line ExifTool tool.
  The script was written to answer ASC Discussion question https://discussions.apple.com/thread/8511361

   Shows exif data before and after any change.  You may run the script by either double clicking on the app or droping files on the app. I Included debugging statements on run path.

   Requires ExifTool by Phil Harvey.  Download
       https://www.sno.phy.queensu.ca/~phil/exiftool/

    You need to place exiftool in your default path.  I suggest "/usr/local/bin/exiftool". No you cannot go into terminal and alter your path.
    You can alter this script to change the path.

  Input:
      Drop files on AppleScript icon.
      or
      double click on the app.
      or
      run from the script editor to see the log output. You will fist need to click on the "list" icon at the bottom of the script editor screen.

  Output:
      Creates file "tryAttachmentsLog.txt" in you home folder.
      When run from the script editor, you get logged output.

  How to save:
        Save as an Application Bundle.  Don't check the two boxes below.

For testing, run in the Script Editor.
    1) Click on the Event Log tab to see the output from the log statement
    2) Click on Run

Author: rccharles

 *)

-- Gets invoked here when you run in AppleScript editor.
-- This is for testing although you could use it for production
on run
    -- Write a message into the event log.
    log "  --- Starting on " & ((current date) as string) & " --- "

    set desktopPath to (path to desktop) as string
    log "desktopPath = " & desktopPath

    try
        set see to choose file
    on error errMsg number n
        -- Be sure to select a file on your DESKTOP.
        set see to alias (desktopPath & "rockSlab.jpg")
    end try

    -- Simulate dropped items list.
    set dropped_items to {see}

    common(dropped_items)

end run

-- Gets invoked here when something is dropped on this AppleScript icon
on open dropped_items
    display dialog "Number of items dropped is " & (count of dropped_items) & ". " giving up after 3

    common(dropped_items)

    --display dialog "Processed " & (count of dropped_items) & ". " giving up after 3

end open

on common(dropped_items)
    -- Required by debug routine.
    global debugRunning
    set debugRunning to ""

    -- Write a message into the event log.
    log "  --- Starting on " & ((current date) as string) & " --- "
    tell application "Script Editor"
        activate
    end tell

    log "class = " & class of dropped_items

    try
        set pathToExiftool to do shell script "which /usr/local/bin/exiftool "
        log "Found exiftool here: " & return & pathToExiftool
    on error errMsg number n
        set theMsg to "could not find exiftool. Error message was " & errMsg & " error number was  " & n
        log theMsg
        display dialog theMsg giving up after 20
        return 1
    end try

    repeat with droppedItem in dropped_items
        log "class droppedItem = " & class of droppedItem
        set unixDroppedItem to POSIX path of droppedItem
        log "unixDroppedItem = " & unixDroppedItem
        set quotedUnixDroppedItem to quoted form of unixDroppedItem
        log "quoted form is " & quotedUnixDroppedItem
        set toUnix to pathToExiftool & " " & quotedUnixDroppedItem
        set seeUnix to do shell script toUnix
        debugLog("--- Before ---- " & unixDroppedItem & " ---------------")
        debugLog(seeUnix)

        --  Perfrom whatever action you want out of exiftool
        (*
        see tags in a picture:
        exiftool   /Users/mac/Desktop/rockSlab.JPG
        the tags will have spaces in them leave out the spaces when typing the tag name
        *)
        set toUnix to pathToExiftool & " " & "-CreateDate -CircleOfConfusion   " & quotedUnixDroppedItem

        set seeUnix to do shell script toUnix
        log return & "result of exiftool is  " & return & return & seeUnix & return & return
        debugLog(return & "result of exiftool is  " & seeUnix & return)
        set toUnix to pathToExiftool & " " & quotedUnixDroppedItem
        set seeUnix to do shell script toUnix
        debugLog("--->>> After <<< " & unixDroppedItem & " -------------------")
        debugLog(seeUnix)
    end repeat

end common

(* ======================== Common Subroutines ======================= *)
-- ------------------------------------------------------
(*
*)
on appendToFile(fileId, theData)

    local theSize, writeWhere

    set theSize to (get eof fileId)
    set writeWhere to theSize + 1 as integer
    write theData to fileId starting at writeWhere

end appendToFile

-- ------------------------------------------------------
(*
 debug(<string>)
 Write messages to a log file.

  -- Need to place these two lines in the calling routine.
    global debugRunning
    set debugRunning to ""
 -- references appendToFile()
  -- example:
    debug("start program. Reading from " & listOfFiles)

   found here: /Users/mac/Documents/BJ\ Prior\ Years/BJ2004/sendmailapp2\ copy

*)
on debug(theMessage)
    -- return
    global debugRunning
    local theSize, startupDiskName, pathToLog, fileReference

    set pathToLog to (path to home folder as text) & "tryAttachmentsLog.txt"
    -- log "pathToLog is " & pathToLog
    -- display dialog "pathToLog is " & pathToLog giving up after 4

    try
        -- Complete the path.
        set pathToLog to pathToLog as text
        set fileReference to (open for access file pathToLog ¬
            with write permission)

        if debugRunning = "" then
            set theSize to (get eof fileReference)
            if theSize > 0 then
                appendToFile(fileReference, " " & return)
            end if
            appendToFile(fileReference, "   --- debug on " & ((current date) as string) & "   --- " & return)
            set debugRunning to "running"
        end if
        -- log "theMessage " & theMessage
        -- display dialog "in debug..." & return & "theMessage " & theMessage giving up after 3
        appendToFile(fileReference, theMessage & return)

        close access fileReference
        tell application "Finder"
            set the creator type of the file pathToLog ¬
                to "R*ch"
        end tell
    on error mes number n
        try
            set commonErr to "error ... " & mes & " error number is " & n
            log commonErr
            close access fileReference
            display dialog commonErr giving up after 4
        end try

    end try
    -- log "end of debug"
end debug

(*
write log message to script editor log and to our file log
*)
on debugLog(theMessage)
    log "debugLog: " & theMessage
    return debug(theMessage)
end debugLog

Example output:

(*  --- Starting on Wednesday, June 12, 2019 at 5:45:54 PM --- *)
(*desktopPath = Macintosh SSD:Users:mac:Desktop:*)
(*  --- Starting on Wednesday, June 12, 2019 at 5:45:59 PM --- *)
(*class = list*)
(*Found exiftool here:
/usr/local/bin/exiftool*)
(*class droppedItem = alias*)
(*unixDroppedItem = /Users/mac/Desktop/rockSlab.jpg*)
(*quoted form is '/Users/mac/Desktop/rockSlab.jpg'*)
(*debugLog: --- Before ---- /Users/mac/Desktop/rockSlab.jpg ---------------*)
(*debugLog: ExifTool Version Number         : 10.36
File Name                       : rockSlab.jpg
Directory                       : /Users/mac/Desktop
File Size                       : 5.9 MB
File Modification Date/Time     : 2019:06:12 17:20:33-04:00
File Access Date/Time           : 2019:06:12 17:45:54-04:00
File Inode Change Date/Time     : 2019:06:12 17:21:08-04:00
File Permissions                : rw-r--r--
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Exif Byte Order                 : Big-endian (Motorola, MM)
Make                            : Apple
Camera Model Name               : iPhone 4
Orientation                     : Horizontal (normal)
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Software                        : Photos 1.0.1
Modify Date                     : 2019:06:12 17:04:56
Exposure Time                   : 1/120
F Number                        : 2.8
Exposure Program                : Program AE
ISO                             : 100
Exif Version                    : 0221
Date/Time Original              : 2019:06:12 17:04:56
Create Date                     : 2019:06:12 17:04:56
Components Configuration        : Y, Cb, Cr, -
Shutter Speed Value             : 1/120
Aperture Value                  : 2.8
Brightness Value                : 5.52228164
Metering Mode                   : Multi-segment
Flash                           : Auto, Did not fire
Focal Length                    : 3.9 mm
Subject Area                    : 1295 967 699 696
Run Time Flags                  : Valid
Run Time Value                  : 3126374362166
Run Time Epoch                  : 0
Run Time Scale                  : 1000000000
Sub Sec Time Original           : 493
Sub Sec Time Digitized          : 493
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 1936
Exif Image Height               : 2592
Sensing Method                  : One-chip color area
Scene Type                      : Directly photographed
Exposure Mode                   : Auto
White Balance                   : Auto
Focal Length In 35mm Format     : 35 mm
Scene Capture Type              : Standard
Lens Info                       : 3.85mm f/2.8
Lens Make                       : Apple
Lens Model                      : iPhone 4 back camera 3.85mm f/2.8
XMP Toolkit                     : XMP Core 5.4.0
Creator Tool                    : Photos 1.0.1
Date Created                    : 2019:06:12 17:04:56
Current IPTC Digest             : d41d8cd98f00b204e9800998ecf8427e
IPTC Digest                     : d41d8cd98f00b204e9800998ecf8427e
Profile CMM Type                : Lino
Profile Version                 : 2.1.0
Profile Class                   : Display Device Profile
Color Space Data                : RGB
Profile Connection Space        : XYZ
Profile Date Time               : 1998:02:09 06:49:00
Profile File Signature          : acsp
Primary Platform                : Microsoft Corporation
CMM Flags                       : Not Embedded, Independent
Device Manufacturer             : IEC
Device Model                    : sRGB
Device Attributes               : Reflective, Glossy, Positive, Color
Rendering Intent                : Perceptual
Connection Space Illuminant     : 0.9642 1 0.82491
Profile Creator                 : HP
Profile ID                      : 0
Profile Copyright               : Copyright (c) 1998 Hewlett-Packard Company
Profile Description             : sRGB IEC61966-2.1
Media White Point               : 0.95045 1 1.08905
Media Black Point               : 0 0 0
Red Matrix Column               : 0.43607 0.22249 0.01392
Green Matrix Column             : 0.38515 0.71687 0.09708
Blue Matrix Column              : 0.14307 0.06061 0.7141
Device Mfg Desc                 : IEC http://www.iec.ch
Device Model Desc               : IEC 61966-2.1 Default RGB colour space - sRGB
Viewing Cond Desc               : Reference Viewing Condition in IEC61966-2.1
Viewing Cond Illuminant         : 19.6445 20.3718 16.8089
Viewing Cond Surround           : 3.92889 4.07439 3.36179
Viewing Cond Illuminant Type    : D50
Luminance                       : 76.03647 80 87.12462
Measurement Observer            : CIE 1931
Measurement Backing             : 0 0 0
Measurement Geometry            : Unknown
Measurement Flare               : 0.999%
Measurement Illuminant          : D65
Technology                      : Cathode Ray Tube Display
Red Tone Reproduction Curve     : (Binary data 2060 bytes, use -b option to extract)
Green Tone Reproduction Curve   : (Binary data 2060 bytes, use -b option to extract)
Blue Tone Reproduction Curve    : (Binary data 2060 bytes, use -b option to extract)
Image Width                     : 1936
Image Height                    : 2592
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:4:4 (1 1)
Aperture                        : 2.8
Image Size                      : 1936x2592
Megapixels                      : 5.0
Run Time Since Power Up         : 0:52:06
Scale Factor To 35 mm Equivalent: 9.1
Shutter Speed                   : 1/120
Create Date                     : 2019:06:12 17:04:56.493
Date/Time Original              : 2019:06:12 17:04:56.493
Circle Of Confusion             : 0.003 mm
Field Of View                   : 54.4 deg
Focal Length                    : 3.9 mm (35 mm equivalent: 35.0 mm)
Hyperfocal Distance             : 1.60 m
Light Value                     : 9.9*)
(*
result of exiftool is

Create Date                     : 2019:06:12 17:04:56
Circle Of Confusion             : 0.003 mm

*)
(*debugLog:
result of exiftool is  Create Date                     : 2019:06:12 17:04:56
Circle Of Confusion             : 0.003 mm
*)
(*debugLog: --->>> After <<< /Users/mac/Desktop/rockSlab.jpg -------------------*)
(*debugLog: ExifTool Version Number         : 10.36
File Name                       : rockSlab.jpg
Directory                       : /Users/mac/Desktop
File Size                       : 5.9 MB
File Modification Date/Time     : 2019:06:12 17:20:33-04:00
File Access Date/Time           : 2019:06:12 17:46:00-04:00
File Inode Change Date/Time     : 2019:06:12 17:21:08-04:00
File Permissions                : rw-r--r--
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Exif Byte Order                 : Big-endian (Motorola, MM)
Make                            : Apple
Camera Model Name               : iPhone 4
Orientation                     : Horizontal (normal)
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Software                        : Photos 1.0.1
Modify Date                     : 2019:06:12 17:04:56
Exposure Time                   : 1/120
F Number                        : 2.8
Exposure Program                : Program AE
ISO                             : 100
Exif Version                    : 0221
Date/Time Original              : 2019:06:12 17:04:56
Create Date                     : 2019:06:12 17:04:56
Components Configuration        : Y, Cb, Cr, -
Shutter Speed Value             : 1/120
Aperture Value                  : 2.8
Brightness Value                : 5.52228164
Metering Mode                   : Multi-segment
Flash                           : Auto, Did not fire
Focal Length                    : 3.9 mm
Subject Area                    : 1295 967 699 696
Run Time Flags                  : Valid
Run Time Value                  : 3126374362166
Run Time Epoch                  : 0
Run Time Scale                  : 1000000000
Sub Sec Time Original           : 493
Sub Sec Time Digitized          : 493
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 1936
Exif Image Height               : 2592
Sensing Method                  : One-chip color area
Scene Type                      : Directly photographed
Exposure Mode                   : Auto
White Balance                   : Auto
Focal Length In 35mm Format     : 35 mm
Scene Capture Type              : Standard
Lens Info                       : 3.85mm f/2.8
Lens Make                       : Apple
Lens Model                      : iPhone 4 back camera 3.85mm f/2.8
XMP Toolkit                     : XMP Core 5.4.0
Creator Tool                    : Photos 1.0.1
Date Created                    : 2019:06:12 17:04:56
Current IPTC Digest             : d41d8cd98f00b204e9800998ecf8427e
IPTC Digest                     : d41d8cd98f00b204e9800998ecf8427e
Profile CMM Type                : Lino
Profile Version                 : 2.1.0
Profile Class                   : Display Device Profile
Color Space Data                : RGB
Profile Connection Space        : XYZ
Profile Date Time               : 1998:02:09 06:49:00
Profile File Signature          : acsp
Primary Platform                : Microsoft Corporation
CMM Flags                       : Not Embedded, Independent
Device Manufacturer             : IEC
Device Model                    : sRGB
Device Attributes               : Reflective, Glossy, Positive, Color
Rendering Intent                : Perceptual
Connection Space Illuminant     : 0.9642 1 0.82491
Profile Creator                 : HP
Profile ID                      : 0
Profile Copyright               : Copyright (c) 1998 Hewlett-Packard Company
Profile Description             : sRGB IEC61966-2.1
Media White Point               : 0.95045 1 1.08905
Media Black Point               : 0 0 0
Red Matrix Column               : 0.43607 0.22249 0.01392
Green Matrix Column             : 0.38515 0.71687 0.09708
Blue Matrix Column              : 0.14307 0.06061 0.7141
Device Mfg Desc                 : IEC http://www.iec.ch
Device Model Desc               : IEC 61966-2.1 Default RGB colour space - sRGB
Viewing Cond Desc               : Reference Viewing Condition in IEC61966-2.1
Viewing Cond Illuminant         : 19.6445 20.3718 16.8089
Viewing Cond Surround           : 3.92889 4.07439 3.36179
Viewing Cond Illuminant Type    : D50
Luminance                       : 76.03647 80 87.12462
Measurement Observer            : CIE 1931
Measurement Backing             : 0 0 0
Measurement Geometry            : Unknown
Measurement Flare               : 0.999%
Measurement Illuminant          : D65
Technology                      : Cathode Ray Tube Display
Red Tone Reproduction Curve     : (Binary data 2060 bytes, use -b option to extract)
Green Tone Reproduction Curve   : (Binary data 2060 bytes, use -b option to extract)
Blue Tone Reproduction Curve    : (Binary data 2060 bytes, use -b option to extract)
Image Width                     : 1936
Image Height                    : 2592
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:4:4 (1 1)
Aperture                        : 2.8
Image Size                      : 1936x2592
Megapixels                      : 5.0
Run Time Since Power Up         : 0:52:06
Scale Factor To 35 mm Equivalent: 9.1
Shutter Speed                   : 1/120
Create Date                     : 2019:06:12 17:04:56.493
Date/Time Original              : 2019:06:12 17:04:56.493
Circle Of Confusion             : 0.003 mm
Field Of View                   : 54.4 deg
Focal Length                    : 3.9 mm (35 mm equivalent: 35.0 mm)
Hyperfocal Distance             : 1.60 m
Light Value                     : 9.9*)
Result:
"R*ch"


How do I install an older version of an app on an iPhone?

It sounds like the Apple Support article explains what you need to do to get the app in the version you want.

Go to the App Store on your iPhone.
Press Updates and then press Purchased.
When you get there, it should show your Apple account and it will say
My Purchases.
Press that and it will show you all of your apps
Find Trello and try to download it. If a version of the app that is compatible with your version of iOS is available on the App Store, it will let you download it to your phone.
If the version is not available, go to the iTunes App Store, find the app and click Ratings and Reviews.
There is a button there that says App Support. Click that and then put in a query to the developer. They may be able to let you directly download the version of the app that you need from them.

If all of this fails, possibly other options like Todoist have the older version of their app that you can access.

This is unfortunately not going to help you with this app, as it does not sound like you had downloaded this app prior to this question, but it will help you in the event that you accidentally upgrade an app that will then no longer work with your version of iOS.

Go to iTunes and Delete the new version of the App from your library and also from your drive.
Go to the Music>iTunes>iTunes Media>Mobile Applications folder on your drive.
In that folder will be all of the current apps plus a folder called Previous Mobile Applications.
Previous Mobile Applications stores all of the old versions of your Apps each time you do an update through iTunes.
Find the version of the App that works with your version of iOS and drag and drop it onto iTunes. iTunes will reload that version of the App into your library and move the file back into the Mobile Applications Directory.
Delete the app from your phone, then just sync your phone and the old app should be loaded in. You may need to click on the phone and apps in iTunes and have iTunes add it.

Best of luck on getting the app.


Why are Script Editor .scpt files not saved as plain text files?

William R. Cook's paper contains an excellent history and insight from those involved with AppleScript in 1989.

What follows is fun and speculative.

Conservation of Space and Processing

AppleScript was written at a time when every byte and bit was valuable. OS X's lazy encoding as property list formats would be wasteful in the eyes' of those early developers.

The binary format provided a pre-parsed form that avoided duplicating the complex, error prone, and time consuming parsing process with each load from disk. Better to load directly into memory and run.

Adaptive

Saving in a binary format allowed AppleScripts to be tied to the underlying AppleEvent codes rather that their dictionary of long form terminology.

This would allow an AppleScript written and saved against one version of an application to automatically update to terminology changes between versions of the targeted applications.

An integer object might be called 'integer' in the script but saved as the four character code 'int ' in the binary representation. The four character code coming from the AppleScript dictionary provided by the operating system.

If a future AppleScript terminology decided to alter the user facing word for integer, the binary representation could map to the newer name.

A flip side to this is possible to see today. Write an AppleScript against an application's dictionary. Then remove the application entirely from your Mac. What do you see in Script Editor upon opening the script?

At least in recent versions, AppleScript Editor showed chevrons surrounding the four character code. The code has been remembered and highlighted. Not the user facing terminology.

This is probably not the primary benefit but a possible benefit.

Modern Bias

It is worth acknowledging our modern bias for text documents. Experience has taught many of us that storing valuable content in a binary format carries risk. Binary formats are often poorly documented, opaque to the end user, and difficult to open when the owning software is not maintained.

When AppleScript and it's binary format were created, this bias was not yet formed. Storage and computational limits were very real and every kilobyte or thousands of cycles saved were worthwhile.

History and Origins

The stories of AppleScript's origin are wonderful but difficult to track down these days. AppleScript tried to be a friendly, English language like, language and was breath taking in its vision; the actual implementation was harder to get right!

AppleScript by William R. Cook
AppleScript - a story worth telling


What's the Mac equivalent of Windows' Turn Windows Features On or Off?

The Mac OS doesn't directly have a feature like this, mainly due to how the OS and supporting Applications are separated differently than Windows.

Looking a while back, Microsoft was having some issues with anti-trust lawsuits, and the inability to really separate IE from Windows. From how I understood it, part of this feature (at least the user facing side, not the server side) was enabled to help users 'Turn off IE'.

This grew on Windows two ways - one to let users 'remove' features that they didn't want to use, and two - to enable and disable server or other components.

Following the first of the above - this is much easier on the Mac - just drag the Application to the trash. Don't want to have iPhoto on your machine, just delete it. You can always reinstall it later from the media or Mac App Store. While certain API's do tie into different Applications (think media browsers in Pages, etc), the OS doesn't have to always have these applications to run. And to my understanding (although I have never tried it), you could theoretically remove iTunes or Safari if you wanted (although, WebKit is still being used, and may require Safari).

As for the second item above - server or other features - this is also much different on the Mac. For the actual server functions (outside of the Unix tools), you now just buy an app from the Mac App Store (you used to buy a different version of the Mac OS that was much more expensive). On Mac OS client, there is no direct way to fully remove a feature, say apache, without deleting the binaries, etc. from the actual UNIX paths. So, in this case, there really is not a direct correlation on the Mac OS.

When it does come to certain 'server-like' features in the Mac OS (for example setting up file shares, ssh, etc), these are under System Preferences -> Sharing.

Finally, the Mac OS tries to be a bit smarter about this too. Take for example your 'tablet features' for Windows. If the Mac actually supported a tablet in that case, they would show you an item in System Preferences. A great example like this is mice/trackpads. Depending on what is actually connected to your machine, you see (if you have a Mac without a trackpad, you don't see the trackpad option - or at least it used to - my air is showing the options for a mouse right now).

To turn off specific features (say Time Machine, etc), you still have to go to each items 'control panel' if you will under System Preferences, versus one place to turn them all off. There may be tools like Onyx that let you have a bit more control over things (a review here), but this isn't really built into the OS in one place.


Can FileVault protected data be accessed if the hard drive has been NON securely wiped?

The information is there in a cryptographically erased format until you over write the data with a new file or re-encrypt the space with a new key. In some narrow way, the data is there, but no one can reconstitute it.

Specifically, each individual block on the storage was uniquely encrypted so you would need mathematically impossible amounts of processing to crack each block and then start the normal data recovery process.

The moment the large cryptographic key that was derived from your pass phrase was erased, you lost all practical and most impractical methods to recover any data from the still encrypted storage.


The App Store only distributes one version of each app. Xcode 4.0 is no longer available as Xcode 4.1 replaced it.

If the author of the software wishes to keep an older version on the store, the new version has to be uploaded as a different sellable item.

In this case, Apple didn't choose to leave both.

You can get multiple versions of Xcode by joining the paid developer programs. Last time I checked, Xcode 3 was available with the free account. It runs on Snow Leopard - but it doesn't look like you can buy Xcode 4.0 anymore without a paid developer account - it might not even be available to the developers - you might ask before paying money if you really need 4.0 and only 4.0.


Adding a Google account in iMessage appears to be stuck

As of some time in 2017, gTalk is no longer available. Messages/iMessage/iChat used the gTalk service to send and receive hangouts messages. It seems Messages 11.0 (the one I'm using with 10.13.5 on late 2009 MacBook) no longer has support for any functionality whatsoever with Google services. gTalk (2005-2017) was the precursor to Hangouts though it seems Hangouts later had backward support for gTalk which is why IM clients using gTalk still worked up until some time last year.

I submitted a feature request to add support in a future version of messages. It seems all the API technology is already available and that Messages and other clients merely need to add support in future versions of the messaging clients. You can submit a feature request to reinstate some method of Google service chat IM here. I bet if enough people request the feature, we'll see client support for Google IM return in a future version of Messages. I really miss it because I hate having to visit hangouts.com or mail.google.com every time I want to interact on hangouts.

Most of the information in this post is obsolete as it seems Messages had a bug prior to gTalk being discontinued. However, it means nothing now since the API no longer exists.

Update August 2018:

I found a third-party Github project that works really well. Very nice interface. It seems that Apple is just too lazy to add support for the new API and, instead, have simply removed the ability to add other accounts in Messages. Anyway, you can find binary installers here for all operating systems (macOS, Windows, or Linux).


Creating an alias for Python in bash/zsh

From man bash
Aliases  are not expanded when the shell is not interactive, unless the
expand_aliases shell option is set using shopt (see the description  of
shopt under SHELL BUILTIN COMMANDS below).

So unless you explicitly set an option, aliases aren't expanded in scripts and any reference to python will call the binary directly. For interactive use it's probably best to call python2 directly if you rely on pre-3 syntax/functionality.
PS: AFAIK it's the same for zsh.


Connecting my iPod to my Car's 30-pin Dock but Being Able to Control It from Within the iPod?

I don't think that you can override the car's interface when using the 30-pin connector with that iPod.

If you use an aux cable (1/8" male to 1/8" male) to the headphone port you will be able to control the iPod using it's native interface, but you will lose the charging capability. To regain charging you could use a 12-volt power adaptor, but this is two cables instead of the single cable you are currently using.


I had khd installed which intercepted the C-s


Editing an outlook message on the iPhone

To track edits to a document, save it in OneDrive and then edit it it in Word or OneNote or Excel or Powerpoint. Outlook doesn't do revision tracking on iOS or macOS in any current 2016 or 2019 version of the suite. I don't even thing outlook web app even tracks versions, and that's where they roll out most features first now.

Then send a link to the document or just share it. We also use box and iCloud for collaborative editing to track changes and you might also consider Google if that's open for your group.


AppleScript basic date/time format and filename

If you really want to do everything in AppleScript, then you should try:

to date_format(old_date) -- Old_date is text, not a date.
    set {year:y, month:m, day:d} to date old_date
    tell (y * 10000 + m * 100 + d) as string to text 1 thru 4 & "-" & text 5 thru 6 & "-" & text 7 thru 8
end date_format

to time_format(old_time)
    set {hours:h, minutes:m, seconds:s} to date old_time
    set pre to "AM"
    if (h > 12) then
        set h to (h - 12)
        set pre to "PM"
    end if
    return (h & "." & m & "." & s & " " & pre) as string
end time_format

set theDate to (current date)
set dateFormatted to date_format(date string of (theDate))
set timeFormatted to time_format(time string of (theDate))
set filename to  "screen_shot " & dateFormatted & " at " & timeFormatted & ".jpg"

Note: With regards to AM/PM: I haven't tried this in the evening, but it should work

It would be way easier, however to use do shell script for this, e.g.:

set formattedDate to (do shell script "date +'%Y-%m-%d at %H.%M.%S %p'")
set filename to "screen_shot " & formattedDate & ".jpg"

or even in one step by using:

do shell script "screencapture \"/Users/yourusername/Desktop/screencapture/screen_shot $(date +'%Y-%m-%d at %H.%M.%S %p').jpg\" "

Make sure to replace username with your actual username, and also that the folder screencapture exists. In summary, this results in:

set i to 0
repeat 960 times
    do shell script "screencapture \"/Users/yourusername/Desktop/screencapture/screen_shot $(date +'%Y-%m-%d at %H.%M.%S %p').jpg\" "
    delay 5 -- Wait for 5 seconds.
    set i to i + 1
end repeat

Note the importance of properly wrapping the filename in double quotes, which then needs to be escaped within AppleScript by a leading backslash: \"


Folders and files are overlapped by menu in Finder

It's most likely a Problem with automatic sorting and cleanup in the Grid Display. Look at the general Info Pages from Apple Support here and here about customizing your Display Settings.

In Short: Right-click (if it is activated) on the Finder Window and change the 'sort by' Option and activate the cleanup. You probably have the Option 'Snap to Grid' activated - try deactivating it.

-- Addendum --

As a second option, try deleting the '.DS_Store'-Files, which store Icon Positions and Images (see further explanation here). If that doesn't help there are a few other possibilities, but let's start with the easiest one

Like all Files starting with a dot [.] these are invisible. You have to use the Terminal.app, found in /Applications/Utilities/ do remove them. Technically, you need only remove the .DS_Store-File in the Folder "Canada" according to your Screenshot.

Open the Terminal and navigate to the Folder, f.e. within 'Documents'

cd /Users/yourusername/Documents/Canada

hit enter, the type

rm .DS_Store

You should close the Folder "Canada" and then reopen it again. The Icon and Sidebar Position should be normal.


How do I use the 'Profiles' tab in System Preferences?

Good thinking - although they seem sketchy - they are likely well designed and well placed by professional IT. Are you sure you don't know how they arrived or any context about someone enforcing some restrictions or providing some software / benefit / services in relation to this Mac?

The longer answer why you can't really get around this is likelyd ue to those profiles being placed there by an organization / MDM and Apple backs up that enrollment process by getting positive consent before the "locked" profiles are accepted by macOS.

The correct manner is to get the company / person / MDM team to revoke / remove / modify the restrictions that have been placed.

They could remove the restrictions entirely.
They could push less restrictive parts to profiles.
They could say no.

If they say no, then you could ask - if you're not OK with their controls, would it be possible to wipe the device and then use it with different controls. They might have it enrolled in DEP - device enrollment program - which would then prompt to be re-enrolled like iOS Activation Lock, so be sure you exhaust all other options on a personal level before you resort to an erase.


It is easier if you free space on your main drive, move the stuff to iCloud, Google drive or USB.

You would have to free some space anyway.


How to make the tags appear the old way on Mavericks?

There is no officially supported way to do this (and no unofficially supported hack that re-enables it either).  The behaviour of Tags in Mavericks as compared to Labels in every previous version of OS X is very different, and you cannot pick and choose elements to work in one way and have the rest to work in another, it's all or nothing I'm afraid, so if you are on Mavericks the best you can do is hope for a feature as part of a future OS update that adds extended options to tags.  I'm sure further tag options will be forthcoming, as it's essentially a V1 feature at present, and maybe this will be one of them.


Unable to access external drives over the network - original item can't be found

I managed to solve this problem using the advice found at:
https://discussions.apple.com/thread/250716547

Basically, on the file sharing computer switch file sharing off and then back on. On the remote macbook relaunch the finder. Now not only do the external drives appear in the finder but I can access their contents remotely.


How to get the hash linked to a GeneratedUID in El Capitan?

The hashes of the users are stored in a different place since 10.7:

/var/db/dslocal/nodes/Default/users/<user>.plist

To get the shadow hash enter:

sudo defaults read /var/db/dslocal/nodes/Default/users/<user>.plist ShadowHashData | tr -dc '0-9a-f ' | xxd -p -r | plutil -convert xml1 - -o -

or directly through directory services:

sudo dscl . read /Users/<user> AuthenticationAuthority

and

sudo dscl . read /Users/<user> dsAttrTypeNative:ShadowHashData


How to remove unremovable network drive login item?

I had an entire answer prepped, then realised this has changed in recent macOSes
Since High Sierra, the entire structure has been moved into what I can only call an unfathomable file.
~/Library/Application Support/com.apple.backgroundtaskmanagementagent/backgrounditems.btm
I cannot make head or tail of it, however, if you throw it away it will clean your entire Login Items List.
I discovered this at https://discussions.apple.com/thread/8086931?answerId=32423169022#32423169022
There's a utility called Knock Knock which is very good for looking at these, but it doesn't contain any mechanism for changing them other than finding the reference in Finder. It also doesn't seem to find volumes to be mounted.
There's another app, Lingon which can show the list, including volumes, but again doesn't seem to want to modify it in any way [though that could be my unfamiliarity with the app]
So, I'd go for discarding the backgrounditems.btm file [keep a copy just in case], then recreating your Login Items manually.

This is how it used to work before High Sierra, just for historical reference.
The Login  Items list is store in a file in ~/Library/Preferences/com.apple.loginitems.plist This es simply a text file, so you can open it in TextEdit, or for a nicer presentation, perhaps easier to follow, something like BBEdit - free version is fine.
Just to be safe, Opt/drag a copy to the desktop, in case anything goes wrong.
Each item in there is contained between opening & closing delineators, with each separate login item between <dict> and </dict> tags, like html or many other text/xml file types.
So, in theory, you should be able to find the item in the file & delete it entirely, from the opening to the closing tag.
Like this for an example item. Note exactly where the selection is to & from, so once deleted the file doesn't break the tags at all…

Once deleted, save the file & reboot.


How do I do a COUNTIF on another table column in Numbers?

The great thing about numbers is they offer a great how-to guide. If you don't know how to do something then all you have to is start typing a formula and it will begin to auto populate, click on it and the functions sidebar will open with the function. it will give you examples, what the parameters are etc.

That's just a tip, but your lucky I'm here:

Since you didn't specify what you want the cell of Table 1 to count in the column of table 2 I just counted all non-blank cells. You can alter with whatever text based of the countif function in the second example that compares against a string:

1 : Table 1 Cell that stores number of cells in column A of Table 2. As described since you didn't specific I just counted all non-blank cells :

=COUNTIF(Table 2::A,"<>"&"")

2 : Table 1 Cell that stores number of cells in Column E of Table 2 that matches text "MATCHED" :

=COUNTIF(Table 2::E,"MATCHED")

Instead of typing you can just do this:

Type into the cell = then type COUNTIF then click on the column header (E) it will select the entire column, then click on condition and type "MATCHED" then press enter! Your outcome will be based off this :


Set permissions for items on your Mac

  Permission settings determine who can view and alter files on the
  computer. Permissions are an important factor on OS X and other *nix
  systems and defines the way the system handles users, files and
  devices.

  Assign permissions to users and groups

  Select a disk, folder, or file, then choose File > Get Info.
  If the information in Sharing & Permissions isn’t visible, click the disclosure triangle.
  If necessary, click the lock icon to unlock it, then enter an administrator name and password.
  Click a user or group in the Name column, then choose a privilege setting from the pop-up menu.

  Read & Write: Allows a user to open the item and change it.
  Read Only: Allows a user to open the item, but not change its contents.
  Write Only: Makes a folder into a drop box. Users can copy items to the drop box, but can’t open it. Only the owner of the drop box can
  open it.
  No Access: Blocks all access to the item.

Shamelessly copied from: OS X Yosemite: Set permissions for items on your Mac

Another useful read: Understanding UNIX permissions and chmod


macOS Mojave on iMac won't boot into safe mode

I am relieved (and embarrassed) to report that the fault was a poor USB connection between the wired keyboard and the iMac USB port. A little unplugging and re-plugging solved everything. The iMac now boots correctly, in whatever mode I select.

The keyboard connection was only faulty in the computer's un-booted state. When booted, the computer accepted keyboard input from every key, including the various function keys.

The USB connections had been in place for about a year, since I bought the computer. Apparently prudence dictates that these connections be periodically unplugged and reconnected.


How can I reliably move photos from an iPhone and iPad to a Mac without losses or duplicates?

As an alternative to PhotoStream, I use PhotoSync to reliably move photos to my Mac without losses.  This is via wifi from PhotoSync on the iPad to the PhotoSync Companion on the Mac.  You will then need to import those photos into iPhoto on the Mac.

Without duplicates is bit harder.  PhotoSync will synchronise your photos without considering what you may have transferred using other methods (e.g. PhotoStream and iCloud).  So you will need to find duplicates yourself - either don't transfer those you already have in Mac iPhoto, or transfer the lot and sort out later on your Mac.

Regarding a precise workflow, I suggest you play around with PhotoSync and then you will quickly develop a workflow which suits you.


What happens when WhatsApp from an old phone is connected again?

If you have a Mac, you can navigate to the following folder using terminal:

~/Library/Mobile Documents/

List all hidden files (from the terminal) to see a folder which looks like: 12HJ1123DHJ~net~whatsapp~WhatsApp, i.e. random alpha-numeric sequence ending with net~whatsapp~WhatsApp. cd into this folder.
Next, navigate into Accounts/<PhoneNumber>/backup from this folder.

Finally you'll be in a folder whose path which looks like this (check with pwd):

~/Library/Mobile Documents/12HJ1123DHJ~net~whatsapp~WhatsApp/Accounts/<PhoneNumber>/backup

Your chat backup and history is stored in this folder. (Hidden files, can be seen with ls -al)

-rw-r--r--@  1 pse  staff  177 Jun  2 17:20 .BackedUpKeyValue.sqlite.enc.icloud
-rw-r--r--@  1 pse  staff  159 Jun  2 17:21 .Backup.plist.icloud
-rw-r--r--@  1 pse  staff  174 Jun  2 17:20 .ChatStorage.sqlite.enc.icloud
-rw-r--r--@  1 pse  staff  165 Jun  2 17:20 .Document.tar.aux.icloud
-rw-r--r--@  1 pse  staff  162 Jun  2 17:20 .Document.tar.icloud
-rw-r--r--@  1 pse  staff  158 Jun  2 17:21 .GIFs.tar.icloud
-rw-r--r--@  1 pse  staff  161 Jun  2 17:21 .Media.tar.aux.icloud
-rw-r--r--@  1 pse  staff  159 Jun  2 17:21 .Media.tar.icloud
-rw-r--r--@  1 pse  staff  161 Jun  2 17:20 .Media_1.tar.icloud
-rw-r--r--@  1 pse  staff  168 Jun  2 17:20 .Ranking.sqlite.enc.icloud
-rw-r--r--@  1 pse  staff  168 Jun  2 17:20 .Sticker.sqlite.enc.icloud
-rw-r--r--@  1 pse  staff  162 Jun  2 17:21 .Stickers.tar.icloud
-rw-r--r--@  1 pse  staff  167 Jun  2 17:21 .Thumbnail.tar.aux.icloud
-rw-r--r--@  1 pse  staff  163 Jun  2 17:21 .Thumbnail.tar.icloud
-rw-r--r--@  1 pse  staff  167 Jun  2 17:21 .Thumbnail_1.tar.icloud
-rw-r--r--@  1 pse  staff  172 Jun  2 17:20 .UserDefaults.plist.enc.icloud
-rw-r--r--@  1 pse  staff  161 Jun  2 17:20 .calls.log.enc.icloud
-rw-r--r--@  1 pse  staff  177 Jun  2 17:20 .current_wallpaper.jpg.enc.icloud

You can make a copy of this folder (cp -r)

Technically these are just Apple binary property lists:

$ plutil -p .calls.log.enc.icloud
{
  "NSURLFileResourceTypeKey" => "NSURLFileResourceTypeRegular"
  "NSURLFileSizeKey" => 1411
  "NSURLNameKey" => "calls.log.enc"
}

The quest to find the actual data still goes on :-)


Connecting to OS X server with Windows 7

You didn't mention what client or protocol/s you're using... could be you're talking about samba/cifs file sharing, and if so, there is an answer elsewhere on ask different (I'll try to find) that will fix your trouhle...

But I'll just throw this out there in case because I've done a lot of ARD/VNC and RDP the other way, and the issue that presents itself most (if definitely NOT a DNS issue) is that if the mac screen falls asleep, the client query for a desktop connection goes unanswered (very often), even if you check that box in the energy settings to wake for network access.

I have a couple solutions if that is what the problem is:

The simplest solution is to set the screen to never sleep, or set a hot corner in the Screen Saver preferences panel, and leave your pointer in that corner when not in use. Its recommended you enable, in the Securtiy preference panel, check on the "require password after..." (to not leave your console completely inviting to any user).

The other solution I use is to ssh into the machine and "wake it up" with a bash script that uses osascript to simulate a key press. I believe the idea originates from a Mac Hints post from a while ago, and its posted here:

#!/bin/bash
# wake up the screen
# (will simulate pressing the cursor key)

osascript="/usr/bin/osascript"

osascript -e 'tell application "System Events" to key code 123'

exit

ssh in, copy into file called "wakes" on server; leave somewhere in your $PATH, chmod +x wakes, run the command, then immediately attempt connection with the desktop sharing client.


To see the size of each application

open the /Applications folder in Finder
switch to list view
make sure to have 'Size' selected in the options (Cmd-J)

and wait a few minutes until all folder sizes are calculated by the system. Then sort by Size and remove any big apps you don't need any longer. I wouldn't recommend to delete the standard applications though.


Is it possible to fix my iPad screen? Large areas of black after bending it

Your screen is broken.

The only way to fix it is to have the screen replaced.  If it's still under AppleCare then you'll pay a small amount of money to have Apple replace the screen.

If not under AppleCare, you'll pay more for the screen repair.  Prices will vary among the different repair outlets.  Be sure to do a complete backup of the device before you get it repaired.


Lion deletes files after copying to shared folder on AFP

As noted in my second edit, repairing permissions appears to have fixed the problem, though I don't see how.


How to reset the iPad without PC and iTunes

The iPad has been unlocked with help of Apple Support. :)

Thanks everyone.


Make sure your SSD is working by connecting it to different computer through SATA or SATA to USB adapter.
Make sure your PATA adapter is working by connecting it to different computer. Also try different drive with it.
Try to buy another adapter with another chip, prefer unidirectional one.

There a whole lot of incompatibilities with them
This one for example is working fine in my FW IDE enclosure with TI chip and not in the FW enclosure with some different chip. Go figure!


Waking closed lid macbooks using wireless

Apple now says yes: https://support.apple.com/en-us/HT204032

  If your Mac supports Power Nap, these activities can occur while your Mac is asleep:
  [...]
  Mobile Device Management can remotely lock and wipe your Mac.

  And these activities can occur while your Mac is asleep and plugged in to an AC power outlet:

Software updates download.
Mac App Store items (including software updates), download in the background.
Time Machine performs backups.
Spotlight performs indexing.
Help Center content updates.
Wireless base stations can wake your Mac using Wake on Wireless.

Assuming Power Nap is on AND the laptop cart is a powered one AND is actually plugged into the wall (yes, that one's from experience), you should be able to reach them remotely. Apple Remote Desktop does with 10.11 and 10.12.


If you have dowloaded the file from github seems to be incorrect. Use the download link in the plugin page lusty-explorer.vim that works as expected


^ ControlA and ^ ControlE are keybinding in Bash and ZSH, not in iTerm (or Terminal).

If you want custom bindings within iTerm, you will need to bind the actual keyboard sequence in the keybinding.  "Start of Line" and "End of Line" are descriptors, not the actual key strokes.

So, to do this you'd need to send ^ ControlA for Home via their Hex Codes.  In this case, the codes would be 0x01 for "start of text" (^A) and 0x05 for "ENQ" (^E).

In the image below, you can add a new binding in Preferences → Keys → Key Bindings

Click on + to add a new binding
Click on Record in the dialog box
Press your desired key (Home in this case).
Select your Action (you can scroll or search).  Select "Send Hex Code"
Enter the Hex Code (0x01 for "start of text")
Test it out!


Is it at all possible to open a 3rd party iPad app in a mac (xcode emulator, for example)

You can't. IPAs downloaded from the App Store are built for the ARM processor in actual iOS devices. The iPhone Simulator is not an emulator and can't run ARM code. You will need to compile your own app from the source code, so unless the app is open source you will not be able to do this.


How do I make invisible files (like bash profile) visible in the finder?

All you need to do is set the AppleShowAllFiles preference to "true." From terminal:

defaults write com.apple.finder AppleShowAllFiles true

If you'd like to reverse the change, enter the following:

defaults write com.apple.finder AppleShowAllFiles false

For the changes to take effect, either restart the Finder or logout and back in.


It seems there are hidden partitions on your drive. When you install OS X, it creates Recovery Partitions, which seem to be taking the rest of your available disk space.

You could try running Disk Utility from the OS X install DVD/USB and try to erase ALL partitions. If you don't have the installer disk, you can boot into Internet Recovery mode by holding Command + Option + R at boot chime.

Alternatively, if you have a Windows install DVD/USB, you could boot into Windows installation, press shift+F10 and use DiskPart to format the entire drive. Type the following commands into Command Prompt:

diskpart
list disk
select disk n (n=the number of to be formatted drive)
clean
create partition primary
format fs=fat32 quick
exit
exit

If fat32 doesn't work, redo above steps and try 'format fs=ntfs quick' at last step.


Since you are facing the issue only with a single app, it most likely is a bug with the app, not with the iOS software or the hardware.

The resolution step would be to report the same to the developer of the app. The contract information can be found on the App Store page of the app. You can also try by running the app on other iOS devices if you have access to any.


How can I import external data into HealthKit?

Third party developers can provide import functionality to health app via the normal Health Kit API on iOS.

Some apps scrape or use web API such as Sync Solver exist to get FitBit data from the cloud to the local health app on iOS.
Some such as Health Importer are more general. (proper disclosure: I work on this app)

We have an app on the store that is designed specifically for importing arbitrary CSV data into HealthKit / Health.App.

Here are a few screenshots from the development version to show how the app works:

CSV's can be sent via email and then opened in the app:

You can then configure each of the columns within your CSV to a supported data type from HealthKit / Health.App:

After that, just tap the import button and it'll bring the data in:


An email as my name on other people's phone, iOS7 update

The first thing that comes to mind would be if messages is set (or became reset during the iOS 7 upgrade) to start new conversations from your Apple ID email instead of your phone number.

Open Settings app
Swipe up and tap Messages
Tap Send & Receive
Verify that the checkmark is next to the phone number

You'll want to watch for errors like I have below where the messages is still waiting for activation. (That might force it to send as your Apple ID until the activation finishes.)

Set the "Caller ID" or send as email or phone:


Long term effects of iPhone left in the sun?

If you cooled it down, then the problem is resolved for now and there is nothing more you can do. Try to avoid doing that again as this will slowly move from the short term effects to long term ones.
Short Term Effects of Overheating

Battery decreases- fast! (Hopefully temporarily, when you cool it down, it will return to 98% of what it was before)

Long Term Effects of Overheating
When the iPhone overheats, Apple also claims that you might experience these (more extreme) results:

device battery stops charging

display weakens

poor cellular signal.

To stop this from happening, try and turn your iPhone so that the screen is facing down. This will help it avoid contact with the sun. If you have a case, that will be better because the sun will be hitting the case instead of the phone directly.


Why is Git not found after installing OS X Lion?

If /usr/local/git already exists, you'll need to either add it to your $PATH or make a symlink placing the symlink inside a directory that is in your existing PATH.

A common practice is to make /usr/local/bin if it doesn't exist and add a link:

sudo -s
mkdir -p /usr/local/bin
ln -s /usr/local/git/bin/git /usr/local/bin/git
exit


How to set a variable to all the numbers located in a list?

Objective: To process an AppleScript list of strings so that each string is filtered to remove any non-digit character followed by all leading zeroes.  Resultant empty strings are discarded.

property digits : "0123456789"
property text item delimiters : {}

set L to {"abc", "qwerty.24", "01 abc23xyz", "123abc456", "2.1abc", "20"}

repeat with textItem in L
    set stringOfDigits to filterCharacters from textItem thru digits
    set numericalString to the processedNumericalString(stringOfDigits)

    set the contents of the textItem to the numericalString
end repeat

return the strings in L --> {"24", "123", "123456", "21", "20"}

------------------------------------------------------------------------------------------
# HANDLERS:
to filterCharacters from someText as text thru allowedCharacters as text
    local someText, allowedCharacters

    set tid to my text item delimiters -- to reset them after

    set my text item delimiters to {missing value} & characters in the allowedCharacters
    set illegalCharacters to characters of (text items of someText as text)

    set my text item delimiters to {missing value} & the illegalCharacters
    set filteredText to the text items of someText as text

    set my text item delimiters to tid
    return the filteredText
end filterCharacters

on processedNumericalString(numericalString as text)
    local numericalString

    if the numericalString = "" then return missing value

    try
        the numericalString as number
    on error
        the numericalString
    end try

    return the result as text
end processedNumericalString

Breakdown

property declarations

A property is similar to a variable, except for two differences: properties are persistent, and have global scope; variables are disposed of when a script ends, and default to local scope.  I will let you research those terms if you need to, as it's beyond the remit of this answer.  I almost never use a property for either of those features I just mentioned.  Rather, I use them most often to separate storage of values that I generally intend to remain constant throughout the script (as opposed to variables that can be expected to change at any stage).  AppleScript doesn't have a way to declare constants like other languages, so this is just a bastardisation of another construct.

Handlers

Handlers in AppleScript can be thought of to be what other languages refer to as a function, and the actual differences are nuanced and mostly academic, with one practical implication being that handlers aren't self-aware so can't report any information about themselves back to you.  But, like functions, they receive arguments (or parameters), do something with them, and spit out a result at the end in most cases.

filterCharacters: this is the core of the script in terms of where the heavy lifting is done.  It receives a single piece of text you wish to be filtered, and a list of allowed characters, and removes everything else, i.e. it extracts occurrences of allowed characters in the order they occur.  It does this by utilising AppleScript's text item delimiters, which you should read about more thoroughly, but essentially deletes all instances of delimiters in the list you supply it, splitting the string into fragments at the points of deletion.  So, it's almost performing the opposite function that we want, and can be thought of being a text filter that you supply a list of illegals rather than a list of allowables.  Therefore, I use them twice: first to strip out the allowables, leaving only the illegals; then giving that list of illegals back to text item delimiters, which then get stripped from the original piece of text, thus leaving us only with allowables.  Very efficient; avoids iterating through characters in the piece of text.
processedNumericalString(): This handler is just a cheap and lazy way to strip off the leading zeroes once the first handler has given us a string containing only digits.  It would be arguably more correct to iterate through each digit character until reaching the first non-zero character, deleting the ones that are, with a special case to prevent "0" being obliterated.  But, instead, I just decided to coerce the string to a number, then back to a string.  A hack that works effectively and one assumes more speedily too (though that's not definitive).

The main body of the script

With the two handlers defined at the bottom of the script, all that remains is to iterate through the list of strings, sending each string in turn to each handler.  What comes back is the piece of text you desire, which set the contents of... is what lets me replace the original item in the list with the new version.  I was mindful not to retain empty strings (""), and the processedNumericalString() handler swaps those out for an AppleScript object called missing value that represents exactly what it says (it's the closest pre-defined AppleScript object to what other languages often call null or nil).  Anyway, the important this is it isn't a string, because the final line of the script's run is:

return the strings in L

and this does exactly that: any item in the list that is not a string (or text) class of object is discarded.  You can, of course, swap this line for:

set myVar to the strings in L

if you need it assigned to a variable in order to keep using it.

ADDENDUM

The OP added:

  The list I described as myVar in the original post is always changing over time, I want the process of taking the items in myVar and isolating all the numbers to repeat indefinitely

OK.  Let's bung the main part of the script into another handler:

to formNumericalStringsWithItems from L as list
    local L

    repeat with textItem in L
        set stringOfDigits to filterCharacters from textItem thru digits
        set numericalString to the processedNumericalString(stringOfDigits)

        set the contents of the textItem to the numericalString
    end repeat

    return the strings in L
end formNumericalStringsWithItems

Place this with the other handlers to keep it separate and out of the way now.  The main body of the script is reduced to these two lines, where I've used the identifier myVar instead of L just for clarity:

set myVar to {"abc", "qwerty.24", "01 abc23xyz", "123abc456", "2.1abc", "20"}
set myNewAndImprovedVar to formNumericalStringsWithItems from myVar

Now, wherever myVar in your script gets updated/changed, you follow it with a call to this new handler, as I've illustrated here.

Just be clear about how I've delineated the different "parts" of the script: keep the property declarations at the top—don't put them inside your repeat loop; also don't put the handler declarations inside the repeat loop—I put all of mine at the bottom of the script, where I've marked a line and headed a section only for handlers.  The "main body" of the script (despite now only being two lines here) is what your code will occupy, so keep things neat and grouped (it's why I separate the property declarations from the main body by two paragraph breaks instead of just one).


Use QuickTime to Rotate Videos
You don't need to use any 3rd party tools to do this. It's built right in to QuickTime Player.
Any file that can be opened in QuickTime can be rotated by choosing Edit > Rotate Left (or Right) or by typing Command-Shift-L / R.
If you alter a movie file in this way and attempt to close the file (Command-W) you will be prompted to save your changes. Save them to a new file and you will have a newly rotated video.
Share your Video on YouTube with QuickTime
QuickTime also has a built-in way to share your video on YouTube. With the video open (and correctly rotated now) select Share > YouTube...


You will need to restore your iPad.  Hold down the top and bottom buttons till the screen goes black and you see the Apple symbol.  Then follow the instructions on this page http://support.apple.com/kb/ht1808  to restore your iOS.   I think once you do this and re-sync your ipad a lot of your problems (that you have posted about on here today) will be resolved.


Write to NTFS-formated drives on Yosemite

Open Terminal.

If you have brewed osxfuse installed, you have to uninstall it, because unsigned kexts are banned now. Type:

brew cask uninstall osxfuse

On the other hand, if you don't have Homebrew at all, download it:

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

Updating Homebrew is recommended.

brew update

If you don't have Homebrew Cask installed, type:

brew install caskroom/cask/brew-cask

Install a binary osxfuse package from Homebrew Cask:

brew cask install osxfuse

Install ntfs-3g:

brew install ntfs-3g

You need to create a symlink for mount_ntfs, in order to make drives mount automatically:

sudo mv /sbin/mount_ntfs /sbin/mount_ntfs.original
sudo ln -s /usr/local/sbin/mount_ntfs /sbin/mount_ntfs

If you are running OS X 10.11 and the commands above fail, try:

sudo nvram boot-args="rootless=0"

edit: This doesn't work for me in the final El Capitan (from Mac App Store). I had to disable SIP through recovery. Could someone confirm that this is indeed necessary?

... and reboot your machine. Then try symlinking mount_ntfs again.

Thanks to bjorgvino.


Most likely media files take up most of the space. It would be cool, if you could access the attached images directly in the file system to compress them. Alternatively an option to compress or archive directly in the Notes App would be great. Unfortunately neither is possible in the current version of Apple Notes. Of course you can delete your notes in the Notes App. To free up space, you need to delete them afterwards from the "Notes App Trash" which is called "recently deleted".

Before you delete, I would recommend to export your notes and switch to a note taking app that stores media files separately. Further you could avoid attaching large images to Notes in the future and use a separate App for scanning and archiving documents.

Personally I use Bear for my notes and Scanbot to scan and archive documents. Both Apps make it easier to compress and archive larger files, since you can access and manipulate media files directly.

To my knowledge there is no perfect solution to export all content from the Apple Notes App. Though the free App Exporter might be worth a try, since it does a good job converting text and image attachments from the Apple Notes App into Bear compatible markdown format. Beware that Scans and PDFs are not exported by this tool, which might be a dealbreaker.


This container isn’t a ‘unit of software’ (like a Docker container, don’t get your hopes up!) but rather a container of data used for cloud synchronisation.

Other containers for sandboxing data exist at
~/Library/Containers and ~/Library/Group Containers:

Apple documentation of data containers and sandboxing exists at

https://developer.apple.com/documentation/cloudkit/ckcontainer.
https://developer.apple.com/library/archive/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html


How can I know how much I paid for an iOS app?

I get receipts by e-mail from Apple whenever I buy something in the iTunes store.  If you don't delete them they should still be there.


Why doesn't iTunes allow me to reset my Music library?

1) Close iTunes, unplug phone
2) iphone: Settings > Music > TURN OFF "iCloud Music Library" | there is no manual editing possible with this turned on
3) Connect phone, open iTunes
4) itunes: Phone > Overview bottom lane (see your screenshot) "Manually manage videos" changes to "Manually manage music and videos" : activate it - you should be able to manually manage your music now.

more details on https://support.apple.com/en-us/HT201593


Playlist ascending / descending resetting

It seems that upgrading to version 12.7.0.166 and/or using option View | Show View Options | Sort By has resolved the issue.


What is the complete, authoritative way in which Mac OSX 10.9 and later builds its PATH?

You're trying to understand the theory and that's great.  I'll just say that from practical experience, you can modify .bashrc, .profile and/or .bash_profile and the path setting will stick.  I prefer ~/.profile simply out of habit.  My teammates all use .bash_profile.  Either way it works as long as you pay attention to the order of processing precedence.

Here are a few other thoughts on the matter:

Homebrew wants me to amend my PATH (stackoverflow)
How to correctly add a path to PATH (stackexchange)

Hope that helps.


Unfortunately, I don't think there is a general solution to this problem. I think each application can behave slightly differently with spaces - either by design, or because the developers haven't configured things properly.

This thread suggests that an earlier version of Maya works better with spaces, for example, while others report that the current version works fine.

However, from my experience with different applications on Leopard, Snow Leopard and Lion, each application can behave differently. I also know that (at least prior to Lion), developers could instruct different windows to do different things when switching spaces.

My best recommendation would be to contact the developers of these applications, and suggest a better way of handling certain windows. You should also check through the application's preferences beforehand, as some applications may allow you to customise the behaviour.


How do I make OS X require my password immediately after the display is put to sleep?

By design the first action system does is to save your work in a large file (depending what you had going on) so to be able to wake up exactly to where you left of. Once that is done the next step is to lock it with password.

That action does require time (writing the image), so if you are very quick you can catch your system in the writing action.

Here is a example:

Close lid-->

11/15/14 07:54:30.000 WindowServer[86]: device_generate_desktop_screenshot: authw 0x0(0), shield 0x7fdfc2449050(2001)

11/15/14 07:54:30.038 WindowServer[86]: device_generate_lock_screen_screenshot: authw 0x0(0), shield 0x7fdfc2449050(2001)

Open lid-->

11/15/14 07:54:33.928 WindowServer[86]: CGXDisplayDidWakeNotification [174799469151647]: posting kCGSDisplayDidWake
11/15/14 07:54:33.929 WindowServer[86]: handle_will_sleep_auth_and_shield_windows: Deferring.


Handoff and Instant Hotspot with El Capitan on MacBook Pro (Retina, 15-inch, Early 2013)?

Turn off Bluetooth on your Mac
Delete /Library/Preferences/com.apple.Bluetooth.plist
Turn Bluetooth back on


Is the retina Macbook Pro's SSD soldered into the logic board?

No - The SSD card is a discrete component on the new retina MacBook Pro and can be ordered as an Apple service part. Time will tell if an aftermarket supplier decides to supply parts for that model.

Even though it's not soldered, it still is not a user-servicable part.

As ArsTechnica reports:

  While Apple uses the latest SATA protocol, the connector is physically incompatible with either Mini PCIe or mSATA.


Safari downloads sometimes continue, sometimes restart

This is a function of the server - not the client, so there is no download threshold.  Check this answer for a bit more information on how to check whether the server supports resuming http downloads.


Can't remove stalled "inProgress" Time Machine backup

Don't remove that is my advice. Apple protects the Time Machine space from anyone making changes so you need to break those locks first, then you need to unlink every single file in that directory and then delete them.

The system is designed to reclaim that folder the next time a backup starts, so you aren't saving yourself any time and just doing what the system will do but slower.

I would make a decision - do you need the backups on that drive. If so, restart the Mac and then let it take a day or several to get the next backup set.

If not - set aside that drive and connect a new destination if you need a quick backup. Time Machine can handle multiple destinations so you can get your next backup done, then let it chew on fixing the interrupted one.

Or - wipe that drive using Disk Utility / remove all backups of that machine using the tmutil delete to remove the machine backup and not just one interval.

Since you're still learning of sudo - please don't use it unless you know you have a good backup and that backup isn't connected to the Mac when you run sudo and you have time to do a full erase of the OS and then full restore from your backup.

Once you're set with a good backup - here's the tutorial on sudo and sudo tmutil delete

How can I manually delete old backups to free space for Time Machine?


Protect files from other administrator accounts

Simple answer - no. Administrative access is too powerful for multiple users on a single machine. Even if you trust every one of these users implicitly, there will always be a chance of accidental misuse and potential data loss.

If you are admin - you can read any file on the Mac
If you are admin - you can delete and modify any file on the Mac

The only exception is SIP - where even root can't modify some files Apple has marked as restricted.

Standard operating procedure dictates standard user accounts for all users on a multi-user Mac, with an administrator's account for maintenance, etc.

You can make an encrypted DMG to store things that you can't allow another user of the computer to see. They could copy the files and try to brute force the password - but Finder does a good job of asking for and mounting such filesystems when you reference an alias to the file.

The keychain is a specialized version of an encrypted store. You might be able to store your keys there and they would be safe from other users in a similar manner.