2011 MacBook wakes immediately on sleeping, even after change of HD and OS

Since you're not actually sure if the SMC reset did anything, I'd reset both the NVRAM and SMC again (and in that order) using the steps below.

Before doing so, ensure you have no external hardware connected and that you're using the built-in keyboard.

Reset the NVRAM

Older Macs had what's called Parameter RAM (PRAM), newer Macs use Non-Volatile Random-Access Memory (NVRAM). Here’s how to reset the NVRAM on your particular MBP:

Shut down your machine. Yes, a full shut down, not just logging out.
Press the power button and then press the commandoptionpr keys. You have to make sure you press these keys before the gray screen appears or it won’t work.
Hold those keys down until your Mac reboots again and you here the startup chime.
Let go of the keys and let your Mac reboot normally.

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

Reset the SMC

To reset the SMC on your particular MBP, follow these steps:

Shut down your computer
Keep the power cable plugged in.
Press at the same time shiftoptioncontrol (on the left side of the built-in keyboard) and the power button
Let go
Turn your computer back on with the power button.

After resetting both the NVRAM and SMC, use your computer to determine if the issue still persists. IF it does, then test the hardware as per the instructions below.

Run Apple Hardware Test

Your model MBP uses Apple Hardware Test. To use this, follow these steps:

Shut down your MacBook Pro
Restart your MacBook Pro
Press and hold the D key before the gray startup screen appears.
After a while, Apple Hardware Test (AHT) will start.
When prompted, select your language and click the right arrow.
When the AHT console appears, you can choose to run Basic tests by clicking the Test button. However, I suggest you select the "Perform extended testing" checkbox before you click the Test button.
Your test results will appear in the window in the bottom-right of the console.

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

Note 2: If pressing and holding the D key at Step 3 doesn't work, start again at Step 1 and, at Step 3 press and hold both the OptionD keys instead. This will try and run diagnostics from the internet instead, so you will need to allow more time for it to complete.


How can I prevent MacBook Pro from connecting to Wi-Fi while it is asleep?

Go to System Preferences, select the Energy Saver pane, uncheck Enable Power Nap on both the Battery and Power Adapter tabs.


How to uninitialize an external disk in MacOS

Is it this disk ?
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *31.0 GB    disk2
   1:           Linux Filesystem                         718.2 MB   disk2s1
   2:                        EFI ARCHISO_EFI             68.2 MB    disk2s2
   3:       Microsoft Basic Data                         307.2 KB   disk2s3
                    (free space)                         30.3 GB    -

If yes you can do :
diskutil erasedisk jhfs+ "Free Name" gpt disk2

You can try
diskutil umountdisk force disk2

Then retry
diskutil erasedisk jhfs+ "Free Name" gpt disk2


Macbook Pro 15" replacement Keyboard / Keys

Here is an English-language keyboard cover for the European keyboard that you already have. It costs US $30. This would provide a good solution to your problem with no need to install any parts. It is designed to remain in place all the time, while you type, and you can leave it on when you close the MacBook. In addition, the cover provides protection from spills and wear-and-tear.

Make sure you are ordering the exact correct part for your exact model of MacBook.

http://www.kbcovers.com/servlet/Detail?no=487


Is it possible to have a variable in the title of an Automator Service file?

The filename given in the "Save service as:" sheet, to the saved Automator Service, is what will appear on the Services context menu, sans the file extension.  It is fixed, sans renaming it, and cannot be a dynamic name automatically, as no mechanism is provided for it in a user made Automator Service.


For me this happened on one of the monitors that I was extending my macbook pro's desktop to, not all of them though.

Easiest fix, expand a program to full screen and then minimize it again, somehow the animation of expanding fixes it.


iPod Nano keeps going/staying in recovery mode

It may be a drive letter conflict in Windows. Go ahead and try the steps listed here: http://support.apple.com/kb/TS1493#changedrive


Here you get options to disable iTunes Store, News, Podcast, etc but at the bottom of this window is where you can name specific apps to restrict.

If you change “Allow All Apps” to “Do Not Allow Some Apps” you can then tap the + button to add apps you don’t require.

Just search for the specific app and select choose.

Once you have added the apps you wish to restrict just close this window and you will be prompted to save the profile.


The auto-save folder is determined using the variable 'auto-save-file-name-transforms', which you can customize.

The default value of this variable is "~/Library/Caches/Aquamacs Emacs/AutoSave".  The easiest thing to do is to simply create this folder (no customization required).


How do I see all my failed login attempts (macOS High Sierra)

You can retrieve the failed login with a command like the following:

For streaming data:

log stream --predicate '(eventMessage CONTAINS "Authentication failed")' --style syslog

Or, failed logins in last hour:

log show --predicate '(eventMessage CONTAINS "Authentication failed")' --style syslog --last 1h

But, this won't show the username for the failed request, only that a failure occurred.


What is safe to delete in order for system to work properly?

Most of the applications you'll delete are going to be restored the next time there is a software update, and even still it'll only save superficial amount of space. For example, the Mission Control, Launchpad, Dashboard, Time Machine, etc. apps are all less than half a meg, and only serve as links to call upon these features via Dock or Finder.

If you want to make a substantial cut on space without making your mac bulimic, i suggest Monolingual, which deletes unused language support (which is usually around 500 MB to 2 GB) and redundant app binaries.

Most Mac apps are "universal," meaning they support both Intel and (the older) PowerPC processor architectures, by having every application contain a binary compiled for each. If you're running an Intel Mac, monolingual can be used to delete the unused app binaries, saving 1-2 GB


How to never "allow this device to access photos and videos"?

You don't specify, but I'm guessing you're using a Windows laptop. It's actually an issue on the Windows side of things, because what you're getting the wrong message. That is, if you're supposed to get any message, it should be the Trust this computer message.
The way to fix this (assuming you are in fact on Windows), is to:

Go to your Start menu and open Control Panel

Click on device manager

You should see a list of device types with arrows to the left of their names

Find the one with iPhone listed under it (usually it'll be under the Portable Devices category, but not always)

Right-click on iPhone and select Update Driver Software...

Click browse and navigate to the following location:
C:\Program Files\Common Files\Apple\Mobile Device Support\Drivers

Select it and it should load the driver

NOTES:

I've tried giving you generic instructions as it's not clear what version of Windows you're using.
You should have your iPhone connected in order for Windows to see the device.
Note that you may get the Trust this computer message on your iPhone, but once you opt to trust it then you should be fine to go.


How do people find out hidden UserDefaults

Did Apple document all the usable preferences for their software?

Yes.  The first place to look is, well, Apple's Documentation Site.  Virtually everything that has to do with your Mac and the OS will be documented here.

Additionally, macOS is built upon a core BSD kernel so lots of the Terminal commands you see referenced to here actually come from that space.  One of the best places to learn about BSD is from the FreeBSD Handbook; arguably one of the most comprehensive documentation source for BSD.  Personally speaking, coming from that space (and I'm still a "resident") to macOS was very straight forward.

  Did these people know people that work for Apple and therefor built
  these tricks?

They're not tricks; it's Apple's framework.  Everything from how the user interacts with the desktop to what happens when you save a file is based on a well documented framework.

  Are these people just nuts and spend all their day punching in random
  defaults looking to see if any of them do anything?

Nuts?  A very emphatic NO.  However, I can say for certainty we are a curious bunch and always on a quest for knowledge.  I know I have spent lots of time in front of the screen just "see what something does" in the pursuit to expanding my knowledge base.

That said, finding these "defaults" is usually from necessity (i.e. we have an actual problem to solve).  A good deal of it is done via research as well as trial and error.

I have VM (virtual machines) running on my iMac with different versions of macOS just to simply try things so I can experiment without the fear of catastrophically messing things up.

If this is something you wish to explore, I suggest you start by surfing through this site and find "issues" that pique your interest.  From there, try the solutions to see what happens for nothing more than the sake of expanding your skill set.


PowerPoint's save as PDF in AppleScript results in print job

It took me a few hours to come up with a solution that works in my environment.
Please note that some elements need internationalization like "Vorschau" or "Sichern". This is a german solution working with PowerPoint for Mac 16.16.27 on macOS HighSierra 10.13.6.
I had to heavily debug things with Script Debugger ($99 well spent ..) to get things working. Please note how Preview is used for the actual PDF saving. I tried doing this from Powerpoint but it was unreliable.
-- 2018-01-31
-- https://github.com/irmowan/Convert-ppt-to-pdf/blob/master/Convert-ppt-to-pdf.applescript
-- modified by WF 2020-11-15
--
-- ppt2Pdf({"/Users/wf/Projekte/2020/Infrastruktur2020/ppt2pdf", "TestMe.pptx"})

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

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

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

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

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

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

                            end tell
                        end if
                    end tell

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

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

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

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

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

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

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

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

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

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

                -- Target the menu bar
                tell menu bar 1

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

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

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


Desktop displaying the titles of my minimized windows

The title should only appear when you hover your mouse over a minimized window. There is no setting to change this.

Try running these two commands in Terminal:

killall -KILL Finder
killall -KILL Dock

This will cause the Finder and Dock to relaunch, which often fixes graphical anomalies.

(Also suggest updating to 10.10.3 to ensure you are benefitting from any bugs fixed in the last two updates.)


MacBook Pro Early 2008 Fan running while in standby

It would make sense from my point of view to look for a certified Apple Service Provider or Apple Retail Store and ask them about replacing your Mac thermal grease. Chances are they offer this in a sort of "spring cleaning" program. Over time the thermal paste between your CPU and GPU and the heat sink dries up and doesn't do what it is suppose to do. This can happen but doesn't mean it is, sometimes the fans just get full of dust and need to be cleaned out. The important thing is just making sure the mac is getting good airflow and that its vents are several inches (6-8) away from anything that could be obstructing airflow.


iCal invites sent to my Gmail address (which is also my Apple ID) get added to iCloud

If your Apple ID is a Gmail email address, and someone sends you an invitation from an Apple device, your Gmail account won't get the invitation, but it will be added automatically to your iCloud calendar.
Why? Because your Gmail email address is recognized as an Apple ID, and that takes precedence: the invitation is added to your iCloud calendar instead of being delivered per email.
That's the default behavior, but fortunately, it can be changed to behave the way you want, as explained in this thread on Apple Communities:

Log in to https://www.icloud.com with your Apple ID.

Open Calendar:

Select Preferences from the gear icon:

Select the Advanced tab and, under Invitations, check "Receive event invitations as: Email to <your Gmail address>":

Save the settings.

Now you should receive invites per email instead of being automatically added to your iCloud calendar.


iPad: Disable low battery automatic power-off

No.

There is no user level setting available to disable power off due to low battery. iOS is programmed to turn the device off in case a low charge is detected (and under various other scenarios).

In your case, it appears that the battery is misbehaving. It is recommended to get your iPad inspected by an authorized technician.


Is it safe to Symlink your applications folder?

It would be possible to use the NAS as your applications folder, however you would not be able to create a symlink, as symlinks do not work across different partitions, or network shares.  You would instead mount the share as your applications folder.

There are other considerations you may want to be aware of, the first of which is that most NAS shares using windows file sharing would (samba, cifs) do not use a unix style permissions system, so there may be some issues with application permissions.  This could be handled by using a NAS that allows you to export shares using NFS which allows for more compatible permissions on the files.

The second issue is that of network connectivity.  If there is a problem with the network, your applications folder will disappear, and this could cause instability with your systems.  To overcome this issue, you may want to only mount the users applications (/Users/username/Applications) over the NAS, and not the system applications (/Applications).  This way important applications such as Finder, etc will be local, and other applications can be installed to the users applications folder.  Be aware, that most shortcuts point to the system applications, not the users applications folder (e.g. in Finders Sidebar the applications folder shortcut usually points to the system applications folder, and applications purchased via the Mac App Store install to the system folder too).  Users may still have problems with certain applications when there are network issues, however it will not effect the whole system.

The third issue is your question seems to imply that this applications share will be mounted by multiple users.  This may cause some issues, but applications are not supposed to store user data in the application itself, so you should be fine, however not all applications follow all the guidelines 100%.

To mount a share as your applications folder use the command: 'mount shareIpAddress:/pathToShare /Users/username/Applications'  for further information on automating this, you might want to read the Apple document: http://images.apple.com/business/docs/Autofs.pdf


Control + W shortcut not working in Finder and Terminal

ControlW is an assigned shortcut in Bash. Notice, I said, Bash and not "Terminal" - basically it's present across all systems from Linux, BSD, macOS and Unix.

ControlW is "delete word."  It's similar to the  ⌫ Delete (aka Backspace) except it deletes an entire word.

For more info on keyboard shortcuts see:  https://ss64.com/bash/syntax-keyboard.html


MS Office default window size for existing documents

Try this...open Word, open a new document, size it the way you want it, then Quit Word.  When you re-start Word, documents should open in the size you last set on Quit.


Apple Maps: Renaming Favorites or Marked Locations

To rename favorites in Maps on macOS (source):

Click on the magnifying glass in the search field
Click Favorites
Click "Edit" in the bottom right
Click on a Favorite's name to modify it
Press return or click out of the editing field, then click "Done"

To rename favorites in Maps on iOS:

Swipe up the "card" at the bottom that contains recent locations
Scroll to the bottom and tap on "Favorites"
Swipe from right to left across the favorite whose name you want to change, then tap "Edit Name"
Enter a new name, then tap "Save"

I've tried both of these methods on macOS 10.14.2 and iOS 12.1.2 and confirmed that they both work.


Mac at 100% CPU Usage when plugged into monitor

In the end, after I let Activity Monitor calculate things for a few minutes, it was Google Chrome Helpers causing the CPU load and not the connection to the monitor. I quit Google Chrome and killed its Helpers, then restarted Chrome about an hour later, and the problem fully subsided.

If the CPU load doesn't come from one of the apps, and really is only happening because of then monitor connection, see bmike's answer.


Mac won't boot: Way to mount drive and delete one file?

You can boot into single user mode by holding Command + s at startup.

Single user mode starts you directly at the console, bypassing core Mac OS X startup processes. You should be able to remove or alter the offending file from there.


How to change the Subscription plan for third party app purchased through iTunes?

With Apple subscriptions, you can either cancel them and let the balance play out or if it just renewed, sometimes you can undo the payment.

Apple took the money, so cancel with them. When that is sorted and you are outside the coverage of your last subscription, you will have a chance to start a new subscription type. There is no “change” lanes in my experience when one app has different tiers of subscriptions.

Assuming you cancelled, perhaps there is a period when it’s still active so a chat with Apple support about your specific purchase would be the next escalation if needed. My guess is linked in might only sell basic outside the store, so they might not want to say that directly. I don’t see the words Basic, but maybe the metadata is too long to easily navigate from the in app purchase summary page.


Alternatively, if you don't need wget specifically, Snow Leopard does come with curl which does many of the same things.

E.g., fetching your flair via wget:

wget http://apple.stackexchange.com/users/flair/2726.png

vs. fetching it with curl:

curl -O http://apple.stackexchange.com/users/flair/2726.png

Notably lacking from curl is wget's --mirror option, but it does have nifty fetching with patterns, which handles many of the same problems:

# Fetch flair images for users 2726 through 2730
curl -O http://apple.stackexchange.com/users/flair/[2726-2730].png


Scrolling with MacBook trackpad: Is it possible to do with only one finger while a key pressed?

What works for me is Scroll tool that allows you to enable single finger scrolling on the trackpad side. I got the idea from this superuser thread


Change the directory used to save screenshots

You can use TinkerTool to change your "Screenshot file format" and "Target Folder for Screenshot"


I don't have deeper knowledge why this might take up so much RAM but this is what I found. You could also try to find out more about the process by clicking the info button in the menu bar. Do you see any connections to a certain program you are running?
Here they describe it as a part of the Disk Utility Program.

Open Disk Utility in Sierra or later (possibly El Capitan and earlier too), and watch in Activity Monitor for the appearance of storagekitd. This is the StorageKit daemon which runs as root and performs most of the work for Disk Utility. One reason that Apple has adopted this level of complexity is that many of the actions which Disk Utility has to perform require root privileges. Disk Utility runs in userland: in Activity Monitor, its user is you. To give it secure access to actions requiring root privileges, storagekitd is a helper, running as root.

On this website it is described as:

storagekitd is used by the StorageKit framework for disk state keeping and privileged operations. It is used by various clients in macOS. It
is not meant to be invoked directly.

Maybe this helps to find out why it is taking up so much of the RAM. Do you have anything running that might be connected to disk utility?


stop iTunes from auto-playing after import

according to this macworld article, do the following in Terminal, quit & relaunch iTunes

defaults write com.apple.iTunes play-songs-while-importing -bool FALSE


Disable window snapping to top on move to second monitor/display

Very annoying indeed and it's getting worse. The situation I am in is trying to view webpages in different screen widths. As the browser edge gets closer to other windows, Mac now thinks it must "jump to and hold it there" interrupting my process of expanding the page through every pixel width.

There is no setting to manage this yet, however, holding +alt while you scale or move windows dismisses the feature. The very nice bonus of dismissing the 'feature' with alt is how much video/CPU time it took to implement this nuisance is released back to your use. The dragging and re-positioning now becomes much more responsive and smooth rather than just jumping around the screen. It's now a habit to just hold alt as I resize any window on the screen.


Why are you using iTunes to play movies?
go to Macintosh HD\Users\USERNAME\Music\iTunes\iTunes Media\Movies
there you have the movies you bought (which is why you are using iTunes?)

you should download VLC player, it plays the movies so much better, and it is pretty much bug free.


It is a crucial component in OS X's anti-boredom technology.

Non-troll answer: Yes, you can delete it.

run this command in Terminal:

sudo rm -rf /Applications/Chess.app

enter your password and push return


You already canceled it by quitting the installer, just delete the  installer if you do not ever want to upgrade, or keep it for a later install.

The /Applications/Install macOS Mojave.app can be double-clicked to restart the upgrade, whenever you want.

On a side note, if you do not want the App Store to do things automatically... then in System Preferences > App Store, uncheck the appropriate check boxes.

On my system I like to manually control when any upgrading occurs so I set my App Store preferences as in the image below.


How do I detect if headphones are connected (via the jack) in bash?

I found an answer from here:
if system_profiler SPAudioDataType | grep --quiet Headphones; then
  echo plugged in
else
  echo not plugged in
fi


How to enable “middle” click of Apple's Magic Mouse?

MagicPrefs seems like the only solution currently available to enable a third button on a Magic Mouse.

From their website:

  MagicPrefs is a free application for OS X which aims to improve the
  functionality and configuration options of the Apple Magic Mouse,
  Magic Trackpad and the MacBook glass trackpad.

  It features the ability to bind a variable number of finger clicks,
  taps, swipes, pinch and other gestures to functions like Middle Click,
  Hold Down Both Mouse Buttons, Spaces, Expose, Dashboard, Recent
  Applications, Tweet, Read Tweets, Google Reader etc.


Select Finder and click View → Show Sidebar or press ⌘ cmd + ⌥ alt/option + S.

A tip when it comes to menus: if you go to the Help menu and search for what you want. It will highlight the result in the menu if you hover over it.


Why do apps only display in top left quarter of screen after installing Winterboard?

Ok, according to this Cydia thread, you have installed an iPhone 3GS wallpaper on your iPhone 4. Since the iPhone 4 has four times the resolution of the iPhone 3GS the apps will only show up in the left quarter of the screen.
Here's the fix:

Go to Settings>Wallpaper and choose any of the default wallpapers. Hopefully that will work.

And you don't need to restore. Winterboard makes no changes to the original OS files.

Since you can't press the Set button, you will need to restore and make sure that you avoid any apps that use Winterboard. Too bad!! I hope I've been helpful!


Depending on how many photos you deleted and the age of your Mac, it may take a moment or two to populate the list.  In the meantime, the dialog does show "No Recently Deleted". Also, photos auto delete after 30 days so keep that in mind. (In your original post, you don't specify when you deleted the photos.)
I hope this helps.


Finding file in parent folder of an AppleScript

Here is an answer to get right the pathname of .. from AppleScript:

Get Current Path to Script within AppleScript and Append Subdirectory

Anyway, the actual construct you got: /path/to/folder//myscript.pl
is a correct pathname to your Perl script. The 1st / is coming from the terminal one coming from container: /path/to/folder/.

Hence your built find command is very similar to this one you might try
to experiment:

find ~/ -name "Documents" -print

Hint: work directly in Perl, it is many times more efficient than any AppleScript.


Recover MacBook with full disk after failed OS upgrade

There are a few good suggestions here. In the end the approach that solved my problem was starting recovery mode, and deleting a lot of unneeded files from my hard disk.
(There was a lot of leftover stuff in Library/Application Support from applications that I have long ago uninstalled.)

After I freed up ~20GB of data, I could launch a reinstall of MacOS from recovery mode, which did the trick.


How to show that my Internet connection is still up and active in menu bar?

With regard to modifying the system AirPort icon, I do not believe that what you are asking for is possible.

To show internet connectivity, I use a combination of WiFi Signal (which could be substituted for the OS X AirPort menu bar item) and Cloud:

AirPort off

AirPort on & not connected

AirPort connected & no internet

AirPort connected & internet

This works very well and takes up no more space on my menu bar as I use Cloud anyway.

Dropbox is also a good alternative as it also shows network connectivity, although it is slightly slower to respond especially on slower connections where the network test takes longer.


Overcast Podcast - how to automatically play next podcast in a playlist?

In case anyone else is having this issue, you might have 'Play Next by Priority' turned on.

I was finding that after an episode ended, the next episode that started playing was the one at the top of the playlist.

Toggling this to 'off' will ensure that the next episode on the list will be played, and not the topmost episode.


with magic trackpad, time lag between when i droped a something and when it actually dropped

Do you have one-finger drag enabled? I believe the delay is there so when you "run out of runway" on a long drag, you have time to move your finger to the other side of the pad and continue dragging.  The mouse doesn't need that delay because you can hold the left button (or finger sensor) while you carry the mouse. You may need to use the click-drag instead of one-finger drag.


Out of the box, iOS supports CardDAV and LDAP.  There's no native way to import an XML file for contacts.

I have (in the past) set up an LDAP server (Solaris based) specifically for this scenario - I was connecting Nortel VoIP phones that supported a contact list with folks who needed access to this list but weren't on our Exchange Server (which had this list by default).

You may be able to set up some sort of synchronization between your phone system and the CardDAV or the LDAP server which will keep the contacts updated.  It may have this capability built in, but given that you can get an XML document of the list as output, creating a script to update a CardDAV/LDAP server would be pretty straight forward.


I've had this happen to me when the PDF itself was corrupt. Just plain "weird" behavior including what you've just described - the download beginning, nothing happening, the actual file eventually showing up and being unopenable.

Some things to try, in no particular order:

Check the file size - it's possible you really did download a 0 byte PDF. What shows up under Size when you hit Get Info on the downloaded file? If it is 0, try downloading the link from another machine on another network (on your phone or another computer, perhaps). If that doesn't work, the problem is likely on the sender's side.
If the file is a substantial size (around a meg or more), the problem might be on the sender's end. Something you could try if you suspect the file is getting mangled, is to have whoever created this file compress it in a ZIP/DMG and send you that file.
Try downloading an alternative PDF reader like the official Adobe Reader and see if that can open it. Perhaps there's something strange about this file that Preview doesn't like.
Another way to confirm if the file is completely corrupt or not is to open up Terminal, navigate to your download folder (cd ~/Downloads), and then run the file command on one of the downloads. (file myfile.pdf). This checks the bits in the file that tell your computer what it is. If it's a real PDF, you should see something like:

myfile.pdf: PDF document, version 1.6

But if you see:

myfile.pdf: data

the file is indeed unreadable. If you see anything else, the output will give you a hint as to what you need to open it.


Update MacOS on a MacBook with dead battery

Well baring the obvious and replacing the bad battery you will probably have to install the OS on a different computer and reinstall the hard drive.  The Mac power module is not responding that the laptop is connected to AC but responding that the battery is bad.  Apple will replace the battery for $199 so keep that in mind while doing any work around.

You can also put this MacBook in USB target mode and run the installer from another Mac to perform the upgrade without fixing the hardware. The battery service there is relatively labor and parts expensive due to the thin assembly, delicate cabling and glue that makes the cells part of the case structure. You’re getting a partial frame replacement when the battery is exchanged for $200 and possibly new top case / keyboard if the cabling or parts don’t fit when it’s out for repair.


I use the platypus tool/framework to roll scripts into apps all the time:

http://sveinbjorn.org/platypus/

The code for it is available and it's a free download with a request to donate financial support if you can/care.


After typing sudo I can no longer autocomplete commands by pressing Tab

OS X has not turned ON as many completion possibilities at the guys behind Ubuntu. In order to add autocompletion to sudo, you should simply add to the file $HOME/.bash_profile

complete -cf sudo

The description of complete and its options is briefly defined in the bash built-in commands manual page (see man bash). Although the -c and -f commands are not obviously detailed, one can find their description under the "-A action" explanation.


Screen Recording in Quick Time 7 not available

This is not a QuickTime 7 feature but a QuickTime X feature  !


Do not Disturb mode + the 'Bedtime' feature show you a Good Morning message once you wake your phone for the first time on a given day. This Osxdaily article goes in-depth on how to enable it and how it works.


Contacts has trouble syncing with the Google account. What to do?

From your error message:

Contacts: CoreData: error: exception during obtainPermanentIDsForObjects: Fetching maximum primary key failed with userInfo of { NSSQLiteErrorDomain = 11; }

I am guessing that the SQLite DB of your Contacts.app is corrupted.

I would recommend taking the following steps:

Export a backup archive of your contacts (if they are not all on Google)

You can do this by going to File > Export... > Contacts Archive
Quit Contacts.app

Delete the offending SQLite Database

From the Finder, select Go > Go To Folder from the menu.
Type in ~/Library/Application Support/AddressBook/
Select all those files: Edit > Select All
Put them in a folder: File > New Folder With Selection
Move the folder to the Trash. (In case something goes wrong, we can restore everything)

Launch Contacts.app and re-create your Google account
Re-import your contacts archive (again, only if they are not all on google's servers.  Otherwise, just let it re-sync.)

Let me know if this works for you!


g++ compiler not working after Sierra update

The issue comes from the fact that you're combining the GNU C++ compiler with the Clang assembler.

The Clang assembler expects you to use the new section names, and will warn you that you're using deprecated names.

However, please note that these are only warnings. You're free to ignore them and your program will work as before.

Your options are basically:

Ignore the warnings
Patch g++ with the patch found in this bugreport
Use a different assembler

Or you could just use the system supplied c++ compiler instead of compiling your own.


"iTunes media folder location" keeps reverting to local storage instead of persisting the NAS location, how to stop this?

Put the iTunes itl file on the NAS along with the media.  Then lock the copy of the file that's in your $HOME.
Launch iTunes.
iTunes will whine that it can't open the library (it thinks it needs to write to it), and will ask you for another.
Point it at the one on the NAS.
Now, iTunes will regularly, as you know, try to revert back to the one under $HOME.  But now it can't, so if it does, you get the prompt, and can redirect it.
Instead of discovering some time later after it's been storing media on the local drive again.


Would it be a good choice to use a Mac mini as wireless router?

I'd say it's not a good choice. Apart form the energy usage there might be some compatibility issues (since it's an ad-hoc network) and you are quite a few options short (no port-forwarding for example). If budget is an issue, get a cheap router, it will likely still perform better than using the Mac as a router.


How can I change a scripted ftp upload to lftp for High Sierra?

From looking at the lftp man page it seems as if lftp is scriptable. Something like the following should work (untested):

# upload script (save as website-update.lftp)
open server121.web-hosting.com
cd public_html
lcd /Applications/PlexEmail/streamnet/
put index.html
cd images
lcd images
mrm *.jpg
mput *.jpg
exit

And then use

lftp -f website-update.lftp

to execute it.

PS: lftp also has a mirror command which would this make even easier, probably.


Error message when adding Calendar Event

You provided very little information, like what account (iCloud, Google Calendar, etc.) you are trying to add an event to. I suggest signing out of that account in Settings > Mail, Contacts, Calendars and then signing in again.


App gets in commandline parameter "-psn_0_nnnnnn", why

Pre to OSX 10.9 apps launced in GUI had a -psn parameter passed to them. This was a Carbon system feature.

From this SO answer some documentation is in Apple's ProcessSerialNumber section of the Carbon Process Manager Reference. This is now marked as a retired document and the methods are noted as removed in OS X 10.9

Thus in 10.8 there is a -psn argument passed on the command line and the app then sees this and seems to be confused. I would note a couple of other things a 10.10 app will make calls to functions not in 10.8 so your app will likely crash later, also I suspect the app is reading the command line and this is not the best was as noted in the first link in in the comment by  Graham Miln


You can geotag photos in iPhoto or Aperture on the Mac. If you sync them to your iPhone/iPad you'll also see the geolocations.

To do this on the iPhone/iPad itself, iPhoto for iOS may also let you do this (I don't have it to check). If not, you could try something 3rd-party like PinApp, though this will not modify the files in your Photostream (since Apple don't allow that), but can make a geotagged copy, which you can save (and then perhaps delete the un-tagged original?)

Once geo-tagged, it depends exactly where (in what application/device) you want the photo to be visible on the Map. iPhoto/Aperture can sync (via iTunes) with your iOS device to store photo albums on it (which will include geolocation info). And obviously the iOS apps let you save back to your camera roll and/or photo stream.

You could probably also email it to yourself or otherwise copy it back to your iPhone photo-stream if that's where you want it...


How to force files saved to the system's Downloads folder to be stored on an external drive?

You could do it with a Automator Folder Action workflow:

Automator > New > Folder Action

Set: Folder Action receives files and folders added to Choose folder to: Downloads

Add the following Actions:
Get Folders Contents

[ ] Repeat for each subfolder found - Leave unchecked.

Filter Finder Items

Find files where:

None of the following are true
Name ends with .download

This is to avoid moving a file Safari is currently downloading.

Kind is folder

This is to avoid moving just the contents of the folder.

Kind is other alias

Move Finder Items

To: Downloads [ ] Replacing existing files

Obviously in this instance Downloads is the one on the external drive.
You can choose to check or not: Replacing existing files

New Alias

In: Downloads

Obviously in this instance Downloads is the one in your Home folder.If you do not want an alias created for each moved file, then omit this action.

Save the Automator Folder Action workflow, e.g.; Move to External Downloads

To stop and or remove a Folder Action: In Finder, you can select the target folder and right-click on it and select Folder Action Setup... from the Services menu section of the Context menu.


Old password not being accepted when attempting to change password

You can reboot into recovery and run resetpassword from Terminal to reset your password.


I have been asked for my UDID, is there any personal information that will be given away should some have this number?

Your UDID can be used to uniquely identify your iOS device. The UDID is often used to associate actions with a specific known user. Using your UDID, developers' may be able to associate your actions and use of their app back to you.

Apple associate private information with your UDID. You are required to trust that Apple  keeps this information private. Hopefully Apple will not sell this information or have it leaked through a security breach. While not highly valuable, if you have privacy concerns consider avoiding participating in beta apps programs.

ArsTechnica has a useful article that discusses the relative risks and uses of the UDID, Ask Ars: What’s the big deal with iPhone UDIDs?


Disable the use of the "com.apple.quarantine" extended attribute on Mojave

If I understood your question clearly, here is the solution that you can use to disable it completely.

Open Terminal
Type following command

sudo defaults write com.apple.LaunchServices LSQuarantine -bool NO

After that, reboot, and you should be set.

If you want to disable quarantine for files already downloaded

Open Terminal.
Execute the following command:

xattr -l /path/to/application/applicationName.app

You will see output similar to:

To remove an extended attribute manually, type the following command in Terminal

   xattr -d com.apple.quarantine /path/to/application/applicationName.app


Can I collapse content spread across two displays to a unique space for each display when the 2nd display is removed?

I have not tried that specifically, but after trying out pretty-much every window-position-remembering app out there, I found that only Stay actually did what I wanted.

It lets one save the window configuration for each display configuration, and seems to be Spaces-aware.

I have nothing to do with them, but thought they provided something useful.


Is it Safe to enter Google Password in 3rd party apps?

If you're worried about it, my suggestion would be to use Google's 2-step verification on your account. Basically, when you're signing in to your Google account from an untrusted computer (one you haven't successfully signed in with before) then in addition to your password you will also need to provide a 6-digit code that can be generated by an iPhone app or texted to your phone. That way, even if your password is compromised, no one can log into your account without your phone.

For apps like RSS readers, Google also lets you set up randomly-generated one time use passwords to sign into those apps that you can revoke at any time.


Will Lion updates be included in the App Store download?

The information page on the App Store shows:

Released: Jul 20, 2011
Version: 10.7

Therefore, I think it's safe to assume that the 10.7.1 update will have to be applied via System Update after installation.
EDIT
As of today, 23 August 2011, the App Store shows:

Updated: Aug 23, 2011
Current Version: 10.7.1

So, I guess the fixes are included in the download after all!


iCloud Photo Library and storage usage on devices

It is not a lightweight version it's more like a preview and then when you're connected to the internet you have access to the photo in full resolution. Your iPhone will let some space to the photos it will just optimise the storage, not all photos will be in the cloud. But I'm not sure if it can handle 200Gb but some space in your iPhone will be used depending on how frequently you access your photos in the cloud.


In Lion, you can enable traditional trackpad dragging in System Preferences > Universal Access > Mouse & Trackpad (tab) > Trackpad Options (button at bottom). You can also choose whether to use Drag Lock.

This is also where you go for various scrolling options (enable/disable, inertia, speed).


Use LaunchControl to run pg_dump in a ruby file

Thanks to klanomath's comment, the problem is that I am not putting the full file path to pg_dump.

pg_dump is a utility of postgresql which was installed using homebrew. So in my case I did brew info postgresql which told me the path to postgresql.  In the bin directory I found pgdump.

I also put in the full path to where I wanted backup_file saved. This was found by changing to that directory and typing pwd.


Airplay mirror iPad to mac but let audio play from iPad

I think an HDMI solution would work better in this case because you need as little latency as possible for music. The company I work for is considering trying a Blackmagic Intensity Shuttle or Intensity Extreme HDMI interface and converter, which cost US $300 at retail. I have no experience with them. You will need a Thunderbolt, PCI or USB 3 interface to your Mac to use a Blackmagic Intensity.

Part Two

I'm also a registered user of the Reflection app, and I've been in touch with their tech support staff. They point out that latency and frame rate depend on the specifications of the WiFi router through which the iPad sends its audio and video to the Mac. When you connect the iPad's video and audio to the Mac using AirPlay, are you using a WiFi G router (slow), or a WiFi N router (five times as fast as WiFi G)? Furthermore, you should probably connect the Mac directly to the router via an Ethernet cable, and not use WiFi on the Mac at all. Test this with a WiFi N (802.11n) router in close proximity to the iPad broadcasting with AirPlay and see if performance improves and latency decreases.

If you are using this setup in performance as a DJ, you might want to set up your own router in your DJ rig, whether it's connected to the Internet or not, so you can ensure the fastest connection between the iPad and the Mac.

If that doesn't produce acceptable results, then the HDMI hardware might be the next thing to try.


Streaming DVDs from iCloud through AppleTV

There are no direct solutions. However, you could consider a service like Plex (Link) this would allow you to create a Plex server with your media and stream it to several devices.

I have used plex for many years and it has worked perfectly for me. The service has some fees but they aren't massive and it will allow you to stream the content both to your tv and other apple devices with the Plex app.

You will need to bare in mind the CPU and GPU cost. Plex won't run well on a laptop you'll need a desktop of some form so Plex can transcode the videos for you to watch.

Download Plex server here.

Hope this helps!


Desktop shows only background image – how to return to default behavior?

In Finder, go to menu item Finder > Preferences and you will see your options there.


How can I select a password for a website with my keyboard?

You should be able to have Safari AutoFill the credentials when you tick the AutoFill user names and passwords checkbox in the Preferences sheet below:


Would it be possible to turn the field test into an app?

Field Test is already an app: /Applications/FieldTest.app!

The app icon is just hidden on the home screen, and the Phone app launches this app.

If your iPhone is jailbroken, you can edit the application Info.plist to show the icon on the home screen. In /Applications/FieldTest.app/Info.plist, edit SBAppTabs array to remove ‘hidden’, then run uicache as mobile.


Safari preferences aren't being saved after a fresh Sierra installation

Ok, I fixed it by deleting all files with "Safari" in the name in the ~/Library/Caches folder and then emptying the trash.  The bottom-most post on this page helped me: https://discussions.apple.com/thread/7604923?start=0&tstart=0


You can set a default calendar for new entries added on your iPhone.

To do so on your iPhone, go to Settings -> Mail, Contacts, Calendars -> Default Calendar (at the very bottom). There, choose your Home calendar and all new entries will be added to that calendar by default.


You can move the note icon by clicking on the Text Selection tool or the Rectangular Selection tool (it looks like a square with dotted corners) and then clicking and dragging the icon to the area of your liking.

Make sure that you aren't in highlighting mode (click off the highlight tool at the top of the page) - you can't move the note around when you're highlighting.


How do I downgrade my Safari from version 6.1 down to version 6.0.2 on my Mac?

Download link for Safari 6.0.2 is here:

http://swcdn.apple.com/content/downloads/53/02/041-8081/jex01nudh37t8cusghkiy1eki5crm76f4b/Safari6.0.2Mountain.pkg


How can I permanently delete folders from /var/folders/ situated in Trash?

If you can’t delete the file because a process is holding it open you could try killing the process and then deleting the file. To find the process try the command below

lsof | grep [path_to_file]

Then kill each process by ID with

kill -9 [id]

For lsof to give you the PIDs the file must be open when lsof is actually executing. If it’s being opened and closed extremely quickly by one or more processes then this approach may not work

There’s another way that’s more OSX friendly/specific which is the following command

sudo fs_usage | grep [path_to_file]


How can I show typing keyboard in record screen

I also use Screenflow, but there are also a few standalone apps for that like Keycastr and Mouseposé.


Command line to find bluetooth device's MAC address

Execute the following command line in macOS:

system_profiler SPBluetoothDataType

The output will print details about the build-in Bluetooth device along with the MAC address. The output will also list the paired devices along with their MAC addresses.


Can I get paid for releases of new versions of my app in the App Store?

The App Store doesn't offer support for paid app updates. You can release new features as in-app purchases for the current app (as @Jason said).

If, however, you want to charge for a new version of the app itself, then you need to release the new version as its own app and remove the previous version from sale. A common convention is to name the new app "MyApp 2" (with the "2" as part of the name) to distinguish it, since its actual version number will be 1 since it's a new app. Yes, it's a little confusing...

One issue to be aware of with this approach is that, because MyApp 1 and MyApp 2 are separate apps, users of MyApp 1 won't get any kind of notification that MyApp 2 is available, since it's not an "update" of that app but rather a separate thing entirely.


How can I make my Mac partition bootable again?

Your iMac contains a 2 TB non-4k disk (I suppose it's an HDD) and macOS High Sierra is (was) installed.

2542739416 blocks of your disk starting at block 409640 are not allocated to partitions.

Your lost partition(s) can be expected to be found & restored in the unallocated disk space.

The default Apple partition layout for an HDD is 1. EFI 2. main system and 3. Recovery HD (and 4. additional partitions created by the user e.g. Boot Camp). EFI and Recovery HD have a default size on 512-disks:

EFI: 409600 blocks(512)
Recovery HD: 1269536 blocks(512)

The eligible partition types for an HDD are either standard HFS+ or CoreStorage (usually if the main system volume was encrypted or the Mac contains a Fusion Drive). APFS is also possible but not recommended by Apple. Re-formatting an HDD to APFS would have been done by the user.

On an SSD the default partition type would be APFS with no recovery partition.

To detect the former partition type boot to Internet Recovery Mode:

Get the partition details (below I assume the internal disk has the device identifier disk0):

diskutil list
gpt -r show disk0

Unmount disk0 with diskutil umountDisk disk0
vis the first 3 blocks starting with block409640 of disk0:

dd if=/dev/disk0 skip=409640 count=3 | vis -c

If you had a standard partition previously the first 1024 Bytes only contain non-printable (zeros): \0\0\0\0\0\0...
After ~Byte 1030 you will see the following sequence: \0HFSJ\0

If you had a CoreStorage partition some non-zeros in the first 512 Bytes and the string CS (...\0CS\^A...) are shown:

\^U\^D\^A\M-s\M^?\M^?\M^?\M^?\^A\0\^P\0\0\0\M-W\^A\a\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\^B\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\M^Pu\M-\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0CS\^A\0\0\0\^D\0\0\^P\0\0\0\0@\0X\M-7}\^C\0\0\0\0X\M-;}\^C\0\0\0\0X\M-?}\^C\0\0\0\0X\M-C}\^C\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\^P\0\0\0\^B\0\0\0006j v\^R\M-+\^U\M^[\f\M^CdG\M-y\^]...

If you had a APFS partition the string NXSB (...\0NXSB\0\^P...) is shown in the first few bytes:

??[?\M^T\M^VD\^A\0\0\0\0\0\0\0\^X\f\0\0\0\0\0\0\^A\0\0\M^@\0\0\0\0NXSB\0\^P\0\0?7?\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\^B\0\0\0\0\0\0\0\^Q?^@1\^PL ?GSf~\M^KBչ?\0\0\0\0\0\0\^Y\f\0\0\0\0\0\0\^X\^A\0\0\^Xl\0\0\^A\0\0\0\0\0\0\0\^Y\^A\0\0\0\0\0\0!\0\0\0\M^@Z\0\0\^_\0\0\0\^B\0\0\0zZ\0\0\^F\0\0\0\0\^D\0\0\0\0\0\0007?\^C\0\0\0\0\0\^A\^D\0\0\0\0\0\0\0\0\0\0d\0\0\0\^B\^D\0\0\0\0\0\0\^F\^D\0\0\0\0\0\0\b\^D\0\0\0\0\0\0f?\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\

If you have a second full-fledged macOS boot drive you can use hexdump instead:

Unmount disk0 with diskutil umountDisk disk0
hexdump the first 3 blocks starting with block409640 of disk0:

sudo dd if=/dev/disk0 skip=409640 count=3 | hexdump

The following result identfies it as a normal OS X partition:

0000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0000400 48 2b 00 04 80 00 21 00 48 46 53 4a 00 00 01 ff
0000410 d3 8c 77 d3 d4 33 3c b0 00 00 00 00 d3 8c 5b b3
0000420 00 00 02 a8 00 00 00 25 00 00 10 00 00 fe b7 f6
0000430 00 fe 1e fa 00 ed 80 00 00 01 00 00 00 01 00 00
0000440 00 00 10 f2 00 00 5a 9d 00 00 00 00 00 00 00 01
0000450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000460 00 00 00 00 00 00 00 00 7d 9d b0 3a 02 31 62 f0
0000470 00 00 00 00 00 1f e0 00 00 1f e0 00 00 00 01 fe
0000480 00 00 00 01 00 00 01 fe 00 00 00 00 00 00 00 00
0000490 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
00004c0 00 00 00 00 00 60 00 00 00 60 00 00 00 00 06 00
00004d0 00 00 0a 00 00 00 06 00 00 00 00 00 00 00 00 00
00004e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0000510 00 00 00 00 03 10 00 00 03 10 00 00 00 00 31 00
0000520 00 03 ac 00 00 00 31 00 00 00 00 00 00 00 00 00
0000530 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0000560 00 00 00 00 05 40 00 00 05 40 00 00 00 00 54 00
0000570 00 00 10 00 00 00 54 00 00 00 00 00 00 00 00 00
0000580 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0000600

The first number is the byte count in hex: 0000000: 0; 0000600: 1536. The * denotes identical lines. This means: the first two blocks (0x000-0x3ff) are all zeros.

A CoreStorage partition shows some non-zeros in the first block (0x000-0x1ff):

0000000 0c 73 a1 a9 ff ff ff ff 01 00 10 00 07 14 d7 01
0000010 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000030 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000040 00 20 c1 cc 0f 00 00 00 00 00 00 00 00 00 00 00
0000050 00 00 00 00 00 00 00 00 43 53 01 00 00 00 04 00
0000060 00 10 00 00 00 00 40 00 11 bc fc 00 00 00 00 00
0000070 11 c0 fc 00 00 00 00 00 11 c4 fc 00 00 00 00 00
0000080 11 c8 fc 00 00 00 00 00 00 00 00 00 00 00 00 00
0000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000a0 00 00 00 00 00 00 00 00 10 00 00 00 02 00 00 00
00000b0 62 02 98 59 ee a9 ab 51 9b 49 23 90 2e f8 8b 43
00000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0000130 e4 6e f8 f2 63 99 45 c1 b2 13 86 28 a5 18 46 6d
0000140 c4 51 c0 f6 32 f9 43 ab 8e 59 42 d2 1a ef f6 50
0000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0000400 48 2b 00 04 80 00 21 00 48 46 53 4a 00 00 01 ff
0000410 d1 98 a4 93 d4 33 8b d5 00 00 00 00 d1 98 88 73
0000420 00 06 07 53 00 01 82 39 00 00 10 00 00 fb 6a 00
0000430 00 c5 1c 55 00 25 73 c7 00 01 00 00 00 01 00 00
0000440 00 0d e2 65 00 3e a2 fb 00 00 00 00 02 20 00 fb
0000450 00 00 00 31 00 06 b9 ef 00 00 00 00 00 00 00 00
0000460 00 00 00 00 00 00 00 31 fb 48 1e a0 6c 47 a2 9f
0000470 00 00 00 00 00 1f e0 00 00 1f e0 00 00 00 01 fe
0000480 00 00 00 01 00 00 01 fe 00 00 00 00 00 00 00 00
0000490 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
00004c0 00 00 00 00 00 60 00 00 00 60 00 00 00 00 06 00
00004d0 00 00 0a 00 00 00 06 00 00 00 00 00 00 00 00 00
00004e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0000510 00 00 00 00 0e 40 00 00 01 30 00 00 00 00 e4 00
0000520 00 00 10 00 00 00 e4 00 00 00 00 00 00 00 00 00
0000530 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0000560 00 00 00 00 11 d0 00 00 01 30 00 00 00 01 1d 00
0000570 00 02 80 00 00 00 72 00 00 13 30 97 00 00 13 00
0000580 00 15 c5 aa 00 00 13 00 00 18 2d 23 00 00 13 00
0000590 00 19 d8 fb 00 00 13 00 00 1b 76 cb 00 00 13 00
00005a0 00 1c 34 70 00 00 13 00 00 1d 0e 4d 00 00 13 00
00005b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0000600

The line starting with byte 0x130 shows the UUID of the Physical Volume, the line starting with byte 0x140 shows the UUID of the Logical Volume Group.

The string 48 46 53 4a (= "HFSJ") in the first 16 bytes of the third blocks identifies a Journaled HFS+ volume on both partition types.

An APFS container looks like this:

0000000 e7 ec ab 5b a2 94 96 44 01 00 00 00 00 00 00 00
0000010 18 0c 00 00 00 00 00 00 01 00 00 80 00 00 00 00
0000020 4e 58 53 42 00 10 00 00 f6 37 ff 00 00 00 00 00
0000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000040 02 00 00 00 00 00 00 00 11 f1 5e 40 31 10 4c 20
0000050 bb 47 53 66 7e 8b 42 d5 b9 c4 00 00 00 00 00 00
0000060 19 0c 00 00 00 00 00 00 18 01 00 00 18 6c 00 00
0000070 01 00 00 00 00 00 00 00 19 01 00 00 00 00 00 00
0000080 21 00 00 00 80 5a 00 00 1f 00 00 00 02 00 00 00
0000090 7a 5a 00 00 06 00 00 00 00 04 00 00 00 00 00 00
00000a0 37 fd 03 00 00 00 00 00 01 04 00 00 00 00 00 00
00000b0 00 00 00 00 64 00 00 00 02 04 00 00 00 00 00 00
00000c0 06 04 00 00 00 00 00 00 08 04 00 00 00 00 00 00
00000d0 66 a4 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
00003d0 00 00 00 00 00 00 00 00 16 21 06 00 00 00 00 00
00003e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
00004f0 00 00 00 00 00 00 00 00 91 3d 0f 00 00 00 00 00
0000500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000510 78 f4 09 00 00 00 00 00 01 00 00 00 00 00 00 00
0000520 01 00 04 00 08 00 00 00 00 00 00 00 00 00 00 00
0000530 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

The string 4e 58 53 42 (= "NXSB") starting with byte 0x020 in the first block is the magic string of an APFS container superblock and identifies it as APFS container. The UUID of the container starts at 0x48 (here: 11 f1 5e 40 ...)

If you have found a standard partition (which usually is accompanied by a Recovery HD), you can add them with the following commands:

diskutil umountDisk disk0
gpt add -i 5 -b 2541879520 -s 1269536 -t 426F6F74-0000-11AA-AA11-00306543ECAC disk0
diskutil umountDisk disk0
gpt add -i 4 -b 409640 -s 2541469880 -t 48465300-0000-11AA-AA11-00306543ECAC disk0

If you have found a CoreStorage partition (which usually is accompanied by a Recovery HD), you can add them with the following commands:

diskutil umountDisk disk0
gpt add -i 5 -b 2541879520 -s 1269536 -t 426F6F74-0000-11AA-AA11-00306543ECAC disk0
diskutil umountDisk disk0
gpt add -i 4 -b 409640 -s 2541469880 -t 53746F72-6167-11AA-AA11-00306543ECAC disk0

If you have found an APFS partition (no Recovery HD - it's included in the APFS container!), you can add it with the following commands:

diskutil umountDisk disk0
gpt add -i 4 -b 409640 -s 2542739416 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0

Booted to a normal system you have to prepend sudoto the gpt ... commands. Under certain circumstances you have to disable SIP.

Finally check the partitions/volumes:

diskutil verifyDisk disk0
diskutil verifyVolume disk0s2
diskutil verifyVolume disk0s3

Your previous partition layout may have contained a gap between the "former" Recovery HD and the Microsoft Reserved partition (size: 32768 blocks type: E3C9E316-0B5C-ADB8-817D-F92DF00215AE). Then the verifyVolume commands will fail and bigger guns have to be brought up. Don't try to repair or initialize anything if asked!

If you run into unexpected problems, add a comment!


Do I need to open port 5223 for iPhone push notifications to work when on wifi?

You don't need to open any ports on your firewalls for push notifications to work on your iPhone.

My iOS devices spent 90% of the time behind firewalls that don't allow any inbound connections to them. Notifications work fine (even with mobile data turned off).

The Apple docs at http://support.apple.com/kb/HT3576 do talk about port 5223. But they will be referring to out going connections on that port (even though they don't explicitly state that). Your firewall is unlikely to be blocking those, though I guess it is worth checking. I guess it is also possible that your ISP is blocking the out going port, but again that seems unlikely.

Despite the "push" in its name, Push Notifications are actually more accurately "pull" notifications (like most things with "push" in their name). The iOS device connects to Apple on port 5223 to listen in for the notifications.


macOS Sierra: AppleScript mount volume keeps asking for login

As Apple replied to the ticket referenced in mattdwen's Open Radar link above, as of macOS Sierra 10.12,

  you can no longer create items in /Volumes unless root.

Further, my best understanding of the AppleScript mount volume command is that it doesn't have a way to specify the mount point and consequently it only mounts volumes under /Volumes through the Finder's standard mechanism. So, I don't think you can do it via AppleScript.

But there's another way. You can accomplish the same thing using the lower level mount command:

mkdir -p ~/mnt
mount_smbfs "//my_username:my_password@my_hostname/share" ~/mnt

After mounting the volume this way, you should see a normal "volume" icon appear on your desktop and the ~/mnt directory will appear as "share" when you browse your user directory via Finder.

The one thing missing from this approach is saving the login credentials in Keychain. To do that, you have to do a bit more scripting. Something like this.

Save the password:

security add-generic-password -a my_username -s my_hostname -w my_password

Retrieve the password and mount the share:

pass=$(security find-generic-password -a my_username -s my_hostname -w)
mount_smbfs "//my_username:${pass}@my_hostname/share" ~/mnt

NOTE: If you have special characters in your password, you will probably need to URL encode it, perhaps like this:

pass='my !@#%%^& password'
pass=$(php -r "echo urlencode(\"$pass\");")
>>> my+%21%40%23%25%25%5E%26+password


Use Automator for saving file on NAS, what happen if NAS is not accessible?

It's normally a good idea to check for the existence of an external disk before using it. In this case, however, automator won't display an error if the disk is not found, it just won't do anything. I'd say it's safe in this instance.


Different scales (or resolutions) for different apps in the same screen?

If I am understanding you correctly one app seems larger than another app?

Unfortunately it is not possible to adjust the resolution for an individual app. On macOS (and Windows too) the resolution of the screen is set on a screen by screen basis and can't be set for a specific app.

In System preferences > Displays

You can adjust those parameters.

If you have more than one display you could adjust the resolution on each display and keep those particular apps on the screen they look best on.


How to switch the Apple ID when update the mac's softs?

From the Menu Bar select Store > Sign Out. Now select Store > Sign In...


Why does my iPhone have too many photos in a smart album after syncing from my Mac?

I don't believe you can sync photos from a Smart Album to an iPhone or iPad if you're using iCloud Photos on those devices.
You need to first turn off iCloud Photos on the iPhone, wait until all your photos are removed from the device, then try to sync the photos in the Smart Album via USB to your Mac.
If you turn iCloud Photos on for the iPhone, it will remove the photos from the Smart Album sync and replace them with the iCloud Photos images.  That's the situation I think you're seeing now.  There's no way around this other than to turn off iCloud Photos on the iPhone.


Does iCloud Drive backup hidden dot folders/files such as .git?

I've decided that because I can see the files within my iCloud folder in Finder by unhiding all hidden files, they are also backed up.

Confirmed with colleague that .git folder persists across machines!


macOS - External drives doesn't show up in Finder

I have had this issue, on my 2017 MacBook Pro (2 USB-C ports) - and I found that the problem is resolved by resetting the Mac's System Management Controller (SMC).

Power your machine down, wait a couple of seconds - then press the left-hand side Shift-Control-Option at the same time, as well as the power button, for 10 seconds (I count slowly, so more likely 15 seconds when I do it). Release the keys and then power your machine back on.

Hopefully it will now register the external drives.


open -a /Applications/"Safari.app" "https://plarium.com/en/strategy-games/vikings-war-of-clans/"

Note the inclusion of the -a flag.


I don't ever use Siri, but it's using too much battery

In iOS 9, Proactive services like Siri Suggestions (on the far left home screen page) will consume power. It has nothing to do with the actual Siri.

If you don't like Siri Suggestions, you can disable it in Settings > General > Spotlight Search.

You might also go into Settings > General > Siri and make sure "Hey Siri" is turned off, especially if you have an iPhone 6s or 6s Plus. Your iPhone "listens" for the words "Hey Siri" but only when connected to power (unless you have an iPhone 6s or 6s Plus, then it's all the time), but doing the two things above and then restarting your device should prevent more usage from accumulating under the "Siri" bucket.


Launchpad data is stored in a SQLite 3 database located at:

$HOME/Library/Application Support/Dock/UUID_Type_Filename.db

Example: 3BF614D8-048E-344B-9775-AA8ED64B3564.db

Whether or not you'll be able to successfully edit it depends on your SQL skills.

You could always just delete the file, probably best from Recovery HD, and it will rebuild itself when logging back in and opening Launchpad.  You could also just try deleting it and then in Terminal run the killall Dock command, then open Launchpad.  It should rebuild with only the currently installed apps.

Another thing to consider is maybe rebuilding the Launch Services Database may help. Note: Rebuilding the Launch Services Database may remove some customizations you've made and would need to set them once again.

In a Terminal:

/S*/L*/F*/C*/F*/L*/S*/lsregister -kill -r -domain local -domain system -domain user

Hint: Copy and paste the command above in the Terminal to avoid typos.

The full pathname is:

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister

Although you can use the wildcard version, you don't need the fully qualified pathname version for it to execute.


Disable instant reboot by crtl-cmd-power or bring up a confirmation or wait timer

Those keys are hard wired to that power operation. Apple did this because otherwise there is no hard power switch on the computer. I suggest using a smart corner to lock your computer, so you don't accidentally mix it up with restart or shut down (Cmd+Alt+Ctrl+Shift+Power).


Taken from one of the answers in this Apple Communities thread:

Export all contacts to a vCard file for safe keeping.
Delete Library --> Application Support --> Address Book.
Reboot.
Open System Preferences --> iCloud. Enable Contact Syncing.


How much video RAM to run 'Final Cut Pro' on a Mac Pro (2013)

The minimum amount of VRAM Apple recommends for running Final Cut Pro X is 256 MB. As a Final Cut Pro user myself (albeit a very light user), I find that 1 GB is sufficient, though I rarely put the program "through its paces," and the work you will be doing will likely be on a larger scale. 1 GB also happens to be Apple's minimum recommendation for editing 4K video and 3D titles.

Ultimately, it depends on how intensive the work you're going to be doing is. Are you going to be doing intensive work with 4K content? Or are you going to do smaller home video-style projects? It may be useful to use Apple's recommendations as bases for comparison as you make your decision (see below).

To view the entire list of minimum system requirements, see Apple's Final Cut Pro X Tech Specs page. This Apple Support Communities discussion also has some interesting details about VRAM and how it applies to Final Cut Pro X.


Gnu-info page exists, but is visible from neither emacs nor terminal

Is the info file symlinked in /usr/local/share/info? If not, a simple

ln -s /usr/local/Cellar/gnuplot/4.4.3/share/info/gnuplot.info /usr/local/share/info/

should solve the problem.

If not, look at the value of Info-directory-list in Emacs (C-h v). If "/usr/local/share/info" isn't included there, you can add it with

(push "/usr/local/share/info" Info-directory-list)

in the *scratch* buffer (and in .emacs of course).


How to delete message from iPhone lock screen?

No, iOS really doesn’t have this feature. You can only delete messages from the notification area of your Lock Screen, but deleting something without unlocking the phone is not possible. It is the same with photos you take while your phone is locked, and then delete them, while it is still locked, they still show up in your gallery, although they are already in the bin folder. As there is nothing like this for messages, deleting them from your Lock Screen is a feature anybody could use, not only the owner, so it is not supported.


Can I delete files in /Library/Containers/com.apple.mail/Data/Library/Logs?

Simply delete the file. It's even safe to do this while Mail is running.
Accumulation of these files can be prevented by choosing Window > Connection Doctor in Mail and making sure "Log Connection Activity" is unchecked.


Create and write to a .pages file using Terminal

A Pages document is not a simple file, but a Zip archive.
A Pages document contains much more than just plain text. A blank document is still based on a template, with a set page size and other metadata.

Creating a blank document in Pages creates this structure:

To create a Pages document programatically, use AppleScript to tell Pages to do it for you.

tell application "Pages" to ¬
  save (make new document) in file "Macintosh HD:path:to:folder:Blank.pages"

To run AppleScript from the command line, use osascript.

osascript -e 'tell application "Pages" to save (make new document) in file "Macintosh HD:path:to:folder:Blank.pages"'


Option 1: Run OS9 Emulator and install QuarkXpress:
Found here for free: emaculation.com

Option 2: Change filename to work on current QuarkXpress:
Assuming you have QuarkXpress on your new mac all you have to do is add the .qxp filename extension at the end of your old filenames and it will open on new versions.


Cropping tool for 4:3 or 16:9 images with Preview.app?

I do not use the Photos app for much, but I use it for this. I import the photo I want to crop. Click on the edit tool in the upper right and in the lower right you'll see "Aspect" with various options. You can crop to any of the desired ratios or customize a ratio. Once cropping is complete, I export the photo and delete it from Photos.

E.g., this makes it easy to crop a 4:3 digital photo to 16:9 for use as desktop.


Uninitialized HDD after GPT to MBR conversation, 3 HFS+ Volumes and 1 ExFAT

Having rummaged on other forums and sites, I came to the conclusion that gdisk can save me. And lo and behold!

Here are my actions, maybe it will save someone:

sudo gdisk /dev/disk6
GPT fdisk (gdisk) version 1.0.4

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: present

Found valid MBR and GPT. Which do you want to use?
 1 - MBR
 2 - GPT
 3 - Create blank GPT

Your answer: 2
Using GPT and creating fresh protective MBR.

Command (? for help): p
Disk /dev/disk3: 3907029168 sectors, 1.8 TiB
Sector size (logical): 512 bytes
Disk identifier (GUID): 366A9BED-8C95-4B28-07DC-45407D80EFA7
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2157 sectors (1.1 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048      1562505215   745.1 GiB   AF00
   2      1562505216      2888654847   632.4 GiB   AF00
   3      2888654848      3125626879   113.0 GiB   AF00
   4      3125626880      3907028991   372.6 GiB   0700  Basic data partition

Command (? for help): ?
b   back up GPT data to a file
c   change a partition's name
d   delete a partition
i   show detailed information on a partition
l   list known partition types
n   add a new partition
o   create a new empty GUID partition table (GPT)
p   print the partition table
q   quit without saving changes
r   recovery and transformation options (experts only)
s   sort partitions
t   change a partition's type code
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

Command (? for help): r

Recovery/transformation command (? for help): ?
b   use backup GPT header (rebuilding main)
c   load backup partition table from disk (rebuilding main)
d   use main GPT header (rebuilding backup)
e   load main partition table from disk (rebuilding backup)
f   load MBR and build fresh GPT from it
g   convert GPT into MBR and exit
h   make hybrid MBR
i   show detailed information on a partition
l   load partition data from a backup file
m   return to main menu
o   print protective MBR data
p   print the partition table
q   quit without saving changes
t   transform BSD disklabel partition
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

Recovery/transformation command (? for help): g

MBR command (? for help): ?
a   toggle the active/boot flag
c   recompute all CHS values
l   set partition as logical
o   omit partition
p   print the MBR partition table
q   quit without saving changes
r   set partition as primary
s   sort MBR partitions
t   change partition type code
w   write the MBR partition table to disk and exit

MBR command (? for help): p

** NOTE: Partition numbers do NOT indicate final primary/logical status,
** unlike in most MBR partitioning tools!

** Extended partitions are not displayed, but will be generated as required.

Disk size is 3907029168 sectors (1.8 TiB)
MBR disk identifier: 0x00000000
MBR partitions:

                                                   Can Be   Can Be
Number  Boot  Start Sector   End Sector   Status   Logical  Primary   Code
   1                  2048   1562505215   primary     Y        Y      0xAF
   2            1562505216   2888654847   primary              Y      0xAF
   3            2888654848   3125626879   primary              Y      0xAF
   4            3125626880   3907028991   primary              Y      0x07

MBR command (? for help): w

Converted 4 partitions. Finalize and exit? (Y/N): y
Warning: The kernel may continue to use old or deleted partitions.
You should reboot or remove the drive.
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.

That's it, Drive is fully restored. Insane.


Remotely working on iMac, but with screen darkened

You might be overlooking a simpler solution: throw a sheet/blanket/whatever over the display before you walk out of the room.


iPhone 3G cannot be charged while 3GS is charged

I had the same problem, i had 3GS and de car adapter i am using is from philips, my collegeau with a 3G couldn't charge. After buying a new car adapter, it solved the problem.


I think my iphone 5's battery have some problem.

Apple has a battery replacement program for iPhone 5. You can check eligibility on this Apple page

  Apple has determined that a very small percentage of iPhone 5 devices may suddenly experience shorter battery life or need to be charged more frequently. The affected iPhone 5 devices were sold between September 2012 and January 2013 and fall within a limited serial number range. (...)

  The program covers affected iPhone 5 batteries for two years after the first retail sale of the unit or until March 1, 2015, whichever provides longer coverage.


Any way to recover photos from a restored iPhone?

Since you didn't link your photos to anything online, you may be able to go to a data recovery specialist and ask them to try to recover the photos, but it probably won't work (Depends on how large your backup is).

If you don't do that or that doesn't work, then you can't get your photos back anymore.


Cannot resize APFS partition - "The new size must be different than the existing size"

For me it looks like you need to resize the container first. So something like

$ diskutil apfs resizeContainer /dev/disk0s3 500g

should help to avoid the error message you get on your second try.

I've got not much knowledge about the diskutil, but as far as I know Apple software overall, this seems to be the step you are missing here.


Reinstall macOS Mojave on MacBook Pro with Windows installed

Is it possible and very simple to reinstall macOS Mojave on your MacBook Pro. An easy approach would be to perform the Internet recovery. Using Internet recovery, your MacBook Pro connects to Apple's servers, and download and install macOS over the Internet.

To learn more about installing macOS via Internet Recovery, you can follow the instructions in the Apple Support document:

How to reinstall macOS from macOS Recovery


Clean install a Macbook without another Mac

This is an interesting situation.  If you have access to an Apple Store, I suspect that going to them would be the easiest way to resolve the problem.  Otherwise, if you have access to a Mac even temporarily, you should be able to sign in on the App Store using your Apple ID, and purchase Mountain Lion that way.  From here, I'm not sure if you'll be able to install Mountain Lion using Internet Recovery, because it is likely for Lion and not Mountain Lion (and I don't know if the Lion Internet Recovery supports Mountain Lion), however, from here, if you download the image, there are various tutorials that you can follow to either burn the installer to a DVD, or copy it to a USB flash drive, for instance: http://lifehacker.com/5928780/how-to-burn-os-x-mountain-lion-to-a-dvd-or-usb-flash-drive

As these are not officially supported solutions, my suggested option would be a visit to an Apple store.


How can I move the newstand app into a folder?

You can't.  Perhaps unless you jailbreak your device first.


I have not tried it myself, but I read in a review that they intentionally made it harder to accidentally remove icons from the Dock.

Trying dragging the icon a good distance away from the dock and holding it there for a couple seconds, it should show you some kind of "about to poof this" indicator, and then drop it.

At least, that's what I got from the review I read.


You need to read this. Unfortunately, it is completely illegal, and almost impossible, unless you are off the contract. If you are currently off the contract, see this.


Questions about permissions, specifically across machines

First some important commands to know:

ls -laO shows a lot:

drwxrwxr-x+ 19 myuser1  staff   714  2 Feb 10:31 My Passport

ls -elaO includes ACLs:

drwxrwxr-x+ 19 myuser1  staff   714  2 Feb 10:31 My Passport
  0: user:_spotlight inherited allow list,search,file_inherit,directory_inherit

The following command shows all members of a group (the example group here is staff):

members () { dscl . -list /Users | while read user; do printf "$user "; dsmemberutil checkmembership -U "$user" -G "$*"; done | grep "is a member" | cut -d " " -f 1; }; members staff

The following command shows the UID, the GID and the group memberships of user_name

id user_name

Please check your various users/groups with the last two commands to get an overview.

Standard permissions in the file system are applied by using UID and GID instead of names. So

drwxrwxr-x+ 19 myuser1  staff   714  2 Feb 10:31 My Passport

should be read as (assuming myuser1's UID=501):

drwxrwxr-x+ 19 UID=501  GID=20   714  2 Feb 10:31 My Passport
 |  |  |
 |  |  |Others (Members of GID=12 (Everyone)?) can read and execute
 |  |Members of GID=20 can read, write and execute
 |UID=501 can read, write and execute (owner)

Attaching My Passport to another Mac (Mac2) - the UID/GID won't be changed - will reveal the following:

In case myuser2's UID=501 and GID=20 (GID=20 (staff) is a standard group on every Mac and every (standard or admin) user created with the System Preferences is member of it)

drwxrwxr-x+ 19 UID=501  GID=20   714  2 Feb 10:31 My Passport

which retranslates to:

drwxrwxr-x+ 19 myuser2  staff  714  2 Feb 10:31 My Passport

and myuser2 on Mac2 has the same rights as myuser1 on Mac1
In case myuser2's UID=502 and myuser3's UID=501 and both are member of staff:

drwxrwxr-x+ 19 myuser3  staff  714  2 Feb 10:31 My Passport

myuser2 as member of staff isn't owner anymore but can still rwx.
In case myuser2's UID=502 and is member of staff and myuser3 with UID=501 has been deleted:

drwxrwxr-x+ 19 (unknown user)  staff  714  2 Feb 10:31 My Passport

myuser2 as member of staff isn't owner anymore but can still rwx.
In case myuser2's UID=503 and is not member of staff and UID=501 is deleted

drwxrwxr-x+ 19 (unknown user)  staff  714  2 Feb 10:31 My Passport

myuser2 as others (member of everyone?) can rx.

So to answer your questions: the reason why myuser2 on Mac2 has the same rights as myuser1 on Mac1 are the same UID and GID/group memberships of both on their respective host. Staff is a default group on every Mac.

In your current environment (single machines/admin rights for the main user(s)) using external drives is not "secure/save" - only using permissions to determine access. And it was never meant to be.

In an organizational unit (the common user of a workstation is no admin) with a centralized user management (OD etc.) you may use applied mount points and special groups do deal with external drives:

Special owner and a new group for the drive/mountpoint:

drwxrwx--- 19 UID=501  GID=512   714  2 Feb 10:31 My Passport

or

drwxrwx--- 19 UID=501  GID=512   714  2 Feb 10:31 My Passport/share_folder

and all non-admin users which require access to the external drive(s) are member of GID=512 ("External Drive Users")

Still, when the external drive is lost, anyone may have access to it. To make it secure you have to encrypt the content of the external disks.


How can I use the TrackPad's force touch as copy paste function in terminal?

Check out BetterTouchTool. This application will let you customize  actions based on trackpad gestures (including Force Touch).

Here is the action I have defined:

With this setting, I can select text in an application (this works well in Terminal and iTerm), and without explicitly copy/pasting, paste with a 3-finger force-click.


How can I schedule sending the day’s iCal events via email?

The easiest way to schedule a workflow is to use iCal for the scheduling: if you have followed the steps of the tutorial you linked to to the letter and have saved the workflow as an iCal reminder, Automator will have added a new event named like your workflow to a local calendar called “Automator” (creating it if it does’t exist yet). This event has a reminder set to execute the workflow 0 minutes before the event.

To execute it every day on 4 a.m., just schedule the event that way (you could also set it to only repeat on weekdays – or to anything iCal will let you do with a scheduled event). To make sure the triggering event itself is not included, make sure the “Filter iCal Calendar” action (the 1st step of your workflow) excludes the “Automator” calendar – either because filter conditions will bypass it anyway, or by setting a filter condition to “Name is not Automator”.

You can hide the “Automator” calendar from displaying in iCal by unchecking its checkbox in iCal’s calendar list, thus making your workflow execute invisibly for all practical purposes. Also note iCal does not need to run for the event to be triggered, but you must be logged in and the computer should not be sleeping (a workaround for that last gotcha is to set the machine to wake up shortly before the scheduled time in Power Saving System Settings – this would also be necessary if you scheduled with launchd or cron). The actual workflow is to be found in ~/Library/Workflows/Applications/iCal and can be set to a “open file” reminder on any event, should you ever need to do so.


OSX 10.9 Mavericks VirtualBox unable to use Bridged Networking

I've found a temporary solution.  It appears that on reboot not all the kernel extensions are loaded correctly.  However a restart of the VirtualBox startup item seems to resolve this and I can then start the machines.

sudo  /Library/StartupItems/VirtualBox/VirtualBox restart

Is the line that works for me, sometimes I have to run it twice.


could you force install OSX Mavericks onto a Apple MacBook A1181 early 2008 model if running snow leopard or mountain lion osx

To install Mavericks, you need one of these Macs:

iMac (Mid-2007 or later)
MacBook (13-inch Aluminum, Late 2008), (13-inch, Early 2009 or later)
MacBook Pro (13-inch, Mid-2009 or later),
MacBook Pro (15-inch or 17-inch, Mid/Late 2007 or later)
MacBook Air (Late 2008 or later)
Mac mini (Early 2009 or later)
Mac Pro (Early 2008 or later)
Xserve (Early 2009)

Your Mac also needs:

OS X Mountain Lion, Lion, or Snow Leopard v10.6.8 already installed
2 GB or more of memory
8 GB or more of available space

There are some attempts reported how to Force Install on non compatible models, but the result is more of a waste of time then a working computer.


Is it possible to use a gesture to go back in Finder?

UPDATE

It looks like this has been broken in Mac OS X 10.9 (and wasn't fixed in 10.9.1)

This works again in the latest Mac Os X 10.10.1, and presumably also in 10.10.

Trackpad
Three-finger swipe left goes back and forth in Finder, just like in Safari.
You don't need 3rd party software to do this, simply make sure your settings are correct.

Go to System Preferences via Spotlight or Launchpad, navigate to Trackpad and click the tab More Gestures. The first option is "Swipe between pages", which enables swiping in Finder, Chrome etc. Make sure to choose one of the two Swipe options.

I've attached an image showing the screen for you here:

Make sure that you've chosen Swipe left or right with four fingers in the Swipe between full-screen apps so the two options don't overrule each other.

You also want to make sure there is no checkmark in the Three finger drag. They are mutually exclusive. You can check this in the Point & Click tab.

Magic Mouse
If you use a Magic Mouse and want to be able to swipe back and forth in Finder, you have to turn off the Swipe between full-screen apps and change Swipe between pages to either Swipe left or right with two fingers or Swipe left or right with one or two fingers (both options enables you to swipe back and forth in Finder when using both fingers.


How do I run a jar when I double-click it?

You can prepend a short script to the .jar to make it executable via double click. In Terminal do the following:

$ cat > header-template <<"EOF"
#!/bin/sh

exec java -jar $0 "$@" > /dev/null

EOF
$ cat header-template "System FRONT.jar" > executable_app
$ chmod +x executable_app

Double-clicking executable_app should now launch the application.

Why does this work in the first place? Well, a .jar is just a .zip archive which gets unpacked and executed by java. And the zip format allows to prepend additional stuff in front of the actual archive. Any zip unarchiver skips this part until it finds the start of the archive (indicated by PK...).


If you have 127.0.0.1 localhost in /etc/hosts you also need to add a ::1 localhost line.

You may find that the delay has something to do with resolving the name 'localhost'. If you use 127.0.0.1 instead, the delay should be reduced to milliseconds.

$ time dig @127.0.0.1  muc.de

;; Query time: 10 msec

real 0m0.029s
user 0m0.007s
sys 0m0.005s

I don't know where the resolution of 'localhost' occurs or why it takes such a long time, but I guess it doesn't really matter...


It sounds like the previous owner left the Activation Lock turned on. You will need to turn the device off and then the pre-owner can turn it off via iCloud.com

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