Music app only shows an outdated music library after I've retrieved it from backup

Thanks to Apple Support I was able to solve it. If you haven't saved your music library in iCloud, you need to retrieve the iTunes folder from your backup (or generally the one where all your songs are saved) and another folder in the same directory, Music, which should contain a single file, Music Library, that's up to date.
Close the Music app (if it was open) and reopen it while pressing the option key (alt). Navigate to the above-mentioned file Music Library and you've got your latest library back.


iTunes cannot sync photos to the iPhone because your iPhoto library is not yet available

After restarting both iPhoto and iTunes a few times and trying it again, eventually I decided to (1) delete the previously imported photos on iPhoto:

Since I didn't want to delete them, (2) I created a new album with them and, once back to iTunes, (3) checked the new album to be sync'ed back to the iPhone.

It worked!


No. You need to manually cancel the download upon purchase.


Will Mountain Lion's Time Machine read data from a NAS and back it up to an external USB drive?

While Time Machine always backs up all mounted volumes connected to the Mac via USB/FireWire/Thunderbolt, it can't backup network volumes like a NAS.

As it seems, this is not mentioned anywhere in Apple's support documents, but here's a good Time Machine FAQ made by a user.


If you're absolutely sure that you have SYnced the phone and the app is still not there, you can try to remove it from iTunes too. Then you go to the App Store (make sure you are logged with the SAME account you were when you bought it for the first time) and buy it again, the store will inform you that it's "a free upgrade" and will re-download it. It will not charge you again.


How to set a default font for outgoing messages in Mail on Lion

Mail has lacked the ability to set a default outgoing font via its Preferences since at least 10.4.  Users who really need this, often switch to Outlook/Entourage or Thunderbird. There are also some plugins, such as Universal Mailer or Message Font that can do this.


10.7.3 - Screensaver turns on while I'm in the middle of typing/mouse activity

According to Apple Support:

  If you use a screen saver, it starts automatically after your computer
  is inactive for a time. You can also choose a shortcut so your
  screen saver starts when you move the pointer to a corner of the
  screen.

  Choose Apple menu > System Preferences, click Desktop & Screen Saver, and then click Screen Saver.
  Open the Screen Saver pane of Desktop & Screen Saver preferences
  Click Hot Corners. Choose Start Screen Saver or Disable Screen Saver from the pop-up menu for a corner you want to use; and
  then click OK. To use the Command (⌘), Control
  (^), Option (⌥), or Shift (⇧) key
  together with a hot corner, press the key while the pop-up menu is
  open. For example, if you press the Shift key, the Start Screen Saver
  command changes to ⇧-Start Screen Saver.

  To deactivate the screen saver and return to the desktop, press any
  key or move the mouse.

Additional screensaver configuration options for Lion are listed in this Apple Support KB.

This issue could definitely be a bug, but you could also check your screensaver configuration to determine whether you've turned on hot corners - it's possible that your mouse pointer may have triggered the screensaver. You can also choose to disable screensavers completely to avoid this issue.


Swipe up/down on window top to maximize/resize to default size

Update: I find the app! It is HyperDock. There is a feature in the window management: Scroll a window's title to snap & change space and that's it!

An alternative way is using Better Touch Tool:
I set Command as the modifier key and touch gestures same as the question description. As Better Touch Tool doesn't seem to have the option like "triggering the gesture when the cursor touches the empty spot of the window", it will conflict with the default scrolling up and down easily if you don't add a modifier key...


How can I solve this BootCamp partition mess I've created?

Boot to Internet Recovery Mode
Open Terminal in the menubar > Utilities
Enter diskutil list to get the disk identifiers of your internal SSD (probably disk0), HDD (probably disk1) and the CoreStorage volume (probably disk3 or disk4 - apply the disk identifiers below according to the findings in your environment)
Now remove the seven partitions on the HDD with gpt:

diskutil umountDisk disk3 #the device identifier of the CoreStorage volume
diskutil umountDisk disk1 #the device identifier of the HDD
diskutil umountDisk disk0 #the device identifier of the SSD
gpt remove -i 9 disk1 #the device identifier of the HDD

Repeat the above steps six times but lower the index number (-i) by one in each step:

diskutil umountDisk disk3 #the device identifier of the CoreStorage volume
diskutil umountDisk disk1 #the device identifier of the HDD
diskutil umountDisk disk0 #the device identifier of the SSD
gpt remove -i 8 disk1 #the device identifier of the HDD

...

diskutil umountDisk disk3 #the device identifier of the CoreStorage volume
diskutil umountDisk disk1 #the device identifier of the HDD
diskutil umountDisk disk0 #the device identifier of the SSD
gpt remove -i 3 disk1 #the device identifier of the HDD

Resize the CoreStorage stack:

diskutil cs resizeStack lvUUID 2120g

with lvUUID: the UUID of your Logical Volume (8DC64131-3881-4971-B870-2FB6BFB58EDB)
Reboot to your main volume
Reinstall your current system to recreate your missing RecoveryHD or use this tool Recovery Partition Creator

Instead it should also be possible to merge all partitions (disk1s3-disk1s9) to free space and expand the CS LV then without booting to Internet Recovery Mode (untested):

diskutil mergePartitions Free Space disk1s3 disk1s9

Then reinstall your current system to recreate your missing RecoveryHD or use this tool Recovery Partition Creator


How can I best configure this hard drive?

You can partition the 2nd drive leaving ample room for the system software. Then you can install the system onto the 2nd drive or clone drive 1 onto drive 2 and have a backup of everything on drive one. Cloning allows you to use the 2nd drive as a startup drive. The downside to cloning is that you copy the entire contents from drive 1 to drive 2.  Installing the system software avoids this problem. But as @Steve Chambers said, if you just install the system and hard drive 1 fails, you need some way to get the data off drive 1. If you clone you have the data from disk 1. But it will become dated the longer you use disk 1. I'd suggest you install just the system on Disk 2 and you should be able to use the other partition for whatever you need.


None of the current answers will upgrade Xcode git. They will only install a newer version of git.
Xcode has changed its mind several times about the best git location. Depending on how long ago you have been installing Xcode you will see git binaries at:
/usr/bin/git
/usr/local/git
/Applications/Xcode.app/Contents/Developer/usr/bin/git
/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git

Even if you update the PATH, Xcode will stick to its version. The only way I know to force it to use the newer version is replacing those git binaries by a link to the new one you installed.
ln -s /opt/local/bin/git /usr/bin/git

Repeat for the other path. Notice I use a symbolic link, not a hard one. Otherwise Xcode would replace your other installation during an upgrade


On your Mac:

Open System Preferences > iCloud
Check the box next to "Keychain"

On an iPad:

Settings > iCloud > Turn Keychain On

If you don't have any phone that can receive SMS it looks like you will need to call Apple Support to activate iCloud Keychain.


Use tcpdump -I. -I will put the chosen interface into monitor mode, and doesn't need to be connected to an access point.

The full command would be (if your Wi-Fi interface is en0):

sudo tcpdump -Ii en0


My iPhone is showing an orange dot in the status bar every time I make a phone call

Your iPhone has been updated to run iOS 14.
iOS 14 has introduced a new privacy feature which causes an orange dot  indicator to appear in the iPhone status bar when the device microphone is used by an app. Additionally, if an app is accessing the device camera, a green dot  is shown in the status bar.
The feature is also available on iPads running iPadOS 14.
You can learn more about it in the Apple Support document here:

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

If you see orange or green indicators in the status bar
With iOS 14, you might see an orange or green indicator in the status bar on your iPhone. These indicators appear when the microphone and/or camera are being used by an app.

An orange indicator  means the microphone is being used by an app on your iPhone.

A green indicator  means either the camera or the camera and the microphone are being used by an app on your iPhone.

This is intended to let the user know that an app is using the device microphone or camera, and to check against any unintended access to the microphone or camera.
To determine which app is accessing the microphone or camera, you can open Control Center to see the name of the app:
Microphone:

Camera:

Can I remove it?

This features is enabled by iOS and is turned on by default. It's not possible to disable it.


Does anybody know what the ARP cache timeout is for macOS Sierra?

There's no standard time out value for routes stored in an arp table.  For instance, on Cisco gear, it's 4 hours.

The arp utility that macOS uses is the one from BSD and it's time out is 20 minutes if the host has been validated. Static entries don't time out, but can be over written by network traffic.  Permanent entries also do not time out and cannot be over written.


I'm looking for a copy utility for OS X that will tell me exactly what is being copied at the moment as well as what has been completed already

If you are comfortable using the Terminal.app for copying files instead of finder, the cp (copy) command has an option to show the files being copied.  The list of previously copied files would be displayed.  The "-v" option stands for "verbose".

$>  cp -vr Messages /tmp/Messages
Messages -> /tmp/Messages
Messages/118942.emlx -> /tmp/Messages/118942.emlx
Messages/122810.emlx -> /tmp/Messages/122810.emlx
Messages/126942.emlx -> /tmp/Messages/126942.emlx
Messages/127552.emlx -> /tmp/Messages/127552.emlx
Messages/133765.emlx -> /tmp/Messages/133765.emlx
Messages/133912.emlx -> /tmp/Messages/133912.emlx
Messages/134148.emlx -> /tmp/Messages/134148.emlx
Messages/43442.emlx -> /tmp/Messages/43442.emlx
Messages/43443.emlx -> /tmp/Messages/43443.emlx
Messages/51858.emlx -> /tmp/Messages/51858.emlx
Messages/51859.emlx -> /tmp/Messages/51859.emlx
Messages/51860.emlx -> /tmp/Messages/51860.emlx
Messages/51861.emlx -> /tmp/Messages/51861.emlx
Messages/86518.emlx -> /tmp/Messages/86518.emlx
Messages/86905.emlx -> /tmp/Messages/86905.emlx
Messages/9164.2.emlxpart -> /tmp/Messages/9164.2.emlxpart
Messages/9164.emlx -> /tmp/Messages/9164.emlx
$>


How to burn Windows compatible CD on Mac OS X Mountain Lion

From http://support.apple.com/kb/PH10699?viewlocale=en_US (it applies to OS X 10.8 "Mountain Lion"):

  You can burn files to a CD or DVD and then use that disc as a backup,
  send it to friends, or copy the files on it to another computer.
  Discs you burn on your Mac computer can also be used on Windows computers and other types of computers.

You just have to follow the instructions in there. If you prefer, you can read more detailed instructions here: http://www.dummies.com/how-to/content/burn-cds-and-dvds-on-the-fly-in-mountain-lion.html

Both guides come down to this:

Insert a blank CD.
When the disc appears on your desktop, double click it and drag the files you want to burn into the window.
Then press the "Burn" button in the top right corner of the window, change disc name to something that makes sense to you and press OK.

Make sure you choose a CD type that can be read on your Mac and your Windows machine. For instance, check that CD speed and capacity are supported by both optical drives.

If you wish to reuse a disc (CD-RW/DVD-RW/DVD+RW) you have to erase it first using Disk Utility. See http://support.apple.com/kb/PH5849 for more information.


Moving from original iPad to new iPad (2012): Is a cover like Apple's black one available for the new iPad?

Targus is advertising iPad 3 cases and one of their portfolio style cases may suit you.

Many iPad 2 cases will work with the new model. Although I haven't tested any of these on a new model iPad, you might consider:

iLuv Portfolio Case with Stand

Filemate Imagine series smart cover

Beyond that, a search for iPad portfolio will produce a multitude of choices.


Is it possible to get macOS running in a Docker container?

Yes you can run macOS in a Docker Container: https://github.com/sickcodes/Docker-OSX
It has very low overheads because it's all real KVM nested virtualization.
I have stress tested it and the minimum requirements is about 2.5GB of RAM per container. The Docker container is Arch but it has very low overheads.
Make your own container:
# Catalina
docker run -it \
    --device /dev/kvm \
    -p 50922:10022 \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    sickcodes/docker-osx:latest

# Big Sur
docker run -it \
    --device /dev/kvm \
    -p 50922:10022 \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    sickcodes/docker-osx:big-sur

Or if you want to fast-track, or use CLI only, you can boot straight into a real headless MacOS command line using :auto
docker run -it \
    --device /dev/kvm \
    sickcodes/docker-osx:auto

You'll drop into the Darwin shell.
Extra options:
Visual display:
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    -v /tmp/.X11-unix:/tmp/.X11-unix \

Add SSH:
    -p 50922:10022 \

Change resolution
    -e GENERATE_UNIQUE=true \
    -e WIDTH=800 \
    -e HEIGHT=600 \


To know which shell are you using, use the following command:

$ echo $SHELL

It will return something like:

/bin/bash

or

/bin/zsh

After you know the shell, if the file .bashrc or .zshrc doesn't exist in your home directory (echo $HOME to find out), just create it.

If you are using bash, you may have a file called .bash_profile where you can put your export command instead (don't know in zsh).


Second monitor - Dell and iMac 27 5 Retina

Your iMac can support up to two displays at 4096 by 2160 pixels, or one display at 5120 by 2880 pixels.

In other words, to use the second display in addition to the built in display they both need to run at 4K. You can't run them both at 5K.

Your iMac's Thunderbolt digital video output also supports up to two Thunderbolt displays, but these must also be run at 4K.

You can view the full specs here.


Display playlist by album instead of by song on iPhone

Unfortunately you can't do this on your iPhone, but on a mac when you select the playlist you can go to the top right corner and change it from songs to albums for them to be sorted by album.


iTunes 12.5+ plist setting for View As -> Songs by default?

I don't know how to change the default view mode for new playlists, but you can run a script like this in Script Editor to change the view mode of all existing playlists:

tell application "iTunes"
    user playlists whose special kind is none and smart is false
    repeat with p in result
        set view of browser window 1 to p
        tell application "System Events" to tell process "iTunes"
            click menu item "Songs" of menu 1 of menu item "View As" of menu 1 of menu bar item "View" of menu bar 1
        end tell
    end repeat
end tell

I use a script like the one below to create most new playlists. It requires GNU xargs and readlink which you can install by running brew install findutils coreutils.

osascript -e'on run {a}
    set l to {}
    repeat with f in (get paragraphs of a)
        set end of l to POSIX file f
    end repeat
    tell application "iTunes"
        if number of l is 1 then
            tell application "Finder" to set n to name of (item 1 of l as alias)
            delete playlists whose name is n
            set p to make new user playlist with properties {name:n}
        else
            set p to make new user playlist
        end if
        with timeout of 0 seconds -- don't exit with an error if the add command takes over 20 seconds
            add l to p
        end
        set view of browser window 1 to p
        tell application "System Events" to tell process "iTunes"
            click menu item "Songs" of menu 1 of menu item "View As" of menu 1 of menu bar item "View" of menu bar 1
        end tell
    end tell
end run' "$(printf %s\\n "${@-$(cat)}"|gxargs -rd\\n greadlink -f)"

If the System Events application is not on the list of applications in "System Preferences > Security & Privacy > Privacy > Accessibility", the script above results in an error like this: 636:751: execution error: System Events got an error: osascript is not allowed assistive access. (-1719).


How can I disable Intel Turboboost and Hyper-Threading?

I found a way to do this. It does result in a 40% performance drop.

Apple has documentation that disables Hyper-Threading with the following:
Boot into macOS Recovery
In Terminal: nvram boot-args="cwae=2" and nvram SMTDisable=%01
Click  and Restart.

To revert this, reset the NVRAM.

Here is the official documentation: https://support.apple.com/en-gb/HT210108


After a while, the trackpad or mouse requires me to click twice to be able to register a single click

After some testing, I realized that this only seems to happen after I have opened the application "mumble" (a VOIP app). There's also a discussion about it on the sourceforge forums. Here's a link to the sourceforge discussion about this same issue: http://sourceforge.net/projects/mumble/forums/forum/492607/topic/4886530/index/page/1


Can I charge my iPod Nano 2012 with the iPad USB plug?

The short answer is yes. The rule of thumb when dealing with DC power adapters is to ensure that the polarity and voltage matches and that the adapter can supply at least as much current as the electronic device requires. Incorrect voltage or mismatched polarity can damage an electronic device; insufficient current will only result in insufficient power to operate or charge the device.

However, all USB power sources provide 5 volts regardless of whether they are ports on your computer or AC chargers, and both the USB port and Dock Connector are standardized in terms of polarity and can only be plugged in one way. Therefore, your iPad, iPhone and iPod models all use the same voltage and the iPad and iPod adapters supply the same voltage, as do your computer’s USB ports and third-party USB power adapters. Basically, if it’s a USB device, it’s always 5 volts.

However, although all USB devices run at the same voltage, some like the iPad require more power (wattage) than others. Since power is a factor of voltage and current (amperage), and the voltage in this case is a constant, then the charger must be able to supply more current to meet the increased demand for power. In the case of the iPad, the USB charger is able to provide 2.1A of current (or 10W of power); by comparison, standard computer USB ports normally provide only 0.5A (2.5W), and most USB chargers provide between 1A (5W) and 1.5A (7.5W). Some computer USB ports can provide up to 1.5A expressly for charging purposes, and modern Macs can even provide the 2.1A required for iPad charging on at least some of their USB ports.

Regardless of the current available, however, electronic devices only draw as much as they need. This means that if you connect an iPhone or iPod to an iPad charger, it will still only draw around 1A of current—the charger effectively runs at a lower power level, supplying 5W of charging power. Conversely, when you connect an iPad to an iPhone charger, it will try to get a full 2.1A, but won’t be able to as the charger is only capable of supplying 1A. This results in a considerably slower charging time as the iPad is effectively draining the battery as fast as it can be recharged.

The bottom line is that you can plug any USB device into any USB charging port without having to worry about damaging anything. It’s worth noting, however, that many cheaper USB charging accessories do not properly comply with the USB Battery Charging Specification and as a result many electronic devices—including the iPad, iPhone and iPod—will not detect these as valid chargers and will refuse to draw any power at all. This will still not harm anything, however—they simply won’t work.

Now I did not wrote this myself so the credits go to ilounge
You'll find the article here


Is there a way to automatically format/delete my SSD after x failed login attempts?

With on-board tools (and without using external services like "Find my Mac" & "Erase my Mac remotely" via iCloud) it's impossible to erase or reformat the boot volume with diskutil ... because the disk is busy.

You can remove your user folder though:

The method below uses a password policy and depending on the state of the user login capabilities, a launch daemon and a bash script invoked by the daemon will remove the user folder.

Create a password policy plist on your desktop:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>policyCategoryAuthentication</key>
    <array>
        <dict>
            <key>policyContent</key>
            <string>(policyAttributeFailedAuthentications &lt; policyAttributeMaximumFailedAuthentications) or (policyAttributeCurrentTime &gt; policyAttributeLastFailedAuthenticationTime + autoEnableInSeconds)</string>
            <key>policyIdentifier</key>
            <string>com.apple.maximumFailedLoginAttempts</string>
            <key>policyParameters</key>
            <dict>
                <key>autoEnableInSeconds</key>
                <integer>31536000</integer>
                <key>policyAttributeMaximumFailedAuthentications</key>
                <integer>10</integer>
            </dict>
        </dict>
    </array>
</dict>
</plist>

The user login capabilities will be disabled after 10 failed login attempts for 31536000 seconds (=one year).
Create a bash script rmuserdir.sh:

#!/bin/bash

PWPOL=$(pwpolicy -u username authentication-allowed)

if [[ $PWPOL == 'User <username> is not allowed to authenticate: Failed global policy "com.apple.maximumFailedLoginAttempts"'  ]]

then rm -fR /Users/username

fi

in /usr/local/bin/ and make it executable. Replace the string username with your user's name but keep the angle brackets in the if statement!
Create a launch daemon org.userdirrm.plist in /Library/LaunchDaemons/ with the content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>org.userdirrm</string>
    <key>ProgramArguments</key>
    <array>
        <string>/bin/bash</string>
        <string>/usr/local/bin/rmuserdir.sh</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>StandardErrorPath</key>
    <string>/tmp/org.userdirrm.stderr</string>
    <key>StandardOutPath</key>
    <string>/tmp/org.userdirrm.stdout</string>
    <key>StartInterval</key>
    <integer>60</integer>
</dict>
</plist>

File owner and group has to be root:wheel and file permissions have to be 644. The daemon will run every 60 seconds. You can tweak this by changing the integer in the key StartInterval.
Import the password policy:

pwpolicy setaccountpolicies ~/Desktop/pwpolicy.plist

You have to enter your (authenticator=admin) password.
Launch the daemon:

sudo launchctl load /Library/LaunchDaemons/org.userdirrm.plist

You can test the set-up by creating a stub user, changing the username in the bash script temporarily and entering wrong passwords trying to login with this stub user. You can lower the number of failed login attempts to 3 in the password policy temporarily to shorten the test.

Tweaks:

adding the (rm) -P option in the shell script:

  Overwrite regular files before deleting them.  Files are overwritten three times, first with the byte pattern 0xff, then 0x00, and then 0xff again, before they are deleted.

trying to remove the root folder instead of your user folder:

rm -fR /

or

rm -fRP /

SIP protected files won't be removed/overwritten! To remove/delete/overwrite them also, you have to disable SIP.
try to get the binary srm from an older OS X install, add it to High Sierra and use it in the bash script instead of rm. The binary srm securely removes files or directories. Check man srm for further options (I haven't tested this).

In my opinion the method outlined above can be circumvented by booting to Single User Mode, launching the opendirectoryd with launchctl (after the obligatory file system check and mounting the boot volume to /) and removing all password policies with pwpolicy -clearaccountpolicies.

Therefore formatting or erasing disks or folders to "gain security" isn't recommended. Instead encrypt your main volume with FileVault2 and use good passwords for all users.


how to place file inside /sbin/ in MAC 10.11 during .pkg installation

wim-deblauwe's comment links to Release & Renew DHCP from the Command Line with ipconfig which shows how to do this:

  The basic syntax to renew DHCP lease from the command line with
  ipconfig is as follows:

sudo ipconfig set (DEVICEINTERFACE) DHCP

  If you know the device interface (en0, en1, en2, etc), just run that
  command to release and then renew DHCP for the determined device.
  Let’s say it’s en0, standard for modern Macs with wi-fi only.

sudo ipconfig set en0 DHCP

Do not use setuid on OS X. This approach is considered a security risk and Apple appears to be working to invalidate any justification for it.

Any script or tool you create will need to acquire the appropriate authorisation rights before calling the related API.


No, there's no way you can tell from the Home screen.

One way to ensure you delete the correct one is to start the app and look at the title.

Another way is to move one of them to a folder and then do a Spotlight search. Spotlight will show you the full name (up to the 30 or 50 character limit, I don't recall the actual number right now) as well as the folder name if it's in a folder.


Writing EOF (End of File) on Windows 7 with bootcamp

In Windows, use Ctrl+Z to enter an EOF. If you're not on an empty line, you'll need to press that shortcut twice, once to flush the buffer of the current line, and the second to send the actual EOF.


How to completely erase the Photo Library on an iPhone?

Photos and videos shared through MMS or iMessage take up space. You can delete these to reclaim space from Messages.

Source: http://forums.everythingicafe.com/threads/iphone-camera-roll-empty-but-storage-2gig.105115/#post-1047178


is there free OS X equivalent to Total Commander?

TotalFinder became a commercial solution not long ago: the full beta development stage was free and gave me plenty of time to test the software. It's an excellent solution, and I have seen almost every single bug disappear progressively.

Even if not a free solution anymore, its source is available on GitHub. I would recommend it on the grounds that it already works wonderfully well, and definitely deserve some support in my (otherwise freeware-oriented) opinion.

If freeware is yet a compulsory feature for you, Geekosaur's link has a few options.

Edit, 2013-01-07: as mentioned in another answer, XtraFinder looks like TotalFinder, but free.


You can't reset the admin's password but you can create a new admin.

Essentially it's the same procedure as in this answer:

How can I get admin access to a Mac without knowing the current password?

Boot to Recovery Mode holding ⌘+R on startup
Open Disk Utility and unlock the encrypted volume. The encrypted volume is an sub-item of the internal drive and greyed out. Select it and hit mount/activate. Use the password of the standard user to unlock it.
Open Terminal from the Utilities menu and enter (to execute a typed command you have to hit the ⏎ Enter/Return key):

rm /Volumes/<main_volume_name>/private/var/db/.AppleSetupDone

Replace <main_volume_name> with the name of your main volume (usually Macintosh HD). Example:

rm /Volumes/Macintosh\ HD/private/var/db/.AppleSetupDone

Enter reboot to reboot your Mac
Login with your standard user (to unlock the disc), then follow the instructions to create a new admin user (similar to configuring a new Mac)
The new admin can't unlock the disk - the account has to be added by another admin user, because the new admin can't promote himself to a FileVault unlocker. Check this by entering in Terminal: sudo fdesetup list.
With the new admin promote the standard user to admin and reboot
Login as old standard/now admin user, open Terminal and enter

sudo fdesetup add -user exstandarduser -usertoadd newadmin

Example:

sudo fdesetup add -user lorenzoalfieri -usertoadd adminlorenzo

Then you will  be asked for passwords: first enter the password of exstandarduser to authenticate him and second the password (set in step 5) of newadmin.

Check that the new admin is added to the FV users: sudo fdesetup list
Reboot and login as new newadmin
Downgrade the exstandarduser admin to a standard user.
Clean up the old admin.
Finally create new recovery key(s): sudo fdesetup changerecovery -personal and make a (physical) note of it|them and store it at a safe place.

Resetting the admin password with resetpassword after unlocking the disk is not possible.
Changing the password of the admin with dscl after unlocking the disk is apparently not possible - the old password is still required.

Example:

dscl -f /Volumes/Macintosh\ HD/var/db/dslocal/nodes/Default localonly -passwd /Local/Target/users/<user_name> some_password


Using Applescript to make selections from dropdown menu and Apply

You can use Automator instead of debugging javascript if you prefer that option.

In Automator.app you can set it up to open a new safari tab and then you can use the record feature (red button in the toolbar) to change the dropdown menu and press the button.


Can I find just the apps which I have purchased in the App Store?

I don't know of any way to do this using the App Store.  I look through my email receipts for this information.


Is X11 installed by default on Mac OS X?

The previous answer seems to be referring to Xcode, rather than X11. While Xcode is now downloadable from the App store, X11 is installed automatically when you install Lion.

If any of your users have problems, or find it not installed on their system, they can download the installer here:

http://xquartz.macosforge.org/trac/wiki/X112.6.3


How to lock screen OSX without setting “immediately” in Security & Privacy settings

The Keychain Access App is located in the Utilities subfolder of the Applications folder.

In the Keychain Access App, open Preferences and under the General tab you can tick the box Show Keychain status in menu bar. It'll put a padlock symbol that's resident in your menu bar that when clicked will provide you with a menu, the first menu item is Lock Screen. After setting the preference you can exit the Keychain Access App.

You can select the menu item to lock your screen.


How to get a full backup of a hard disk from a dead MacBook?

Depending on your MacBook model, removing the hard drive may void your warranty, so it might be better to prediscuss this with the store or ask them for other options. They may also offer you a way that they can do the backup for you (at extra cost maybe) or give you the old hard disk back after getting your MacBook working again.


iMac won't restart after upgrade to Yosemite

Mine was showing a black screen after I updated my iMac to Yosemite.

I unplugged my USB mouse and the new Login screen was displayed.

No restart was necessary.


Turning off or restarting iPhone if lock button is broken?

You have a couple options:

Simply let the phone discharge until it turns off. Then, you can charge it again and it should turn on when it reaches a high enough battery level.
If you dare, you can reset the device's network settings which will restart it (but obviously, also clear your network settings).
You can use Assistive Touch (Settings > Accessibility) to lock and turn off the phone.

But really, you should take it into an Apple store, so they can deal with the underlying problem of your broken button!


iPhone marks first unread e-mail as read

This appears to be fixed in iOS 10 (there was a moderately large update of Mail.app).


How to use iPhone to Store and Organize Photos Outside of Photos Camera Roll

Solution for that and as a side benefit, keep the "Camera Roll" as close to empty as possible (made a little compromise to accommodate keeping media original that has effects e.g. live, animated photos).

Need a photo organizer that:

a) stores photos/videos in it's on file space on the iPhone and can make albums from that source (so that it does not rely on "Photos").

b) is able to add photos/videos to that file space from the iPhone's "Photos" and be able to load photos/videos from any source so that everything is in one place (from which albums can be made).

To keep everything in original form, no transformations, here’s a strategy that will even work on an iPhone 5.

One compromise: to preserve the ability to play "live" photos or photos with effects, leave those in "Photos" so unfortunately, that means the Camera Roll would have some media in it.  Yes, one could compromise and let "live" photos get transformed into a .jpg and an accompanying .mov file but, the goal is to not transform anything and retain the exact characteristics of how the media plays so, if that’s important to you, leave it in "Photos".   fyi "Live Photos" and "Animated" photos are identified under "Media Types" in "Photos".

Photo organizers considered: Adobe Lightroom Photo Editor, Utiful.

Adobe Lightroom Photo Editor (free version does everything required).  Lightroom copies media into itself (it's own file space) and once it's there, you make albums that references media in that file space and therefore it will not be referencing media stored in "Photos".

To aid in getting media to the iPhone, install AirMore onto the iPhone (it's free).  AirMore serves two purposes: to transfer media to the phone, to serve as a single spot to copy media onto the iPhone which Lightroom can get at and copy the media to itself.

GETTING YOUR MEDIA ONTO YOUR iPhone.

1) Media that's on a camera.  Transfer it to a computer, use iTunes or AirMore to get it onto the iPhone.  Because AirMore's file space shows up in iTune's "File Sharing", you can copy files to that app without having to use iTune's sync.  Lightroom will be able access the file space in "AirMore" to copy the media into itself.

2) Media that's on a computer.  If you like iTunes and the computer has it installed, that's an option (copy the media to AirMore via "File Sharing).  If it isn't available, then use AirMore.  Regardless, both result in the media going to AirMore's file space where Lightroom can copy it into itself.

3) Media that's on an iPhone.  Use AirMore or Airdrop.  Airdrop is ideal for a specific scenario, for transferring "Live" photos or "Animated" photos from "Photos" because using Airdrop results in a direct transfer from one iPhones "Photos" to the other iPhones "Photos" and the media's effects are preserved.

Lightroom can now copy media into itself because it can access the files in AirMore.  Copy the media and delete it once it's copied. Lightroom can copy media from the "Photos" camera roll into itself.  Delete stuff that's been copied from "Photos".

Everything is original and in one place (except live/animated photos) in Lightroom.  The camera roll is as close to being empty as it can be.  Enjoy, get going on those albums!


If you've followed all the correct processes for changing your Apple ID, including verifying your email address is correct and looking in your spam/junk folder, then your only option is to contact Apple directly.

Go to Apple's Support page and click on Talk to us.  Initiate a chat session, that's the fastest way to get this resolved.


Does plugging iPhone into speakers shorten its life span?

Plugging a set of speakers into an iPhone does not significantly shorten its life span. Not at all.

If you're worried about the connector being damaged (for example a jack connector), you could use a permanently connected extension cable. Then you can connect and disconnect the speakers as you like without wear and tear on the iPhone's connector.


Wi-Fi has stopped working around the time 10.7.3 update. Might they be related?

From what I've seen - this seems to be more a network routing issue than a hardware / link level problem. The first step is to narrow down if it's a network issue or a hardware issue.

In Finder, Shift+Command+G Go to the folder /System/Library/CoreServices and run the two Lion diagnostic tools to assist in narrowing down your problems.

Wi-Fi Diagnostics
Network Diagnostics

Once you have narrowed down the issue, you can ask a second, more detailed question on how to solve a failing step X in diagnostic Y if you still need help in getting this sorted.

This process was used (as described in the comments) to determine that Little Snitch and the existing firewall were causing the network issues.


How to manage Skim Notes within DevonThink?

In Skim preferences, select "Automatically save Skim notes backups." This will ensure that a .skim file is saved next to the PDF. Now, index the PDF & its .skim companion in DevonThink. Select the .skim file and DevonThink will show its contents, i.e. the annotations alone without the PDF.

Use the "see also" feature in DevonThink on this .skim file.


Thread crash when rendering out on evve blender 2.8

Please do these three things:

Run this command in Terminal :

/Applications/Blender.app/Contents/MacOS/Blender --debug-all >> ~/Downloads/eevecrash.txt

Try to get the crash again now.
Open blender normally again and go to Window menu > Save system Info.
Window menu > File a bug report. Attach the files to the report made in the first two steps, plus the text you've posted here.

You should also check if the following versions cause the crash:
https://builder.blender.org/download/


What most likely happened is, somehow, you clicked on a star icon which appears just to the right of the senders name. I've done this myself, more than once, thinking it was a bookmark / favorite button.

That star sets the sender as a VIP – an easy way to filter emails from important contacts, which is really what the VIP under the hood.

The reason it was empty is, I assume, because there were no Angielist emails in your inbox.

To remove, and I'm assuming you found this already, is by control-clicking on the name in the VIP list and selecting Remove VIP. Restart Mail once and the VIP sidebar item should be gone for good.


How do I restart iPad with broken power button and unresponsive screen?

If you have AssistiveTouch enabled
You can use all the physical features on your device (volume control, on/off button, etc.)
Tap on the dot that appears on your screen. On the popup, tap "Device". Press and hold "Lock Screen", then slide to power off.
Depending on what is causing your device's power button not to work, you may or may not be able to turn it on now in the traditional way by pressing and holding the power button. If that fails, connect your device using its USB cord either to a computer or to a wall socket, and it should turn on after several seconds.
Once the iPad turns on you can enable AssistiveTouch by going to Settings > General > Accessibility > AssistiveTouch (under "Interaction"), and swipe the switch to turn on AssistiveTouch.
AssistiveTouch is an accessibility feature designed for people with limited movement capacities.  For more information about AssistiveTouch, see this Apple support article.
If AssistiveTouch is not enabled
You will just have to wait for the battery charge to run out.


Stretching Keynote over multiple monitors

In your preferences, click display, arrangement, uncheck mirroring. That will extend your desktop across the two monitors. I do not believe that you can span your keynote presentation over multiple monitors the way PowerPoint can. If this is critical, a Windows machine using PowerPoint might be the easiest way ahead.


Is there a way to see connected static leases in Lion Server?

You can look at "dynamically" attributed leases with:

more /var/db/dhcpd_leases

You can look at "statically" and "dynamically" attributed leases with:

grep '\[en.\]' /var/log/system.log | more


How do I know which Bluetooth chipset is being used by the iphone?

I would like to know if the Bluetooth chip has changed between iPhone 11 series and iPhone 12 series

The chip is likely to be slightly different than last year's model due to the natural progression of technology, but the vendors are likely to be the same.  Since 5G is being rolled out, that increases the odds of the chip itself being different.
Broadcom strikes $15 billion deal with Apple to sell it iPhone parts

I would like to get mode details including the chipset manufacturer, model number etc.

A tear down is always a good source for this type of info

Apple iPhone 11 Pro Max Teardown
iPhone 12 teardown reveals simpler internal design, 5G radio details

Keep in mind it has been Apple's prerogative and practice to obfuscate this information so while you might get model numbers, you may not be able to access data sheets on these chips due to contractual agreements.


macOS Sierra Right Alt Key mapped to Ctrl

Apparently an old Karabiner installation (that however has never been used and still had the default settings) interfered even after deleting it. It was only after clearing the Trash and rebooting a few times, that the issue resolved itself.


How do I show a percentage battery indicator on the iPhone?

iOS 4 and later natively provide a setting to toggle display of remaining battery percentage in the status bar of iPhone/iPad/iPod touch.

iOS 9 and later: go to Settings app → Battery → Battery Percentage.
iOS 4 – iOS 8: The option is made available under Settings app → General → Usage → Battery Percentage

Apple Knowledge base article Show the battery percentage on your iPhone or iPad.

iPhone X cannot display the same in the status bar due to presence of the notch. To view remaining battery percentage on iPhone X, simply swipe-down from top-right corner of the device to open Control Centre to view the reading on-screen. A brief video with the action can be viewed in the CNET article iPhone X: How to view your battery percentage.

iPhone 3Gs

Instructions: "Settings > General > Usage – and toggle the Battery Percentage setting to On."

iPhone 3G

Jailbreak then install SBSettings. Select Extras & Options → Numeric Battery


Applescript text delimiter replace line to /n

Since you didn't actually say what's going wrong when you try to insert \n into your string, I had a little think and then I remembered that there's a setting in Script Editor:

So, if I'm guessing along the right lines here, I'm suspecting you currently have this option unchecked, which means that whenever you try to type an escaped line-break like "\n", Script Editor automatically replaces it with a physical line-break whilst you're editing, which then leads to your syntax error issues with JavaScript.
[ Don't forget to escape the newline character twice before sending it to your JavaScript code if doing so within AppleScript: \\n.  If you are entering it directly into the developer console inside the web browser, the single escape \n is fine. ]
So, Option 1, is to adjust this formatting setting in Script Editor.  Option 2 is to stop using Script Editor and use something like Script Debugger or Atom.


In the comments, you indicated that the problem files were on an external drive. Is it formatted as FAT (or NTFS)?

These filesystems have no concept of executable files, so the system seems to assume that everything is an executable program. Don't worry, there's nothing wrong with the file.

Why does it do this? Well, it's a permissions problem.

To see the permissions on a file, you can open a terminal, type ls -ld with a space after it, drag in your file, and press Return. The first part of the output will look like this:

-rw-r--r--

So what does all this mean?

r: read  w: write  x: execute

    -        rwx     rwx     rwx
    |       └─┬─┘   └─┬─┘   └─┬─┘
additional  user    group   world
  info     perm.s   perm.s  perm.s

Try this on some file in your home folder. You should get something like rw-r--r--. Now try something on your external drive—it's probably rwxrwxrwx.

(External drives usually don't have a concept of ownership, so even on an HFS+-formatted drive you'll get the same set in each field. Edit: I tested this on a random file and it came back with rw-r--r--. Oops.)

Fixing the problem

The proper way

If the partition the file is on is formatted HFS+ (like your system disk) or any Unix filesystem (e.g. ext4, XFS), then you can use chmod. To do this, type chmod -x into a terminal, add a space, and drag in your file, just as with ls above. Hit Return, and you should be golden.

In fact, this is always worth a shot—it's safe to try on any type of filesystem. If it doesn't work, see below.

The improper way—just hiding it

On filesystems with no concept of executable files, chmod will silently fail and nothing will happen. You can still hide this by setting an icon. To do this, Get Info on a file (⌘I) and drag a .icns file onto the icon in the top left corner. (You can also just copy and paste the icon from something else—that's probably the way to go here. If you want a custom icon, read on.)

So, how do you get this mysterious .icns file?

The easiest way is simply to open an image in Preview, select everything (⌘A), and copy it (⌘C). Then you can just paste it into the corner icon (click to select it first).

But .icns images have a hidden benefit—they can display differently at different sizes. This is great for app icons, which is their main reason for existence. If you want to make your own image do this, you can do the following:

Slightly off-topic: making your own icon images behave differently at different sizes

Collect a set of images, with sizes of 64x64 up to 1024x1024. These are for Retina displays, you'll downsize them later. Put them in a folder named whatever.iconset.
Rename each of them to icon_<halfwidth>x<halfheight>@2x.png (for example, the 64px icon would be icon_32x32@2x.png).
Duplicate each icon, halve its size, and rename it icon_<newwidth>x<newheight>.png (for example, icon_32x32.png). This can be automated with a shell script, using the sips command (run man sips for more info on using it).

You'll see that if you Quick Look preview the folder, you'll see your icon, and see how it behaves at different sizes.

Convert it to a .icns with this command: iconutil --convert icns and drag in your iconset, as with the other commands.

Associating the file type with Firefox

I don't know whether your process would have worked, but you'll need to make sure the system can see the change. You do this with lsregister:

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

Replace .../Firefox.app with the path to Firefox, or drag it into the terminal.


Run AirPort Utility 5.6.1 in High Sierra

You can do this without modifying your system.

Use something like Pacifier to extract the AirPort Utility.app and Apple80211.framework from the installer.

Then, run these two commands in Terminal whenever you want to use it (substituting the correct paths obviously):

$ export DYLD_INSERT_LIBRARIES=<path-to-older-Apple80211.framework/Versions/A/Apple80211>
$ /path-to/AirPort\ Utility\ 5.6.1.app/Contents/MacOS/AirPort\ Utility

I keep that older framework and older app in the same folder, save the following AppleScript as an app (it expects to be in the same folder too), and just double-click it to launch:

tell application "Finder"
    set base_folder to (container of (path to me) as alias)
    set base_path to POSIX path of base_folder
    set library_path to base_path & "Apple80211.framework/Versions/A/Apple80211"
    set library_exists to exists (library_path as POSIX file)
end tell

if library_exists then

    do shell script "export DYLD_INSERT_LIBRARIES=" & quoted form of library_path & "
" & quoted form of (base_path & "AirPort Utility 5.6.1.app/Contents/MacOS/AirPort Utility")

else

    display alert "Apple80211.framework could not be found" message "The library was not found in " & base_path & "."

end if

This works all the way up to Mojave.


Choose Apple menu   > System Preferences.
Click Desktop & Screen Saver.
From the Desktop pane, select a folder of images on the left, then click an image on the right to change your desktop picture.

In macOS Mojave or later, you can also choose from Dynamic Desktop images, which automatically change throughout the day based on the time of day in your location.


Display and change ratings in iTunes Mini Player

The new iTunes 11 Mini Player has the option to view and change the ratings. In the Mini Player, hover over the player to show the controls instead of the title of the currently playing song. Then click the small arrow pointing to the right - not the forward control, but the one on the left of the player, next to the album artwork. It will open a menu, where the top entry is the current rating, allowing you to both view and change the rating. Exactly what I was looking for.


Logs from Console.app are in 3 different places:

/var/log (which is actually /private/var/log)
~/Library/Logs (~ means your home directory)
And /Library/Logs

When looking for general errors, one of those locations should provide insight. Note that Console.app also shows Crash logs, and specifically lists some special log files that may not be in one of the above three directories. However, those are special purpose and won't necessarily provide any insight into the issue at hand.


Bootcamp and Windows 7 - Mounting the .iso onto a blank DVD-R

Are you burning the ISO file on to a DVD-R as a file or as a DVD image? There's a big difference between the two. Only the latter method works.

To burn a DVD from the ISO image, follow this Apple guide:

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


Does the 13-inch mid-2013 Macbook Air have a noisier keyboard than previous models?

You are not alone. I have the same model and the keyboard is also noisy. Although I get it with both typing and just brushing over the keys. I believe this is by design because a lot of people like having that tactile feel of a mechanical keyboard. While they can't get that built into such a thin computer this is their way of replicating it. Hope this helps!


How to preserve session in Safari private window mode?

If you prefer the way that Chrome works, I would suggest using Chrome on OS X. In Incognito mode, it works the way you want.


How is the Y value for the Memory Pressure graph in Activity Monitor calculated?

This is currently only a partial answer. This answer not complete until this sentence removed.

The thing about this question is that on the face of it, the Memory Pressure graph doesn't quite make sense when comparing it with what's reported in Terminal when using the command outlined by the OP:

sysctl -a vm | grep page_free && sysctl vm.memory_pressure && sysctl kern.memorystatus_vm_pressure_level

However, the problem here is that this command limits the vm values it's reporting back. In fact, there's actually 105 values in total but this command only reports the following five values:

vm.vm_page_free_target:
vm.page_free_wanted:
vm.page_free_count:
vm.memory_pressure:
kern.memorystatus_vm_pressure_level:

NOTE: Numerical values would normally appear after the colon (:), however I have not included these.

Obviously, the overwhelming majority of the 105 vm values are not part of the actual calculation that determines memory pressure, but the problem here is that the five values above are not the only ones used to calculate memory pressure.

For example, while the above output provides some of the various free values, it's not providing any of the inactive values, etc.

These values are important because the memory pressure algorithm calculates a ratio between those values, and the relationship between those values isn't apparent from the output produced by the command in the OP's question.

I think I may have some technical information that can shed more light on this. I will update this answer either way within the week.

[STATUS UPDATE]

I've been unable to find the technical information I was looking for. However, I am fairly certain I do still have it - probably on some old CDR/DVDR backups. I will update this answer once I've found it, or after I'm certain I won't find it.


Bootcamp: The startup disk does not have enough space to be partitioned

Okay, the solution is that I did not disable Time Machine and remove all backup drives first. Doing that solved the issue. So the full solution is:

Disable "Backup Up Automatically" in Time Machine System Preferences, and remove all backup drives, such that it looks like this:

Then run sudo tmutil thinlocalsnapshots / 999999999999

And try again. Optionally restart the computer and try again.


What are these “Power Events:” > “Next Scheduled Events:” that are showing up in my macOS system information?

you can use terminal command:

sudo pmset schedule cancelall

Then you can resolve it


Finder doesn't show newly created files anymore unless restarted

From the output of your df -ki command, two numbers are telling you are beyond the red frontier of safe disk use.

Look at the line terminating with / which is your main visible and used disk partition. When the columns Capacity and %iused display numbers above 90%, then any search for a new free space or free inode is a real nightmare.
To tell you the truth the internal algorithm used by the MacOS X file system switched mode and is already in fight for breath.

When these two numbers are below 50% you are in the green area, nothing to schedule, just work.
When they are between 50% and 90% you are in the red one, you should schedule your next disk or computer buy.
Between 90% and 100% you are in the black area. You are fighting against a system in survival mode. Your risk of crash is pretty high. You can't anymore trust the journaling function.
At 100% you are not anywhere.

What to do

Estimate correctly your disk need for the next three years and buy a new disk. Once installed a new disk should let you with at least these two numbers below 50%.

Or, if this is feasable, change your disk space use to suit reality:

identify and clean garbage,
make external archives.


Repartition hard drive with bootcamp on it

Yes, this is dangerous and uncertain. Just to be safe, and to plan for the worst, expect that all your partitions will be destroyed by the process, and that you may need to reformat your entire hard drive and re-partition it to the new partition scheme that you require, after which you will have to restore your Mac OS X volumes and your Windows Boot Camp partition and restore your Windows installation to that new partition.

You had better make a complete backup of every partition to external hard drives before you do anything. You can use the donation-ware utility Carbon Copy Cloner to clone your existing Mac partitions (Macintosh HD and the hidden Recovery HD) to an external hard drive formatted for Mac OS Extended (Journaled).

You should purchase whatever Windows software is necessary (Symantec Ghost, etc.) to clone your Windows partition while booted into Windows itself. You should clone it to a different external hard drive formatted for Windows NTFS.

Only once you are sure that all your partitions are backed up should you undertake the re-partitioning in Disk Utility. If you are fortunate, everything will go well and you will not need to re-install anything. But since you cannot be sure that this will happen, you would be very wise to have backups of everything first.


How do I fix Terminal.app when my shell has been set to an illegal value?

…I'd already resolved the issue using Disk Utility to repair permissions…

If repairing permissions clears up the problem, the cause is (almost certainly) that the permissions of /etc/shells were incorrect, preventing Terminal from reading it.

/etc/shells contains a list of valid shell programs, and Terminal checks to see whether the shell for your user account is listed. If not, it produces the “illegal shell” message. If it can’t read the /etc/shells file due to permission issues, it also produces this message.

More rarely, some people have encountered this problem when the /etc/shells file was somehow altered so that it is empty, in which case you’ll need to restore its contents by copying it from a good system, or with a Time Machine restore, etc.

To answer your original question:

If Terminal complains about an “illegal shell” it means that the shell for your user account was not found in /etc/shells.

You can see which shells are considered valid with cat /etc/shells.

You can check which shell your user account is set to use with echo $SHELL, or by reading the user information with dscl . -read "/Users/$LOGNAME" UserShell. Or you can use System Preferences:

Open System Preferences and go to Users & Groups.
Click on the lock and enter your password to be able to read/set user settings.
Control-Click (or Right-Click) on your user to get a contextual menu and choose Advanced Options….

The Advanced Options sheet displays detailed user account information including the shell pathname. You can also use this to edit the shell pathname to re-enable logins if it has been set to a value not listed in /etc/shells.


How to run a cron job each time the previous execution has finished?

In terminal:

while :; do ./script_name; done

or

while :; do python programm.py; done

If you want add some sleep time before run program again use 'sleep' command:

For example:

while :; do python programm.py; sleep 90; done

in this example cycle will sleep 90 second before run again you program


iMac behaves inconsistently when waking from long periods of inactivity

This would be explained if your iMac was sometimes in what Apple calls Safe Sleep and others (and Apple internally) call hibernation mode and is expected and intended by Apple to save energy.

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

You should be able to disable this if needed by using pmset on the command line. Unless you are comfortable with the terminal, you might just leave things as Apple has configured since the hibernation should only engage for longer sleep periods to save more energy than if the machine was kept sleeping lightly the entire time.


High memory utilisation iPhone6: how to identify greedy apps/processes

One thing missing from your question is the age of your iPhone 6 or, more specifically, the age of your battery. My guess is that a battery replacement is in order as the symptoms just fit.

Also, the high memory utilisation is not likely to explain the symptoms your iPhone is currently having. An ageing battery, on the other hand (and ageing could refer to its cycle count instead of its age in time), is certainly one possible explanation for your symptoms.

iPhone batteries are typically rated at having a maximum battery life of 500 cycles. However, this refers to the life of the battery and not to when you'll start noticing issues. In my experience, batteries can start showing signs of wear as early as when they reach about 65% of their cycle count and they start showing more serious signs at around 80% of their cycle count, so that's one figure you may want to investigate if you're still trying to make a decision.

It's not clear which version of the Lirum app you're using, but if you're only using the Lite version or aren't getting an indication of how many cycles your battery has had, you may want to consider coconutBattery (assuming you also have a Mac).

coconutBattery is an awesome app that you can install on your Mac (if you have one). You can then connect your iPhone to your Mac and this app will show you the battery's current charge, its full charge capacity, and its design capacity, its cycle count, and so on.

If you have a MacBook of some sort it'll give you a whole heap of info relating to your MacBook battery too.


Is it normal for Safari tabs to use 1 GB ram?

Safari can be a resource hog, particularly if you have a lot of tabs or windows open to graphics-intense sites, so this doesn't actually surprise me. If you turn on the 'Compressed Memory' column in Activity Monitor — from the menu bar: View → Colums → Compressed Memory — you'll likely see that that most of this memory usage is stuff that's been compressed and shunted off to virtual memory until it's needed.

For a comparison, I've been doing a lot of AppleScripting recently and so Activity Monitor reports that Script Editor is taking up 3.39 Gb of memory, with 2.79 Gb in compressed VM storage. MacOS has sophisticated memory management; as long as you're not seeing strange behavior — e.g. slower than normal response times — you shouldn't have to worry about it.


improving battery life for macBook Air M1

Just use the Mac!  But you can help it with:

Make sure "Optimized battery charging" is on.  System Preferences > Battery.
Avoid having power connected all the time, though this is mitigated by macOS and the setting optimise battery charging.
Avoid letting the battery go below 25%, but if needed sometimes don't worry.
If you are going to turn it off for many weeks, let it run down to 60% before turning it off.
Avoid high temperatures by keeping air flow around the MacBook - for example, don't rest it for long on soft bed covers.

Apple don't say, but battery is probably happiest between 40% and 80%.
Edit:
Apple are very reticent about precise advice regarding battery health. The most recent Apple battery support note has no advice on maximising battery health - only about battery life (time usable on battery power).  The only reference to battery health is the tick box for "Optimized battery charging".
How to Prolong Lithium-based batteries is a relatively recent general discussion of strategies to assist battery health. In particular Figure 6 shows the effect on batteries due to to different use and charging strategies with maximum battery lifetime being from keeping the battery between 65% and 75% at all times.  Read this (and some of its links) with interest and to gain some understanding of battery performance - but not to hamper use of the new MacBook Air.


Shell command works fine as is, but not when executed from crontab. What's the difference?

Might you be running a version of macOS where cron needs to be granted disk access?

On Catalina, how can a cronjob get permission to touch files on a USB disk?


Windows installation through bootcamp and SSD error

At time mark 11:49 in the 9to5Mac video the author is about to turn off the virtual machine. However, before turning off, a command needs to be entered to copy the drivers from the $WinPEDriver$ folder to the drivers store on the USB drive. This can be accomplished by executing the following steps.

Note: You an enlarge an image by either clicking on the image or opening in a new window.

From the Start Menu, open a Command Prompt window by selecting Run as administrator, as shown below.

When the popup windows shown below appears, click on the Yes button.

In the Command Prompt window, enter the following command, as shown in the image below. The external USB drive letter in the video was F. If your external USB drive has been assigned a different letter, then make the appropriate substitutions when entering the command shown below.
dism /Image:F:\ /Add-Driver /Driver:F:\WindowsSupport\$WinPEDriver$ /Recurse /ForceUnsigned

Note: Some drivers are not meant to be installed this way. If such a driver is encountered, then you may see a warning message. You can ignore these messages.

When the dism command is finished, you can enter the exit command to close the Command Prompt window.

Proceed with the instructions given in the video.


WhatsApp iCloud backup stuck at 0% and just won't move

I had this issue on iOS 13 and Whatsapp support magically got back to me.

Whatsapp needs 2.05x the backup size available on your iPhone, and in its infinite wisdom also in iCloud.  So if your backup is past 2.4ish GB, you are essentially forced to start paying Apple for additional iCloud storage.

I can personally verify this worked.  I tried everything (other troubleshooting steps include turning off iCloud Drive and deleting anything Whatsapp already put in iCloud).  After getting stuck randomly between 0%, 4% and 10% I moved to 50GB, flipped back to Whatsapp and it immediately continued progressing.

Maybe one day Whatsapp will let us manually backup to Google Drive or otherwise just spit out a file we can restore from...


How to downgrade iPhone 4S from iOS 9.0.1 to iOS 7.1.2?

You cannot downgrade to anything less than 8.4.1 now. Apple signs iOS software, they currently only sign 8.4.1-9.0.1. This means that you can't downgrade to 7.1.2.


Depending on the VPN client being used, this may or may not be possible. Certain VPN clients (like Junos Pulse, for example) can be set by your network administrator at work to enforce certain routing policies when connected via your VPN client. If your sysadmin at work set your VPN client to force all outgoing traffic to go through your VPN then you're most likely out of luck (I know that Junos Pulse can be set to automatically disconnect if the routing table is touched once connected). As your sysadmin at work how it's configured.


Is iMessage tied to an apple account or a phone number?

Usually iMessage is tied to the email associated with iCloud. If the person is using iMessage on their new number they would have logged in with their email address and hence receive the message.


Is defragmenting an SSD drive a bad idea?

Your best bet is to not "defragment" SSD storage.

Eventually, SSD will lose capacity slowly and gracefully as the controller can’t write the data correctly to exhausted cells, but the repair data from 2011 through 2018 shows that Apple SSD are orders of magnitude more reliable and have longer life than HDD storage currently or in the past could achieve.

What happens at the user/OS level when an SSD finally wears out?

The life span of the drive is a function of how the controller decides to write data and how much of the capacity is held in reserve to hide small errors over time. An SSD in general will wear out due to write exhaustion before a hard drive will as the magnetic media can withstand several orders of magnitude more writes than SSD memory cells. So the life span is basically set, and defragmentation means more writes than are needed and may in practice increase the chance your storage will degrade before something else causes you to stop using it, Granted, most people are not going to wear out their SSD - especially when you consider the warranties for OEM parts are often longer than one year / three years in the case of AppleCare - but reducing things that can cause thousands (or millions) of unnecessary erase and re-write operations is prudent advice.

But it gets worse for defragmentation than simply adding wear to the memory.

Since an SSD has no moving parts, retrieving a block of data has no penalty due to one block being stored on one chip versus another. The distance electrically to all the data is basically a constant. This is not true for a traditional magnetic drive with spinning platters and a movable read head.

On a spinning drive, the distance between two blocks is affected by head armature movement, rotational timing and cache status. Retrieval time is not at all constant, so "fragmentation" has a performance impact on traditional hard drives due to the mechanical nature of the storage.

Furthermore, SSD controllers selectively manage storage so defragmentation is not only unlikely to speed things up, might actually act counter to the normal storage prediction algorithms, and slow down access since the controller decides where to store data using the extra overhead. Since the device cannot erase just a block of storage, when you "delete" something on SSD, it often is just marked free and will not get actually erased until all of the data next to it is marked as free or the drive runs low on space and triggers a clean up on it's own.

Letting the SSD manage it's fragmentation works better than trying to have the OS micromanage storage that doesn't match traditional hard drive storage mechanics.


Define additional shortkey with the same effect like RETURN in Safari.app


All notes mysteriously disappeared across all synced devices. Can I recover?

I have three questions here and I was able to figure out the two, with a guess for the first.
What could have happened here such that all notes were deleted?
I don't know exactly, but my guess is that the notes database was corrupted somehow. Most likely, the corruption happened on my phone (since I upgraded an OS patch two days ago). When my iPhone synced its corrupted database with iCloud, all notes there were deleted too. And then the corruption was passed on to my laptop. This is just a guess, though.
However, it seems like others have had this problem, too.
How can I prevent this from happening in the future?
The key thing to remember is that syncing is not a backup. If you sync corrupted or deleted data, then everything is corrupted or deleted. The most important thing to do is make sure you have backups of all your important data AND check to make sure that your backups are actually working properly.
In my case, the backup software on my laptop was not backing up anything in my ~/Library directory (which is where the notes archives are stored) unless I went in and changed some arcane settings. After this was done, I have this folder backing up.
I also installed Exporter from the app store which allows you to export your notes to text. This will be another stopgap for me if this ever happens again.
Is there any way of recovering these notes now? (For example, might they be in my iPhone backup?)
It turns out that yes, these notes were being backed up on my phone, but it was more complicated than just applying this backup to get the notes back. If I didn't do anything else, once the phone starts syncing with iCloud, all the backedup notes were immediately deleted because the synced notes on iCloud is "newer" (ie- the database corruption happened after the backup, so the corruption overwrote the notes).
What I needed to do was:

reinstate the backup
immediately put my phone into airplane mode so no syncing happened
open the notes app
move all notes to a non-synced folder outside of iCloud
take phone out of airplane mode
let the sync complete (ie- the local phone's synced folder and iCloud are now both without any notes, but the non-synced folder has all notes).
Move the notes back to the iCloud folder.
Allow sync to happen as normal.

This solved the problem.


What about using iTunes Match? One iTunes library across several Macs/iPhones/iPads?!


There are programs that will allow the system to run with the lid closed, but in general putting the lid down will put the system into a sleep state (allowing some internet access for Power Nap if you have that enabled)


Download Xcode with developer account and then change account

Yes.

If you submit the app to the App Store using your first account, then you can use iTunes Connect App Transfer to transfer it to a new account.

If you work on the app without submitting it to the App Store, you can change account and there will be no problems (you will have to change the App ID & provisioning profiles if you obtained these with the old account).

A downloaded copy of Xcode is not linked to an account, so you can use Xcode with any account, or no account.

The limitations come with the documentation - pre-release documentation will not be available in Xcode if you don't link an account, however Xcode will still work fine without the documentation. Once you add a new account, the documentation will download and be accessible. Documentation downloaded with your current developer account will not need to be re-downloaded if you switch account.


boot camp fails to copy windows 8 installation files

Have you tried to use a different flash drive? I have had issues particularly with SanDisk Cruzer flash drive that are unable to be used as boot devices because of the firmware on the flash drive. Try a different flash drive and see if you have the same result. I have an 8 GB Sony flash drive and a 4 GB Kingston flash drive that have never failed as bootable USB devices. Using the same process, I just could never get the SanDisk to work.

Otherwise burn the ISO to a DVD and and Bootcamp should be able to find it just fine.


Is using a Mac mini as an iPhoto server for 2 client laptops a good idea?

You can happily place the library and have it share out.  You will need to have iPhoto running at all times in order to have the library visible to other users tho.

When you connect to the library from another Mac, you will not be able to use the same Events/Albums views that you have locally.  Some of it is available, but mainly it just throws a huge list of all your stuff that is not organised in the same way as you would expect if it was local.  Also, it's SLOW, in that it seems to almost cache the contents each time you connect which can take a while, and subsequent navigation is not quick either.

Another way to do this, is to share out the folder that the iPhoto data resides in, rather than opening iPhoto and sharing your library via the app.  This has the advantage that iPhoto does not need to be running on the Mini, although the disadvantage is your Apple TV won't connect.  This will however open the library in the same way as if it were local (in essence it is local, just on a network drive).  You can test this out by holding OPTION down as you start iPhoto, it will let you connect to a different library.

All in all, it's not a great solution either way.  I long for a sensible way of sharing in iPhoto and iTunes that does not require the apps to be running at the time (just a background sharing daemon would be great), that allows you to navigate and modify as if they were local, but it does't really exist for either app, and any solution is substandard to your local install workflows.


How do I edit keyboard shortcuts in Nano?

If you install a more up-to-date version of nano, it has improved keyboard navigation. In nano 2.7, the move word shortcut is ctrl+left/right. So you might not even need to do keybindings if you are satisfied with ctrl instead of alt.

Install homebrew: https://brew.sh/
Install nano: brew install nano

If you really want alt, then keep reading.

If using Mac Terminal, you will need to enable the Use Option as Meta key setting. Otherwise the alt key won't work.
/etc/nanorc might be ignored, depending on the flags when your nano was compiled. You can use ~/.nanorc instead, that will work for sure.
Add these lines to ~/.nanorc. (It seems that nanorc does not allow left/right arrows for keybindings, so I chose , and . since they are the same keys as < and >.

bind M-, prevword main
bind M-. nextword main

Now alt+, and alt+. will move to prev/next words.

You can find the full list of commands here: https://www.nano-editor.org/dist/v2.7/nanorc.5.html#REBINDING%20KEYS . (You may want to find the exact version of your nano if not v2.7).


Go to Settings→Screen Time→App Limits→Add Limit→Social Networking.

Add a one minute limit, then all consecutive launches will require passcode entry in order to permit access to the app.

Alternatively, in February of 2019, WhatsApp updated their iOS application to support exactly this feature. To enable, go to WhatsApp Settings→Privacy→Screen Lock. This supports Touch ID and Face ID.


export from photos (mac) including edited metadata

Metadata edits and location information assigned using the Photos application exist only in the Photos library database. The Photos application does not modify your original images. I.e. it does not write EXIF / IPTC geotags to your image files.

The Photos application can bake some of the metadata into JPEGs you export. These are JPEG copies of your images with your adjustments applied. You need to allow the Photos application to include location information for published items. There is a setting for this when you export photo. A second setting in Photos > Preferences applies when you use drag-and-drop to export photos.

You should consider proper geotagging that writes GPS location information into the your original image files. Be sure to use a tool that does so without compromising image quality by recompressing JPEG files. Writing GPS tags to EXIF metadata within the files creates files similar to what a GPS-enabled camera produces. You can be sure that the information always stays with your image files even as you move to a different photo software.


Restore closed tabs with no back up (iOS)

If your device is running iOS 8, you can access a list of the last 5 tabs you closed. This can be accomplished by:

Open Safari
Press the Tabs button in the lower-right corner of Safari
Press and hold the + symbol for a new tab
Wait for "Recently Closed Tabs" window to pop up. Access from there.

If the tabs do not appear in that list, you will have to navigate through the history to retrieve them. Note that if you use private browsing, no recently closed tabs (nor history, for that matter) will appear.


How do I share my location on more than one iOS device?

This is not possible using a single Apple ID. If you wish to share the location of each device specifically, you will need to use a unique Apple ID on each device.


This can be done by enabling the keyboard shortcut.

Now in full screen mode there will be a pop up when you use the keyboard shortcut (cmd+space) letting you see or change the input language.

The advantage of this method is you do not have something floating on you full screen all the time, but only when you call for it.


What happened to the right/control + mouse click option to “Get Album Artwork” in iTunes 12.4?

You can right click on the Album name/icon and get access to "Get Album Artwork".


How can I cut down on the size of iMovie Library.imovielibrary?

Is there a way to make it smaller?

Sure — in iMovie, delete what you don't need and the size of the library will reduce.

If you're looking for more detail regarding what is taking up space in your library, you can browse the library with something such as DaisyDisk1 which will show what is using the most space.

  I don't have anything important in iMovie - what happens if I simply delete it?

You'll lose all your media from your iMovie library, including footage, projects and associated files such as render files (although if you don't have the media any more the render files are pretty useless).

Your iMovie settings aren't stored in the library, unless the settings are specific to the library or something in the library, such as project settings.

1 DaisyDisk needs a bit of prodding to look in packages — right-click the package and choose Show Package Contents.


Where do I put my app's privacy policy and when do I display it?

Having a link to the privacy policy in the relevant field in iTunes Connect has been sufficient for me in the past. Obviously having a link in the app may allow users to find it more easily, however just the link in iTunes Connect seems sufficient based solely from personal experience.

Privacy Policy URL (optional)
A URL that links to your company’s privacy policy. Privacy policy URLs are required for all apps that offer auto-renewable or free subscriptions and for apps that are set to Made for Kids. Customers see this URL on their invoice and on the subscription confirmation email they receive. The URL can specify a localized site.
Include the entire URL, including the protocol.
Note that if your app is set to Made for Kids, you need to specify a Privacy policy URL for each localization provided for the app.

Source: iTunes Connect App Properties


How do I find out what my Apple vendor ID is?

This number may be a bit harder to find since Apple re-designed iTunes Connect on Mon, Feb 17th, 2014.

Multiple vendors: If you go into the monthly financial section and have multiple vendors a drop down will show up in the upper left with this number.

If you only have one vendor: Download a monthly financial report. The vendor id is the long number at the beginning of the report name before the first underscore.


Can we install/side-load outlook custom add-in for Mac programatically without manually installing

Is there a way to install outlook custom add-ins in Mac from terminal without requiring manually installation.

Yes.  From Microsoft Documentation:
Sideload Office Add-ins on iPad and Mac for testing
For side loading the add-on in Office for Mac, you need to save/copy the manifest file to the wef folder. If the folder doesn't exist, you must create it.

Word: /Users/<username>/Library/Containers/com.microsoft.Word/Data/Documents/wef

Excel: /Users/<username>/Library/Containers/com.microsoft.Excel/Data/Documents/wef

PowerPoint: /Users/<username>/Library/Containers/com.microsoft.Powerpoint/Data/Documents/wef


How can I boot back to Mojave from Boot Camp 6 with password-locked boot manager?

I did some research online, and the only ways I found to bypass the firmware password include booting to the recovery partition (which you already tried and it didn’t work) or some trick involving removing and reinstalling the RAM (not an option on your hardware). So here are my suggestions to resolve the issue:

• You said you have no solid proof of ownership. Can you change that?  Assuming the people you bought it from are honest, they hopefully will be willing to send you an official document showing that you purchased the machine and then take that to Apple to have them remove the password. That would probably be the easiest way. Even if they aren’t willing to provide you with the documentation, you might still be able to get help from Apple, but I wouldn’t count on it.

• If you’re in an area where it’s possible to purchase insurance on mail/shipments, consider asking your old IT admin if he’s willing to remove the password if you ship it to him. Again, assuming these are honest folk, it stands to reason that they would be willing to oblige you. I would strongly suggest offering to reimburse all return costs  (and maybe a little extra for their time) to minimize the impact on their end.

• In an absolute worst-case scenario, you can continue to use your machine with Windows, and the APFS container will stay exactly as it is.  You will need to purchase another MacBook if you want to run macOS again, but assuming you get the same model you can get a screwdriver that allows you to open the machine and physically move the old SSD into the new machine and regain access to everything*. Or you can purchase software that allows you to mount the APFS container on Windows so you can recover your files if you don’t have a backup. As a starting point, check out the free trial of Paragon APFS for Windows.

*If you’ve already activated Windows, you’ll need to migrate your product key to the new hardware.


You haven't really asked a direct question here; But I assume you're asking for a code editor which supports SFTP key auth?

In which case, Coda 2 has built in support for each type of connection (including key authentication).

If you're after a free alternative, I'd use Cyberduck and Sublime Text. If you open a file from Cyberduck (into Sublime Text), it automatically uploads each time you save.

If on the other hand you're looking for a way to use key authentication within Dreamweaver and the software simply doesn't support it, there's no way solve that.


Using Variables with AppleScript Action in Automator

Keystroke means it will send a "C" to the program and not actually press the C key. Try using key code 8 using command down.
Also, you may want to add a line with activate after the "tell Excel" command to ensure the program is the frontmost application.
Finally, use delay 0.5 between commands, so the program has enough time to process the information before firing the next step.
You can get a list of full key codes here:
https://eastmanreference.com/complete-list-of-applescript-key-codes
Other possible issues: make sure the get value of variable is ignoring the preceding action, otherwise sometimes Automator will pass more than one variable ahead. You could also use item 1 of input as string, because sometimes it will get the wrong kind of data.


Does FileVault 2 interfere with TRIM when using an SSD?

I guess I wasn't that convinced, so I tested this empirically.

Setup: MacBookPro6,2, Mac OS X 10.8.2, FileVault2 enabled, Crucial C300 256GB (firmware 0007)

With TRIM disabled, I nearly filled the disk (5 GB left) over the course of everyday usage. Deleting ~50 GB of files, I then tried to create a 50 GB disk image. Results were pretty pathetic - an initial peak at 180 MBps quickly dropping down to average writes of about 15 MBps, the disk clearly stuttering (showing periods of zero writes where presumably the disk was trying to catch up). The file was deleted, and afterwards I enabled TRIM. Again, I tried to create the disk image, and again I got the same results. Finally, after deleting the disk image, I created a disk image for the third time - with freshly TRIM'd bits. Average performance was 200 MBps and was sustained.

So no, FileVault2 does not interfere with TRIM. (And no, garbage collection is not sufficient, Crucial.)


Do Safari private tabs stay open after iPhone shutdown?

I just checked this on my iPhone 6 running iOS 10.3.3. I opened a private browsing tab and went to a site then powered my iPhone off.

When it restarted I opened Safari again. My private browsing tab opened up to the exact site I was on when I powered off.

So I think you're busted on this one. But you've learned a valuable lesson about private browsing and always having a passcode on your device :-).


Can multitasking gestures in iPad 2 be disabled for specific apps?

Currently and without jailbreak no and I doubt Apple will ever introduce this option as it would be only useful to a few people. It's all or nothing.


Try this (reference):

Turning on/off Auto-Suggestions
1. Clear your browsing history
2. Click the Tools menu
3. Select Options
4. Click the Under the Hood tab and find the Privacy section
5. Select/deselect the 'Use a suggestion service to help complete searches and
   URLs typed in the address bar' checkbox.
6. Click Close.


PageUp and PageDown keys for Irssi (IRC) in Macbook?

It took me a while to guess that and I didn't find anything on Google, so at least, if somebody needs it, it's fn + Up/Down in iTerm 2.


Problem solved on Bootcamp with GPU Driver's provided by AMD.

https://www.amd.com/en/support/kb/release-notes/apple-boot-camp
Make sure to remove Apple stock GPU Driver with "Display Driver Uninstaller" on Safe mode.
Do not use the "Apple" or "bootcampdrivers.com" drivers.
You must install Radeon pro driver ( It has blue system tray icon )


Trying to download photos from iPhone 5s to Windows 10

You should download "OneDrive" on your iPhone. Then on your OneDrive account you set your iPhone to upload all pictures on Photos. All your pictures will be uploaded. Then you open https://onedrive.live.com by your Windows 10. It can work with iCloud as well, but I like OneDrive more. That's how I duplicate my pictures on iPhone to Windows 10. Good luck!


Copy screenshot to clipboard in addition to saving the file

The following is an example of what I'd do, if I needed both, to place a screen shot on the clipboard and save it as a file at the same time.

I'd use Automator to create a Service1  workflow, to which a keyboard shortcut could be assigned, to run an AppleScript script to have these two events happen in conjunction with each other.

In Automator, create a new Service1  with the following settings:

Service receives (no input) in (any application)
Add a Run AppleScript action, replacing the default code with the example AppleScript code shown further below:
Save the Automator Service1  as, e.g.: Screen Shot to Clipboard and File
Assign a shortcut, in System Preferences > Keyboard > Shortcuts > Services:

Screen Shot to Clipboard and File      ⇧⌘5 2

Now when you press ⇧⌘5 2  the crosshair cursor appears just as though you had pressed ⇧⌘4, however after making the selection as normal and releasing the mouse, the selected area is both copied to the clipboard and saved to a file on the Desktop.

macOS Mojave Update:

1 In macOS Mojave, a Service in Automator is now called a Quick Action, so select that.
2 By default, ⇧⌘5 in macOS Mojave is by assigned to a new Screenshot feature, so try ⇧⌘6 instead.

The file naming convention is that of the macOS default for Screen Shots saved normally, in my region. You may need to adjust the following line of code for it to be as in your region:

set theDateTimeNow to (do shell script "date \"+%Y-%m-%d at %l.%M.%S %p\"")

In my region, this command produces the following example output where the value of the theDateTimeNow variable would be, e.g.:

2018-01-13 at 12.04.30 PM

Between the line of code above and the two lines that follow it in the script, they produce, e.g.:

Screen Shot 2018-01-13 at 12.04.30 PM.png

In Terminal, have a look at the man page for both date and strftime, in order to make adjustments to format the date and time value of the theDateTimeNow variable, as needed or wanted.

Note: Read the comments throughout the example AppleScript code so as to understand what the script is doing.

This was tested under macOS 10.13.1 and worked for me without issue.

Example AppleScript code:

on run {input, parameters}

    --  # Screen Shot to Clipboard and File

    --  # Clear the clipboard so the 'repeat until isReady ...' loop works properly.

    set the clipboard to ""

    --  # Copy picture of selected area to the clipboard, press: ⌃⇧⌘4
    --  # Note that on my system I need to keystroke '$' instead of '4'.
    --  # I assume this is because the 'shift' key is being pressed.

    tell application "System Events"
        keystroke "$" using {control down, shift down, command down}
    end tell

    --  # Wait while user makes the selection and releases the mouse or times out.
    --  # Note that the time out also acts as an escape key press of sorts. In other
    --  # words, if the user actually presses the escape key it has no effect on this
    --  # script like it would if pressing the normal shortcut outside of the script.
    --  #
    --  # As coded, the time out is 5 seconds. Adjust 'or i is greater than 10' and or
    --  # 'delay 0.5' as appropriate for your needs to set a different length time out.
    --  # This means, as is, you have 5 seconds to select the area of the screen you
    --  # want to capture and let go of the mouse button, otherwise it times out.

    set i to 0
    set isReady to false
    repeat until isReady or i is greater than 10
        delay 0.5
        set i to i + 1
        set cbInfo to (clipboard info) as string
        if cbInfo contains "class PNGf" then
            set isReady to true
        end if
    end repeat
    if not isReady then
        --  # User either pressed the Esc key or timed out waiting.
        return  --  # Exit the script without further processing.
    end if

    --  # Build out the screen shot path filename so its convention is of
    --  # the default behavior when saving a screen shot to the Desktop.

    set theDateTimeNow to (do shell script "date \"+%Y-%m-%d at %l.%M.%S %p\"")
    set theFilename to "Screen Shot " & theDateTimeNow & ".png"
    set thePathFilename to POSIX path of (path to desktop folder as string) & theFilename

    --  # Retrieve the PNG data from the clipboard and write it to a disk file.

    set pngData to the clipboard as «class PNGf»
    delay 0.5
    try
        set fileNumber to open for access thePathFilename with write permission
        write pngData to fileNumber
        close access fileNumber
    on error eStr number eNum
        try
            close access fileNumber
        end try
        activate
        display dialog eStr & " number " & eNum buttons {"OK"} default button 1 with title "File I/O Error..." with icon caution
    end try

    --  # Convert the POSIX path filename to an alias.

    set thePathFilename to POSIX file thePathFilename as alias

    --  # Hide the file extension as is the default.

    tell application "Finder"
        try
            set extension hidden of thePathFilename to true
        end try
    end tell

end run

Note: The example AppleScript code above is just that, and sans the include error handling does not include any other as may be appropriate/needed/wanted, the onus is upon the user to add any error handling for any example code presented and or code written by the oneself.


Automator: `command not found` (Python script for command line)

Most likely, you need to tell Automator's shell instance where to locate the program jupytext.  Unless you saved jupytext somewhere specific on your hard drive, my guess is that the full path to jupytext is going to be /usr/local/bin/jupytext.  However, you can retrieve its location by opening up Terminal and using the command:

which jupytext

which will return the file path to the program.

Then, in your Automator action, replace jupytext with its full path, e.g.:

for f in "$@"; do
    /usr/local/bin/jupytext --to notebook "$f"
done


Any way to completely disable iOS passcode?

The apple configurator doesn't currently have this option.

The only workaround I've discovered so far is to register an exchange account with the iOS device using SSL.  This forces the user to use a passcode, and disables the option to remove it.  Now go into your exchange account settings on the iOS device, deselect "Use SSL" then go and disable the passlock.  Now go back to exchange settings and re-enable "Use SSL".  You should now find that 1) the passlock is no longer enabled and 2) the setting to turn on the passlock is gone.  You should be able to disable all the sync settings so students don't start using that account for anything. (source)

If you don't have an exchange account you can use for this, set up a free google mail, and register it as the exchange account.

It may depend on the exchange server settings/policy, though, so some experimentation may be required.

Lastly, if you are using Supervised devices then the passcode will be reset when reconnected to the apple configurator.  Still more work than desired, but quicker and more painless than a full refresh.


Why does the News app lose the article you're reading when restoring

The Apple News iOS app does go back to the home screen if left inactive, I can't comment as to what triggers this and why - but I can offer a solution:

You can find the "History" of your viewed stories within the "Following" tab (bottom right).


Stop Mail Changing Port for E-Mail Account

Make sure you've switched off the new 'Automatically Maintain' settings that appeared with Yosemite.

Two places, outgoing & incoming...

for each account

and for each Outgoing Server


Why does iChat launch itself whenever I wake my monitors?

Do you have webcam on those monitors? Integrated or attached to USB or FireWire hub on the monitor?


Can I delete this folder? Library -> Application Support -> iOSinstaller

I tried deleting the folder and the system was fine after that. The file wasn't created by the PopcornTime app for Mac but the iOSInstaller of PopcornTime. I tried to install the app on my iPad and the installer created that folder and all those large files.

So to answer the question: YES you can delete that folder and all the files inside it.


I don't think you can find lease information from the client end, I believe it's stored on the server end.  I don't quite understand, though, your predicament.  You managed to cripple your network connectivity somehow?

Try /private/var/db/dhcpclient/leases.


RADIUS log not visible in Console under macOS Sierra

Most of the log info that was being redirected into custom logs (via asl) is now just going into the system log. The best way to find out about an individual service is to use the log command (man log). The radius server is radiusd, so I would expect to see useful info from:

log stream --predicate  '(process == "radiusd")' -info


Can you just use one side of Airpods and leave the other side at home?

Yes, AirPods can be used independently in only one ear.

I use only one AirPod the majority of the time. Great for mono podcasts and for environmental awareness as you're walking around.


Cisco Smart Tunnel crashes Safari. Can it be made to work on Mac OS X?

As of May 30, 2012, Smart Tunnel on OS X 10.7 is officially not supported by Cisco and it looks like it won't be an easy fix to support it because it shares many attributes of the Flasback Trojan. I use VMware Fusion to run a Windows VM on my Mac for just this sort of thing.


I tested this on my mac, and all this seems to do is to not place the icon next to the spotlight icon.  When I relaunched proXPN, it placed the icon on the left side of all icons on the top. At first, I couldn't see it either but that was due to the app I had open having too many menu items taking up real estate - I switched to finder and voila!  There the proXPN icon was.


Can I use AppleScript to upload a file to a webpage open in Safari using drag and drop?

It is going to be a headache to attempt to do this is automator or applescript, i would recommend using python with the splinter library, it is much easier to use then objective c or swift for this. Here is a link, https://splinter.readthedocs.org/en/latest/

It is possible to set it to run 100% in the background with a hidden browser or get it to open up something like firefox for you :P should be doable in under 10 lines with python, python comes preinstalled with osx and the splinter lib is easy to add into it with pip