How to know whether SSD is permanently implanted on Mac or not?

The MacBook that has one USB-C port and the TouchBar MBP are the only Mac going back to 2013 models where the main storage is soldered to the logic board. All the rest are serviceable without solder or needing a new serialized logic board.

That being said, Apple and certified repair agents will repair all Mac with storage issues for 5 years from the date of last sale of that model so practically, you’re never without repair options even if you don’t have the skill or tools or training to successfully close a Mac after repair.

Just about anyone can go to ifixit.com and open up a Mac. The trick is getting the right parts, not damaging tiny screws and connectors and putting it all back together so the system is operational and reliable.


Finder/Terminal: Find files that contain less than 21 lines of text

In Terminal you can combine find and wc for this:

find /path/to/directory -type f \
    -exec bash -c '[[ $(wc -l < "$1") -lt 21 ]]' _ {} \; -print

This will find all files (-type f) beneath /path/to/directory, count the lines (wc -l < "{}", {} gets replaced by any file found) and print the file name for files containing less than 21 lines.

PS: It will also try to count the lines in non-text files. If this causes issues, use the following instead:

find /path/to/directory -type f -exec bash -c 'file -b "$1" | grep -q text' _ {} \; \
    -exec bash -c '[[ $(wc -l < "$1") -lt 21 ]]' _ {} \; -print

PPS: To start from the current directory, replace the path at the beginning with . (a single dot, for the current directory)

PPPS: To restrict the search to the current directory, use find . -maxdepth 1 -type f ...


How to change the the screensaver using terminal (without using Preference Panel)?

Quit System Preferences.
Locate the relevant plist in terminal by

ls ~/Library/Preferences/ByHost/com.apple.screensaver.*.plist

You should see something like

/Users/<username>/Library/Preferences/ByHost/com.apple.screensaver.0B39A0DE-D1EE-59FF-85C0-6EA16FCB015B.plist

Note that hyphen-delimited alphanumeric string. It might be host dependent, judging from that ByHost directory name. (Or maybe it's not. At the moment I have only one Mac at my disposal so I can't tell.)
In terminal, run the following commands (with the hyphen-delimited alphanumeric string replaced by what you found in the last step):

defaults write ~/Library/Preferences/ByHost/com.apple.screensaver.0B39A0DE-D1EE-59FF-85C0-6EA16FCB015B.plist moduleDict -dict moduleName iLifeSlideshows path /System/Library/Frameworks/ScreenSaver.framework/Resources/iLifeSlideshows.saver type 0
defaults read ~/Library/Preferences/ByHost/com.apple.screensaver.0B39A0DE-D1EE-59FF-85C0-6EA16FCB015B.plist

That's it. There's one problem with this approach: it seems that multiple screensavers are registered with this iLifeSlideshows.saver (e.g. Classic), and I couldn't locate the plist controlling which one is shown. But according my testing, if you've chosen "Ken Burns" in System Preferences and later changed it to "Flurry", then when you run the above commands you will get "Ken Burns" back. Otherwise, no guarantee — for instance, you might get "Classic" if that's the last used one from iLifeSlideshows.saver.


Updated to reflect updated question along with comments to achieve the goal of toggling comments in Xcode.

The following example AppleScript code, shown further below, used in an Automator Service was tested in macOS Sierra and Xcode 8.3.3 and works to comment the selected code or uncomment the selected code, within the manner of coding in the example AppleScript code.

In other words, if the selected code looks like:

void myDelay(float value) {
    NSDate *future = [NSDate dateWithTimeIntervalSinceNow:value];
    [NSThread sleepUntilDate:future];
}

And the Automator Service is run on the selected code above, it will look like:

/*
    void myDelay(float value) {
        NSDate *future = [NSDate dateWithTimeIntervalSinceNow:value];
        [NSThread sleepUntilDate:future];
    }
*/

Or if the selected code looks like:

/*
    void myDelay(float value) {
        NSDate *future = [NSDate dateWithTimeIntervalSinceNow:value];
        [NSThread sleepUntilDate:future];
    }
*/

And the Automator Service is run on the selected code above, it will look like:

void myDelay(float value) {
    NSDate *future = [NSDate dateWithTimeIntervalSinceNow:value];
    [NSThread sleepUntilDate:future];
}

Example AppleScript code for use in a Run AppleScript action in an Automator Service.

on run {input, parameters}
    set selectedText to item 1 of input as text
    set outputText to {}
    if selectedText contains "/*" then
        repeat with i from 2 to ((count paragraphs of selectedText) - 1)
            if (count characters of paragraph i of selectedText as text) is 1 then
                copy "" to end of outputText
            else
                copy (characters 2 thru -1 of paragraph i of selectedText as text) to end of outputText
            end if
        end repeat
    else
        copy "/*" to end of outputText
        repeat with i from 1 to (count paragraphs of selectedText)
            copy tab & paragraph i of selectedText to end of outputText
        end repeat
        copy "*/" to end of outputText
    end if
    set AppleScript's text item delimiters to {linefeed}
    set outputText to outputText as text
    set AppleScript's text item delimiters to {}
    return outputText
end run

Notes:

Xcode (8.8.3 anyway) does not support nested block commented code, meaning that if you comment some code with this script and then select additional code that includes code previously commented by this script, it will throw an error when running the service. You can work around this by changing:

if selectedText contains "/*" then

To:

if first paragraph of selectedText contains "/*" then

However Xcode will then show the nested commented code as having errors. So the real value of this script is to use it only on code that will not then be selected again as a larger block after the original commenting by this script.

When uncommenting code you should always be sure to select so the first and last lines of selection contain the block comment characters, /* and */, with no leading or trailing blank lines in the selection.

Also, Xcode has a built-in keyboard shortcut to comment selected lines with a leading // by selecting the code and pressing command/. Pressing the same keyboard shortcut removes the leading //. This is some ways negates the need to use this scripted solution.

There are third-party plugins for comments in Xcode and a Google search should be fruitful.

One example is: BlockComment for Xcode

See edit history for original answer before the OP was updated with actual details of the objective.

Note: The example AppleScript code is just that and does not employ any error handling and is meant only to show one of many ways accomplish a task. The onus is always upon the User to add/use appropriate error handling as needed/wanted.


Best replacement for MacBook Air MagSafe 2 cable (OEM or 3rd party?)

The Apple cables appear to be designed to safely melt without starting a fire in cases where the internal insulation breaks down in case of crushing, slicing, piercing (kittens are even worse than cats in this regard) or simply worn out due to repetitive bending in the same spot.

I've seen people decide to use cords when lightly damaged - sealing the cable with electrical tape. Since the voltage is low on the MagSafe side of the cord, this is more a heat/fire risk than a shock risk. The MagSafe board on the Mac usually protects your hardware from any sort of short - and it also is replaceable if it's fusing blows.

I have on rare occasion seen some nice third party adapters that work with MagSafe connections - but none yet on MagSafe 2. I have seen far, far more dangerous adapters than safe ones.

The worst part of counterfeit adapters is that they typically carry the same "safety" markings as a quality electronics adapter. Also, some have high quality plastics and similar weight so you may have to be very observant to tell a good knockoff from a genuine part. Unless you are using the adapter in an environment where a small fire could reasonably be contained without undue risk to finances or life, you might avoid using a third party adapter if you are not skilled at evaluating electronics for build quality.

http://www.righto.com/2015/11/macbook-charger-teardown-surprising.html?m=1

The article above explains how the Apple charger is engineered with a processor in the MagSafe connector and a main processor that's equivalent to the original Macintosh - you're getting a computer inside every Apple charger as well as dense and highly safe design shown on the left and a knockoff design on the right.

I've been well served by buying Apple adapters in terms of reliability and safety, despite the higher cost. I know many that have had good luck with quality third party adapters, but wanted to explain the why some third party adapters are dangerous to use and not even close to equivalent to Apple's product.


Using "tar" command in Terminal for multiple folders/files

Assuming that (1) the .spa files are actually .tar archives, (2) you are in SomeDirectory, and (3) that directories with the names of the archives you want to extract do not exist, the following piece of code should achieve what you want:

for a in *.spa
  do a_dir=`expr $a : '\(.*\).spa'`
  mkdir $a_dir
  tar -xvf $a -C $a_dir;
done

Or in case you prefer a one-liner:

for a in *.spa; do a_dir=`expr $a : '\(.*\).spa'`; mkdir $a_dir; tar -xvf $a -C $a_dir; done

The first line in the for loop strips the .spa from the archive name and assigns it to a variable, which is used in the second line to make a directory with that name, and in the third line in tar with the -C argument.

The -C argument in tar only changes directory during extraction and doesn't actually make one, making things a a bit more complicated than they should be.

Credit: This answer is a slight modification of https://superuser.com/a/748567/226246


What do these Bluetooth icons shown in iOS status bar mean?

Refer to the Apple Support document, Status icons and symbols on your iPhone:

  The battery level of your paired Bluetooth device.

  Your iPhone is paired with a wireless headset, headphones, or earbuds.


Using a bit of the scientific method, narrowing down the cause of the popup.
Other browsers didn't have the same issue, only Chrome. And the popup was occuring on my own NAS, with no other users reporting such an infection.
So, back to Chrome. I looked at my extensions. Over 2 dozen. Turned them all off, and the popups stopped. Turned them on, 4 at a time, until I found the one that caused this. When I clicked to look in the Chrome store, it's no longer listed. Mystery solved.
(Thank you, Allan, for the time and patience, and the SW reference, which helped me find unwelcome adware.)


I'm just speculating here, but...

It does seem like apple has left dashboard to die a slow death. I think that we started seeing proof of that, when they introduced a dropdown menu for disabling Dashboard in Mountain Lion (I think). Before that it could be done through the terminal. This was like apple admitting that  people don't really use it that much, so let's give them the option to disable it.

In one of the more recent versions of osx, they disabled dashboard by default (Yosemite, maybe?). I'm pretty sure that unless by some miracle there's a dramatic change in how much people use dashboard, Apple is absolutely going to kill it off at some point.

At least from the users perspective, it's hard to justify the existence of Dashboard, when we got menubar apps that do essentially the same thing and maybe even a little bit more in some cases.

A possible replacement for that translator widget could be Instant Translate.

List of other possible replacements for widgets.

Calendar:

Itsycal (Free)
Calendar 366
Plus (~$18)
Fantastical 2 (~$60) - A full fledged Calendar.app replacement that also has a menubar app.

Weather:

WeatherBug (Free)
Forecast Bar (~$6) I could be wrong, but I remember this one having the option to set a notification like say every day at a specific time. When I tried this, I remember setting it to 15:50, 10 minutes before getting off from work. Don't trust me on this though... I can't remember for sure.

Calculator
 - You can calculate straight in Spotlight. You can always click the magnifier glass icon on the top right of the screen or use the default shortcut to open Spotlight Cmd+Space. Just write it right there: (20-10)/2. Escape key closes spotlight.

Stickie notes

The native app: Stickies.app - There are third party stickie apps, but let's face it, this should be more than enough for most.
Memo (Free) - I'm only mentioning this, because you can password lock memos, if you want. When you lock a memo, the content becomes hidden. They can also auto lock after a while.

  A few honorable mentions for people who like to customize things like there is no tomorrow.

  iStatmenu has a clock replacement (native menubar clock can be hidden from System
  Preferences). The clock replacement can be customized pretty much how
  ever you want. It even has a "fuzzy clock", which shows the time in
  words: twenty past nine. Personally I find that cool, that's why I
  mentioned it. Anyways, the clock can be clicked to show a calendar
  (much like those other apps).

  uBar is a Dock replacement that can also show the time and when you hover over it, it shows a very plain calendar. Pretty much just to keep track of what day it is, I'd say.
  Clicking it opens the native Calendar.app.

  Übersicht Is very much like some sort of spiritual successor to Dashboard. You can download
  widgets that show stuff
  like Weather, Time, Calendar, Disk Space... etc. It's basically an
  overlay on top of your desktop. You pretty much can't be afraid to
  dive into some CSS to use this app, because each newly installed widget seems to require
  you to change poisition, font size and colors.


How to find out which application(s) created core dumps?

The handling of coredumps has changed on Mojave, so you cannot use "otool -c" as you did on older macOS versions. Instead you open the Terminal and run the following command:

lldb -c /cores/core.12345

where 12345 needs to be replaced by the actual filename of your coredump file.

When lldb has started up, you'll get an (lldb) prompt, where you enter the following command:

target list

Then you should be shown which program crashed. For example like this:

(lldb) target list
Current targets:
* target #0: /usr/local/bin/emacs ( arch=x86_64-*-*, platform=host, state=stopped )

In this case the crashed program was "emacs" in the folder /usr/local/bin.


If you are looking for something that keeps track of servers/connections via a GUI, Terminal.app will already do that for you. Launch it and then from the menu select Shell > New Remote Connection. This will give you a connections manager window.


Can’t click/drag MacOS notifications, which are transparent, have to restart Notification Centre

The only fix officially is to kill the notification center in Terminal with

killall NotificationCenter

This may become inconvenient if you need to do it too often though.


Administrator account apparently lost after forced reboot of OS X

Turns out I was lucky. Booting into Single User Mode (for obtaining administrator privileges as described here) apparently caused some extra disk check. This presumably led to the restoration of some corrupted piece of (meta)data and in effect my account A, including its previous administrator privileges.

Looks as if the system is back to normal now: much relief!


Disable oscillating light on MacBook Pro when in sleep mode

Yes.

Put a piece of cardboard in front.

I have tested and approved this solution.

As far as I know, this is the only non-destructive solution.


Can I work on iMovie online?: ie upload a library to googledrive or etc and work on it from any Mac?

I'd recommend Dropbox. You'd be able to edit files locally with Dropbox, and then it would handle syncing them to the cloud. You'd just have to make sure you left your computer on long enough to allow it to finish syncing after you made changes.

I'm unsure if Google Drive works the same way - but I use Dropbox for something very similar to your scenario and it works great. I can edit files at home or at the office, and they sync across so I don't have to worry about transporting things back and forth.


Add Photos actions to Automator using https://photosautomation.com/
Construct the following Folder Action in Automator

I'm still not 100% satisfied, since folder actions are not super robust so I welcome other answers!


How to enable external display on touchbar MBP with broken screen

There is two solutions that I can recommend for you.

First, a very generic one where you need to close the screen lid.

Hook the LCD display to the Mac with the appropriate adapter
Hook up the external keyboard and mouse (optional but recommended)
Boot the MacBook with the broken screen, then close the screen during boot

This will automatically boot your Mac to use the attached external screen

In brief: Restart your system and then close the lid so the lid sensor acknowledges the lid is closed your external display should automatically become the primary display.

And, Second, if you have another Macbook with you, you can try this crazy idea too

If you have easy access to a second Mac and the right cable to connect the two (e.g., Thunderbolt to Thunderbolt, USB-C to Thunderbolt, USB-C to USB-C, etc.), you could:

Connect the two Macs with said cable
Put your damaged MacBook Pro into Target Disk Mode by holding down its "T" key while you turn it on
Turn on the second Mac while holding down its Option key so you get to choose which partition to boot from
Choose the system volume of the broken MacBook Pro

This basically lets you use the intact second Mac to boot into the system that is installed on the MacBook Pro with the damaged screen. If there are indeed any software or hard drive issues with that first Mac that prevented you from logging in, you are now able to see and potentially address them.

For more details on Target Disk Mode, see this guide.


Battery performance on iPad in sidecar mode

The iPad is always powered from the battery. It doesn't matter whether the charger is plugged in or not, the power is always drawn from the battery.
This is actually essential in ensuring that a sudden spike in power consumption (for example due to briefly engaging the CPU and GPU at 100%) doesn't result in system shutdown because the charger cannot supply enough power.
Ofcourse when the charger is plugged in, the battery is charged at the same time. If the power draw is less than the charger output, then the battery will be charged (until it reaches max) - otherwise you can still experience that the battery level drops while using the iPad.


Is macOS Sierra currently bug-free and stable to run Adobe programs?

No, it is not bug free.  The question is whether its bugs matter for your particular needs.  To find that out, clone you current system to another partition, upgrade that to Sierra, and verify that the apps and external devices you require for your work all operate the way you need them too.


Icons don't appear immediately for downloaded programs

This icon is shown to tell you that the program is potentially unsafe because you haven't opened it yet and it was downloaded from the Internet.

The first time you open the app, you'll see a security dialog that says, "App Name" is an application which was downloaded from the Internet. Are you sure you want to open it?"

Once you click Open on that dialog, the app will open and the icon will change to the app's normal icon.
You shouldn't need to restart or anything like that.


How can I mute phone ringing with exceptions?

You can activate the Do Not Disturb mode.

In the settings, it lets you choose to allow calls from your favorites. So if you only add your mother’s number to your favorites, it will have the desired outcome.


Charge my macbook pro late 2012 60W (A1425) with a 24W usb-magsafe charger - is this safe?

The rating is a maximum power value, and your MBP will draw only what it needs. Your MBP needs up to 60W in order to work at full power AND recharge the battery. Using a 24W charger will only charge the battery if the MBP is using less than 24W to run.

However, because 24 is much less than 60, it's likely that this power source will be insufficient to power the MBP and recharge the battery. If the MBP is sleeping, you might charge the battery very slowly overnight. If in use, you might charge the battery very slowly, or even just make the battery discharge more slowly than normal. I've used 45W power supplies with 60W Macs and they have charged slowly while in use; but when the Mac works hard, the battery level falls, though slower than without the supply.

I'm prepared to say that using a lower-wattage supply will not harm your battery. Whether the actual device you make is safe will depend on you.


Is it possible to use `tmutil delete` or another command to delete one file from all backup intervals?

Here is a way to exclude folders from timemachine.

Hold the command key and type the space bar to bring up Spotlight.

Type Time Machine and open the system preference (not the application).

Click the Options... button in the lower right corner of the Time Machine system preference panel.

Click the plus button then navigate to the folder you want to exclude.

Click on the Exclude button.

Click on Save.

https://www.imore.com/how-exclude-files-time-machine-backups


Process called "Dock" running at 100% since upgrade to 10.6.8

Found this answer on CNET:

  The problem appears to be an incompatibility with Parallels Desktop 6, which has an option to make Windows applications available in the Dock for convenient access. This incompatibility will likely require an update from Parallels to fix, but until then one option you have is to disable the Dock applications setting for each virtual machine you have configured.


iphone and ipad app for emails that supports colors, fonts, etc

I do this so seldom, that I use another editor to compose what I need and then copy/paste. On the iPad, you have split screen so you can edit in one larger pane and then compose the main in a smaller pane.

Here are my editing apps of choice:

Notes - free and powerful
Coda - HTML powerhouse
GoodNotes - more for note taking, but handwriting to text is so awesome, I had to include it
Drafts - pure writing power
Pages - also free and powerful

Each has different strengths.


This website contains download links for the latest version of the Boot Camp WindowsSupport for older devices:

For Windows XP, Apple has provided Boot Camp Drivers Update v2.1 and v2.2 which…

  is intended only for use with Microsoft Windows XP and Microsoft Windows Vista running on a Mac computer using Boot Camp.

Both updates require Boot Camp 2.1. It also notes that…

  This download contains complete copies of Boot Camp Windows XP Drivers (version 2.1). If you have Boot Camp drivers already installed, it will update them.  If you do not have any Boot Camp drivers installed, it will install version 2.1 drivers onto your already installed Windows OS.

This should fix your XP issue, since it contains the latest XP-compatible drivers. If not, your only option will probably be Windows 8 (or Windows 7).

With regard to installing Windows 8, Boot Camp 5 brings full Windows 8 support.


Anyone can run the beta, provided they're a member of Apple's iOS developer program, which costs $99/year to join.


Coreaudiod spams system log: Enabled automatic stack shots because audio IO is inactive

Now that 10.8.4 is released (build 12E55), it is still there. I've gotten a response from Apple Engineering that this is logged by design.


Is there a way I can import ReadItLater's exported html file into my Instapaper?

Though I don't have a tool now, I guess it can be done in couple of ways. Yes, no one click solution.

Email each url to your personal instapaper id (Refer this Lifehacker article)
Can parse your export list and use simple API from Instapaper to add the links to your account. Refer API docs

Update:

As I said earlier, it is not a one click solution but doable. As a matter of fact, I did create an extension for chrome to do this. Here is the link http://minus.com/mc3va2C

Update 2:

The source of the extension is available @ https://github.com/palaniraja/RIL2Insta


Answer for question #2: use Siri and ask "Redial last number called." I use it all the time while driving (with a Bluetooth headset, of course!)


Set Static IP Reservations on AirPort Extreme

According to the fourth hit on Google here, all you need to do is open get the MAC address of your server, then open AirPort Utility and select your AirPort base station and choose edit (or just click on it if you're not using version 6.0+) and choose the Network tab. Seeing as how you have different local addresses, I'm assuming you have DHCP enabled (it's always a good idea) you just need to set up an IP reservation for the MAC address of your server.


Boot Camp Assistant - Setup from SD Card

You can't do that as neither, OSX nor W7/W8 support booting from an SD card.

Get a simple usb-sd card adapter (not a multi card reader) and that'll work. In fact its what i used a micro-sd card in a usb adapter with an old 8gb card.


How do I set an empty search domain on Airport/Time Capsule

On the AirPort or TimeCapsule that is acting as DHCP and/or NAT, placing a period “.” in the Domain Name field will push a null domain name search to its DHCP clients…

It does this by making yer DHCP clients’ treat hostnames as fully qualified…  That will not disable domain name searches on the DHCP clients if they are configured to use search domains…

BUT, it will eliminate having yer ISP’s domain name appended as an additional domain name search…  With the added benefit of slightly faster DNS resolutions eliminating parent and child domain searches…


What's the startup/reboot time for iPad (3rd generation) compared to other iOS devices?

iOS device boot times (timed using a second hand):

iPad   (3rd gen.)   iOS5    32 seconds
iPad 2 (2nd gen.)           No Results
iPad   (1st gen.)   iOS5    50 seconds

iPhone 4S           iOS5    42 seconds
iPhone 4            iOS5    49 seconds
iPhone 4 (GSM)      iOS5    46 seconds
iPhone 3GS          iOS5    85 seconds
iPhone 3G           iOS4.3  87 seconds
iPhone (2G)                 No Results

iPod touch 4G               No Results
iPod touch 3G               No Results
iPod touch 2G               No Results
iPod touch 1G               No Results

Feel free to edit this answer and add your own times.


Is there a way to get Auto-Brightness back on my iPhone X?

Yup, hidden settings it is! Since iOS 11 Auto-Brightness has been moved to Display Accommodations.

1.) Launch Settings app

2.) Tap General

3.) Tap Accessibility

4.) Tap Display Accommodations and toggle on Auto-Brightness


find doesn't search within subdirectories

If the subdirectory is a symbolic link, find will not follow it by default. Try:

find -L . -name '*~'

See this document for more.


Apple Developer Account enrollment language

Well, it turns out that it doesn't matter, you can have English tools and documentations.

And i'm very frustrated with the users of this website. No one answered ?! not even comment.


How to disable switching user with Touch ID?

It’s not possible to just disable Fast User Switching with Touch ID without disabling unlocking with Touch ID. However, it should be noted that the action of switching user with Touch ID is with a press of the Touch ID button, whereas a fingerprint read for the purpose of providing authentication is with a rest of your finger.

When prompted for Touch ID for authentication, such as by 1Password or a system dialog, rest your finger on the Touch ID button. Don’t depress the button.
When you want to use Fast User Switching, when no prompt for authentication is present, press down and click the button with your finger on Touch ID.

These are two distinct actions, with the former performing no action if there is no active prompt for authentication requiring Touch ID. Therefore you won’t inadvertently perform a user switch.


You can try entering DFU mode by using the DFU IPSW feature with redsn0w.

From what I understand it will create an IPSW and you can click Shift+Restore in iTunes, point to the IPSW redsn0w made and iTunes will put your device in DFU mode.

From there you can try restoring normally with iTunes.


Can I use IDLE to write python programs instead of the terminal on Mac?

Macs come with Python2 and this should not be removed. Installing a new version is fine as long as you use virtual environments. You should use the Anaconda distribution of Python, then setup and use virtual environments.

There are several sites, like this one which will walk you through the process. It's very easy using Anaconda. Another site is here. Once you get virtual environments set up, activate the one for the version of Python you want to run. You can then use IDLE or Atom to write and run your scripts.

Using virtual environments also allows you to change which Python version is used at the terminal.

If this is unclear just leave a comment and I will write a message explaining this better.


How to diagnose intermittent keyboard lockup and mouse problems

The problem was the battery was expanding and pressing on the motherboard. I was told by Apple that it is not uncommon for old batteries to expand after a few hours of using the machine. In summary, I just needed to replace the battery.


Upload pics to iCloud from old iPhone not primary iPhone

Transfer them directly to the laptop, using iPhoto [Mac] or Photo Gallery [Win]


Can apps on an external display be moved to a new space on disconnect?

Looks like if you create a blank space on your laptop side of things and place it in the Desktop 1 spot all the external display apps will go there on disconnect. Only weird thing is when you reset your computer if you aren't plugged into an external monitor then some of the apps seem to move around a little bit, otherwise this method seems to be exactly what I was looking for.

Cheers


iOS: Photos app taking 800 MB after deleting all photos

Check under Photos' Recently Deleted album. From the Albums view, it appears as a trash can.

Since iOS 8, photos that have been deleted remain on your phone under the Recently Deleted album and are automatically deleted after 30 days, or until you delete them yourself, after which they are permanently gone.

The images in this album still occupy space on your phone. To remove them, go into the album, tap "Select" in the top right corner, and then "Delete All" in the bottom left corner.


I think Xcode 4 does not support Java or python so I would be interested in seeing what the chat said. OSX does support both.

Xcode was never a very good IDE for java or python so I would always try to use something else (except if using PyObjc)

Look on Stack Overflow for suggestions of IDEs

IntelliJ/PyCharm and Eclipse work on OSX as do several others


Apple TV functions as Airplay target, not independently

As mentioned by cloneman it sounds like there is a Communication Problem between Apple-TV and the Reciver or the Reciver and the TV.

Maybe its like on my Setup (i have an older TV which doesn't Support a Resolution as high as the AV-Reciver)

So if i turn on The TV first than the Reciver than Apple-TV it works as it should. (cause the Reciver starts after TV it knows what Resolution the TV supports - he can ask if not)

If i turn on the Reciver first than the TV it doesn't show but audio works (cause the Reciver directly plays the Audio also it gets the Video and passes it out but in a to high Resolution so the TV can't show it)

Maybe you can try out different sequences of turning on (and find a way that works for you)

If not try this (most of todays TV's have more than one Input and also most of the AV-Recivers have at least one SPDIF Input) assuming yours also. Connect Apple-TV via SPDIF to the AV-Reciver and via HDMI to one of the HDMI Inputs of the TV direct.

So you give the Apple-TV and the TV the possibility to directly communicate and they should be able to handle out a resolution that works for both.


Is it not possible to make Apple Watch chime on the hour?

There's currently no native way to play a chime on the hour with watchOS - well, at least not without workarounds using the Timer, Reminders, etc.

However, there are a number of 3rd party Apple Watch apps available that provide this functionality. Below are just a few:

Little Ben
Cuckoo Watch
Diii


Tap on the More button after swiping left and you’ll find a new option to show related messages.

Source : http://www.maclife.com/article/features/50-ios-8-tips-and-tricks


How do I get a tighter grid for MIDI editing in GarageBand 10?

You can!  But the feature is different than before.  To get a smaller grid you can click the arrow at the right side beat/tempo/key led area and select "time".


Bought an iPhone 6 from a friend - iCloud question

It's not clear what you mean by you've deleted their Apple ID and iCloud account from the phone, but if you've fully signed out of all services (i.e. Apple ID, iCloud, iTunes and App Store) then you're on the right track.

However, your friend needed to follow some steps before selling you their phone. According to Apple, this is what someone should do before they sell or give away their iPhone, iPad, or iPod touch.

I would start again by getting together with your friend and double-checking that everything is done the way it should be.


How to stop my SSD "ejecting" from my iMac when in standby?

have a look at:

http://www.mac-forums.com/apple-notebooks/273332-2nd-internal-hard-drive-ejects-sleep.html

It seems to be the caddy.


Sure - if you don't need to make backups or transfer, install the Shortcuts app (used to be called Workflow) before Apple bought the company and renamed / shipped / enhanced the automation app for iOS.

You need two items - select photos and delete photos

For select, you can choose photos before a date. If you're not sure, you can limit it to 5 photos so you can validate it's getting the ones you want to delete.

Just be sure you know if your iCloud photo library is tied to the iPhone since deleting a photo will then cascade and delete in the cloud as well.

Delete photos on iPad without affecting photos on iPhone
Deleting photos off of my iPhone but leave photos in the cloud


Alternatives to Google Earth that can consume KMZ

Marble looks like a good replacement. It's free, open source, and says it supports KML files.
I haven't tried it though.


How do I debug an out-of-control "kernel_task" process?

I had a similar question about how to identify files and programs connected to kernal_task using the following terminal command:

kextstat -l -k | awk '{n = sprintf("%d", $4); print n, $6}' | sort -n

This will display various kexts and the memory associated with them.  For example, 6184960 com.apple.driver.AirPort.Brcm4360 is a big hog for me, but I can't do much about it if I want to use wifi.

One of the suggestions I received was to look up all non-Apple kexts are taking up memory by piping the above to grep -v com.apple.  It's possible that some non-Apple programs are using up your resources.  You should be able to remove those without breaking anything.

The age old solution of course is to restart your computer.  Sometimes that's all it takes to set processes back to their normal levels of CPU usage.


Open Console

Type Airport in Search (for all messages)

Or Scroll all the way down to wifi


How to mount disk by UUID or LABEL in OS X El Capitan?

When using OS X, it's usually more advisable to use diskutil for disk-related activities.

TL;DR:

To mount a volume/disk by identifier:

diskutil mount /dev/diskXsY          # mounts just that volume
diskutil mountDisk /dev/diskX        # mounts the whole disk

To mount a volume by UUID:

diskutil mount [Volume/Partition UUID]

To mount a volume by label:

diskutil mount [label]

Explanation

With diskutil, node identifiers (/dev/diskXsY) are interchangeable with UUIDs: in any diskutil operation (such as eject), a UUID can be specified instead of a node identifier. From the man page:

  DEVICES

  A device parameter to any of the above commands (except where
  explicitly required otherwise) can usually be any of the following:

  o   The disk identifier (see below).  Any entry of the form of disk*, e.g.  disk1s9.

  o   The device node entry containing the disk identifier.  Any entry of the form of /dev/disk*, e.g.  /dev/disk2.

  o   The volume mount point.  Any entry of the form of /Volumes/*, e.g.  /Volumes/Untitled.  In most cases, a "custom" mount
  point e.g.
                 /your/custom/mountpoint/here is also accepted.

  o   The URL form of any of the volume mount point forms described above.  E.g.  file:///Volumes/Untitled or file:///.

  o   A UUID.  Any entry of the form of e.g.  11111111-2222-3333-4444-555555555555.  The UUID can be a "media" UUID
  which IOKit places in an IOMedia node
                 as derived from e.g. a GPT map's partition UUID, or it can be an AppleRAID (or CoreStorage) set (LV) or member (PV) UUID.

  From man diskutil, section 'Devices'.

Obtaining these identifiers/UUIDs/labels are simple, with either of the following commands:

diskutil list                               # lists all connected volumes and their identifiers
diskutil info /dev/diskXsY | grep UUID      # gets the UUID of a connected volume

The returned values from these commands should look something like the following:

$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh SSD           499.4 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

$ diskutil info /dev/diskXsY | grep UUID
Volume UUID:              1F340CD7-G071-4218-98DG-2D08G89CC57C
Disk / Partition UUID:    76E7G531-G6C3-5E37-C11B-BCEEC67D12G4

As shown above, the identifier can be found from the IDENTIFIER column, the label from the NAME column, and the UUID from either UUID field (either UUID will mount the volume).

By label:

$ diskutil mount Recovery\ HD
Volume Recovery HD on Recovery HD mounted

By UUID:

$ diskutil mount 67EG87EB-CB01-4ED9-082D-303F63CF6394
Volume Recovery HD on 67EG87EB-CB01-4ED9-082D-303F63CF6394 mounted

By disk identifier:

$ diskutil mount /dev/disk0s3
Volume Recovery HD on /dev/disk0s3 mounted

addition for edit to OP's question: mounting to a custom path

You can do this with diskutil mount and the -mountPoint option. From the man page:

  mount [readOnly] [-mountPoint path] device

  Mount a single volume.  If readOnly is specified, then the file system is mounted read-only, even if the volume's underlying file system and/or device and/or media supports writing; even the super-user may not write to it; this is the same as the rdonly option to mount (8).  If a -mountPoint is specified, then that path, rather than the standard path of /Volumes/VolumeName, will be used as the view into the volume file con- tent; a directory at that path must already exist.

  From man diskutil, section 'Verbs'.

The syntax to mount to a custom mountpoint is as follows:

diskutil mount -mountPoint /path/to/custom/mountpoint [volume (identifier/UUID/label)]

Bear in mind that /path/to/custom/mountpoint must be a directory, just like with mount, and that your identifier/UUID/label are specific to the volume (i.e. /dev/diskXsY not /dev/diskX). Mounting to a custom mountpoint cannot be done with diskutil mountDisk, and only works with a single volume at a time.


A bunch of seemingly random files disappeared from my Mac

You have identified the probable cause.  From Apple:

When space is needed, it keeps files, photos and videos, Apple TV
movies and shows, and email attachments in iCloud and makes them
available on demand. Files don’t take up space on your Mac, and you
can download the original files when you need them.


Prevent OSX from auto-detecting and deleting dates in iCal, Reminders

Since data detectors are handled by Mail & not iCal itself you may turn this feature of with the following command entered in Terminal:

defaults write com.apple.mail DisableDataDetectors YES

To revert this behaviour:

defaults write com.apple.mail DisableDataDetectors NO

Please note that any time detection features of Mail are turned of as well.


JBL Soundfly Air with multi-router AirPort Express WiFi

Turns out the JBL Soundfly officially only supports 802.11b/g according to this document (page 3).

This leaves me wondering why it apparently worked with the 802.11n network, or whether that was a problem with my test. But now it has been working for a few minutes without any problems.


iMac goes to sleep because the battery has 0% left

I would recommend performing a re-install of macOS. This does not require that you delete your existing data and should be non-destructive. However, backups are always good to have.
Reboot into recovery mode (instructions are available on Apple's Website). Ensure that the installer shown in recovery mode is for Mojave (if not, then the system may be updated or downgraded when you do this!). Run the Install macOS option in Recovery mode and choose your existing disk.
It will install macOS on top of your disk, but leave your data in place.


iPhone 7 Plus takes days to turn on showing Apple logo or black screen

...when my phone died I put it on the charger, then the logo appears
  and goes off. When it goes off, a black screen pops out with a little
  white line on in it, then it turns on back to Apple logo. It keeps
  doing this until it turns on which is 1 or 2 even now 3 days.

This is indicative of a battery failure and you need to have it replaced.

Your battery is having difficulty holding a charge under a certain level (batteries are really never at 0V).   The battery itself has an operating range - it may be 12 to 8 volts DC.  Under 8V, it will give you the black screen and not power on until it reaches that minimum threshold.  If it's taking 2 or 3 days to meet that threshold, it means that the battery's capacity has diminished to a point that the charger can barely keep up with the dissipation - think "keeping your head above water" analogy.

There will come a point in time (very soon) where the charger simply won't be able to charge the cell(s) anymore.


Does OSX Mavericks Have an Equivalent to the F11 Show/Hide Shortcut in Snow Leopard?

First, the keyboard shortcut in 10.6 Snow Leopard (and almost all versions of OS X) for Expose "Show Desktop" is not F11 unless you have 'Use all F1, F2, etc. keys as standard function keys' clicked in System Preferences > Keyboard.

It's actually, by default fn-F11. Exactly the same as it is in 10.9 Mavericks. I suspect that under 10.6 you had the System reversing the standard by clicking the above and got used to that and 10.9 is set to the default where F11 adjusts the volume. Try fn-F11 and it should work. Of course if you want it the other way round then change it in System Preferences.


F20-F24 keys do not respond, but are mapped

Here is the guessing answer, but makes sense, so probably possibly true.
What's peculiar about F21-F24 keys on MacOS?


How to prevent second OS X partition from seeing apps in the other partition?

Unmounting the 'unwanted' partition before installing the new application should help in most cases:

Quit all open applications
Start Terminal.app and enter diskutil list

output looks like this:

 #: TYPE NAME SIZE IDENTIFIER
 0: GUID_partition_scheme *121.3 GB disk0
 1: EFI 209.7 MB disk0s1
 2: Apple_HFS Yosemite 60.2 GB disk0s2
 3: Apple_HFS Mavericks 60.3 GB disk0s3
 4: Apple_Boot Recovery HD 650.0 MB disk0s4

determine the identifier of the partition to unmount by size/volume name and enter diskutil unmount /dev/IDENTIFIER
(in the above case diskutil unmount /dev/disk0s2 to unmount the 'Yosemite' partition)
To remount this partition afterwards just enter diskutil mount /dev/disk0s2


Run an AppleScript by using a keyboard shortcut

A program like Keyboard Maestro can do exactly as you said, but instead of saving the AppleScript as just regular text you can save it as a script (.scpt) and just pass the path to osascript.

A program that I've used off and on that is designed to do this specifically is Red Sweater Software's FastScripts. It's free for up to 10 keyboard shortcuts. Otherwise I've just used LaunchBar (while others would recommend other app launchers)


That cable won’t work.

First, the monitor doesn’t have a DisplayPort input nor does it have a USB upstream port.  It has a Thunderbolt 3 port that uses the USB Type C connector.  The USB-C down stream ports are supplied by the Thunderbolt connection.

Secondly, even though TB is backward compatible, it’s one way.  So, a laptop with a TB 3 port can work with a TB 1 or 2 device, but a TB 3 device can’t work with a TB 1/2 laptop port.  The adapter can’t add capabilities to a machine that doesn’t already have.


The Applescript-native way to rename files is:
tell application "Finder"
    set theFile to (choose file)
    set name of theFile to "Yay"
end tell

If you wanted to rename every file in a folder, I'd put the files into a list and use a Repeat block on each one:
tell application "Finder"
    set theFolder to (choose folder)
    set folderContents to every item of theFolder
    repeat with theFile in folderContents
        set name of theFile to "Yay"
    end repeat
end tell

(This code won't actually run as-is because you can't have two files named "Yay", but the first does get renamed, and you get the idea.)
This is closer to what you want to do, but we're not quite there—you want to get the current file's name, make some changes to it, and save the new name.
There's a subroutine I found years ago somewhere (I can't seem to find the source now) which will get everything to the right of a certain character, such as an underscore. This makes it easy to do exactly what you want. The full, final code is:
tell application "Finder"
    set theFolder to (choose folder)
    set folderContents to every item of theFolder
    repeat with theFile in folderContents
        set oldName to name of theFile
        set newName to my rightString(oldName, "_")
        set name of theFile to newName
    end repeat
end tell

on rightString(str, del)
    local str, del, oldTIDs
    set oldTIDs to AppleScript's text item delimiters
    try
        set str to str as string
        if str does not contain del then return str
        set AppleScript's text item delimiters to del
        set str to str's text items 2 thru -1 as string
        set AppleScript's text item delimiters to oldTIDs
        return str
    on error eMsg number eNum
        set AppleScript's text item delimiters to oldTIDs
        error "Can't rightString: " & eMsg number eNum
    end try
end rightString


How do I transfer my entire itunes library (retaining the original music playlists) from my iPad iOS 5.1

You don't move your Music from the iPad to the new computer, you copy your entire iTunes library from your old computer to your new computer and then re-sync your iPad to the new computer.

Here are the Apple instructions:
http://support.apple.com/en-us/HT4527


One email address has two Internet Accounts

You don't have two email accounts.  You just have two email protocols set up.

From Wikipedia:

  Virtually all modern e-mail clients and servers support IMAP. IMAP and
  the earlier POP3 (Post Office Protocol) are the two most prevalent
  standard protocols for email retrieval, with many webmail service
  providers such as Gmail, Outlook.com and Yahoo! Mail also providing
  support for either IMAP or POP3.

The major differences between POP and IMAP is that POP supports the "download and delete" methodology and IMAP "synchronizes" its content between the server and client thus allowing you to have multiple email clients updated.

With the setup you have, the POP protocol negates any advantage you would have gained with IMAP since it downloads and deletes the message meaning there is no longer anything for IMAP to sync.

So, which one to use?

If you want sync'd emails across devices, keep IMAP.  If you have only one device and you want to save your emails locally, use POP.

You can remove your POP email protocol by deleting it, but if you want to save your messages, you can create a "Saved Message Folder" under the IMAP account and move everything from POP there.  Once copied over, delete the POP account.


Mac Pro going to sleep when rebuilding RAID array

Check 'man pmset'

you want

pmset disksleep 0 sleep 0

I think.


Your primary option is to test your restore with live data so you can see all the things your server setup does that isn't covered by a Time Machine.

You'll also want to get a tool like Bender to handle exporting and importing settings on the server.app itself.

Ideally, you have a setup document where you recorded each and every thing you configured since that will be your checklist that everything is covered.

Did you set up alternate data location for some of the services?
Did you "correct" any dot files for users and run any terminal commands?
Do you have any launchd tasks that are not packaged (I often make routing and other changes that run to set static routes, roll over application log files, etc...)

Server is a different beast and you can and will set up many large databases - some of which need to be archived and then restored later like mail, web, LDAP. As your server grows, you will come to think of each data as separate since backing them all up with the same frequency or mechanism isn't a good solution technically. Time Machine is a starting point, not an end point and using mirror technology like Carbon Copy Cloner or SuperDuper! isn't usually the answer since it often takes a day or two to restore terabytes of data when you can instead have that data on a storage appliance and just use your OS and configuration backups to save the glue and code and tools - not the product.


In 10.7 and up, you can assign apps to Desktops. To assign an app, Control+click the app's Dock icon, navigate to Options and then choose to assign it either to All Desktops, This Desktop or None.

All Desktops assigns the app to be open on whatever Desktop you switch to. If you have it open on Desktop 1, and switch to Desktop 2, it will appear to not have moved.

This Desktop assigns the app to a specific Desktop, and force it to always open there. This is the option I would try to accomplish your goal.

None is the default setting, and leaves the app unbound by any Desktop-specific rules.


How can I mark (movie) files in finder (as watched)?

Simply put, No. Finder is for file management, therefore such feature will be weird. You might be able to find plugins for this, but I doubt it. Most people use iTunes to achieve such job, which you seems to be reluctant to do.

You can try making a separate iTunes library for these files, and not importing them to your new library. That might help.


To install Apache Tomcat on Debian, follow the instructions provided by Digital Ocean: How To Install and Configure Apache Tomcat on a Debian Server.

The two steps are:

sudo apt-get update
sudo apt-get install tomcat7

Installing Tomcat on your virtual machine does not require Mac OS X specific commands. Your installation is taking place within the virtual machine and all the commands should be Debian specific.


How to completely reset or remove and restore Safari in Mojave

The first thing I would do is Clear History from the Safari menu. After that quit and re-launch Safari while holding down the Shift key. That will launch Safari in Safe Mode and disable any third party extensions.

If Safari behaves itself after that, disable your extensions and re-enable them one at a time.

Failing that, more extreme measures are in order. I would start with a preferences clean. Quit Safari and then in Finder hold down the Option and select the Go menu and then "Library" from that menu.

Once the Library folder is open look for a folder or folders with Safari in the name and move the contents of each to folders on your Desktop. Then look for a Preferences folder in the Library folder and open it up. Look for any file/folder with Safari in the name and move them to the desktop. Once the library folder is clear of Safari-related files Try safari then and see how things are working.

If things are still not working properly I would download and install the Combo update for the current version of your macOS. Search on "combo update mac os 10.14.5" (or whatever your current version is). It will lead you to a large file on apple.com. Download and run it. It will update your OS and will usually fix problems such as this.

If that still does not fix the problems let us know.


Adjust Scroll Speed for Specific Application

I have found an app called Smart Scroll which does what I need it to do. It allows you to change scroll speed for specific apps and a lot more options in general


Does letting services like PostgreSQL, Redis, MongoDB and Mysql run all the time eat up battery life and system resources?

I've switched to running the services all the time instead of using foreman and I haven't really had any problems with battery life.

I've also installed LaunchRocket which makes it easier to actually manage those services from the Settings.app.  I'm very comfortable in the command line however this just makes it super easy to start or stop the services.

I'm also toying with the idea of using ControlPlane to have start or stop some of the services depending on if I'm at work or not.


Can MacDrive break my Time Machine backups?

The short answer is Yes.

If the Time Machine drive is accessible to Windows (via MacDrive or anything else), then it can be corrupted and directly destroyed.  For this reason, I recommend turning off your Time Machine drive while in Windows.

Another possibility is that modifications to your primary drive could cause its ID to change, which would break its association with its existing Time Machine backups.  The old Time Machine backups would still be there on the backup drive, but they would be treated as being backups of a different system.  It sounds like this is probably what happened.  It could be because you (or something) renamed the primary drive or otherwise tried to change it at the root level.  But since you saw a MacDrive error, its more likely a glitch in MacDrive.  There's not much you can do to prevent that except not use it.

Try running a Disk Utility check on all drives, preferably while booted from a DVD or an external drive.  That will at least make sure nothing worse happened.


Can you change an MOV to an MP4 without transcoding?

You could do that with ffmpeg:

ffmpeg -i video.mov -vcodec copy -acodec copy video.mp4

This will just change containers, but obviously will only work with a codec that ffmpeg supports.

Edit: if you absolutely need a GUI, you could use Automator to create a Drag & Drop target, like this:


How can I set a web server in a specific directory in OSX Mavericks?

This might be overkill, or answering a slightly different question than you asked, but if you have npm, you can

npm install http-server

and then just

http-server

from the directory you want to host. http-server will reply with the path hosted and the port it is hosted on e.g.:

Starting up http-server, serving ./foo on port: 8080
Hit CTRL-C to stop the server

If you launch multiple instances it will increment the port.


iPhoto refuses to open, even after deletion and reinstall

Either copy a working version of that NyxAudioAnalysis.framework from a working machine or reinstall the OS.


Can I use bootcamp without reformatting my hard drive?

Boot Camp doesn't require you to reformat your drive. HFS+ partitions can be live-resized by the Boot Camp Assistant or the Disk Utility without going through the trouble of erasing everything. No file on your Mac OS partition will be affected.

There is, however, the case where you've had your computer for long and Mac OS has written files all across your drive. In this case, you will need to defragment your drive, in order to put all your files in a nice contiguous space on your hard drive, so that all the remaining space is contiguous too and a partition can be made there. As far as I know, iDefrag can do this for about $15. (Disclaimer: I never did it and can't guarantee it will work. But it should. Can someone confirm?)

The other way, if you have an external drive, is to copy all your files to this external drive using a software like Carbon Copy Cloner (free), reformat your drive, then copy them all back to your drive. Everything should be like before and you'll have no hassle except the time required to copy back and forth (your programs and your serial numbers and the such will be intact).


What Time Does My iTunes Gift Get Received To The Recipient?

I tried it before and receive it within minutes. Make sure she checks her email spam filters.


How to delete all but certain values from many JSON files?

Here is one of the ways I would do it...
The following was tested and worked for me under macOS Catalina 10.15.6.
I downloaded jq from https://stedolan.github.io/jq/download/ under the OS X section:

jq 1.6 binary for 64-bit

In Terminal, I ran the following commands:
cd ~/Downloads
xattr -d com.apple.quarantine jq-osx-amd64
sudo cp jq-osx-amd64 /usr/local/bin/jq
sudo chmod 0755 /usr/local/bin/jq

    • Note: If /usr/local/bin does not already exist, it must first be created with e.g.: sudo mkdir -p /usr/local/bin
The aforementioned steps have now set up jq for use from the command line in Terminal, or from a Run Shell Script action in Automator, or a do shell script command using AppleScript.
Downloading a video from YouTube with youtube-dl using the --write-info-json option, I then used the example shell script code, shown below, in a Run Shell Script action in an Automator workflow as a Service/Quick Action to process the JSON file so it would only have the keys you've mentioned.
Example shell script code:
for f in "$@"; do
    [[ -f $f ]] || continue
    [[ $f =~ .*\.json$ ]] || continue
    fn="${f##*/}"
    tmpfile="$(mktemp /tmp/"${fn}.XXXXXX")" || exit 1
    /usr/local/bin/jq '{"upload_date": .upload_date, "fulltitle": .fulltitle, "description": .description}' "$f" > "$tmpfile"
    mv "$tmpfile" "$f"
done

With this setup as shown in the image further below, I select the JSON file, created by youtube-dl using the --write-info-json option, in Finder and then right-click on it selecting Cleanup youtube-dl JSON from the context menu.
It then produced a JSON file with the following example structure, while overwriting the original JSON file:
{
  "upload_date": "20080913",
  "fulltitle": "Jerry Seinfeld returns to Comedy on the Letterman show",
  "description": "Jerry Seinfeld returns to Comedy on the Letterman show"
}

Notes:

The example JSON file was created from the output of:
youtube-dl --write-info-json https://www.youtube.com/watch?v=8JOsxxm-RnQ

The example shell script code, as coded, can handle multiple selected JSON files in Finder at the same time.

While the example shell script code does contain some error handling, nonetheless it does not backup the original JSON file(s) before overwriting. Additional code is required to be added if that is something you need/want.

The example shell script code, as coded, does not contain any error handling in regards to the jq command used and is only meant to be used on JSON files created by youtube-dl using the --write-info-json option with the assumption that the target keys always exist under the circumstances. Otherwise, additional error handling may be required.

The format of the  JSON files created by youtube-dl using the --write-info-json option are flat formatted, meaning it is written all on one line. The output of the jq command, as written, produces multi-line output. If you desire flat formatted output, you can use the -c option, e.g.,: jq -c ...

The example shell script code can be used in a standard  shell script, made executable, and run from the command line in Terminal.

The error handling can be removed from the example shell script code and formatted so it can also be use as a one-liner after changing directory the where the JSON files are located. e.g.:
for f in *.json; do jq '{"upload_date": .upload_date, "fulltitle": .fulltitle, "description": .description }' "$f" > "tmp"; mv tmp "$f"; done

        • Note: This overwrites the original file without a backup.

NOTE: JSON files are not just ordinary plain text files per se, they are specially formatted, and one should not parse them with utilities such as sed, awk, etc., and instead use a utility expressly designed to work with JavaScript Object Notation (JSON) files! jq is a utility designed to work with JSON files.


How secure are password protected PDFs that are created with Preview?

The last Time I checked a 128 bit RC4 encryption of the whole document was used. Also, compatability should be vested.

Here's a screenshot of the output of GuaPDF:


You could use the third-party tool ImageMagick, which can perform a wide variety of image transformations, including converting to a lower quality. You can install it with Homebrew with brew install imagemagick. You would include it through the do shell script command, for example do shell script 'convert input.png -quality 85% output.jpg'.


tell application "System Events"
    set textToType to "text here"
    keystroke textToType
end tell

Replace within the quotes of "text here" to what ever you need.


Don't use an Apple account. You can sync contacts from Google or Microsoft accounts with iOS devices, so use one of those accounts to store your contacts.


How to redirect out going traffic to an IP address to another host name?

You don't specify whether you want to block incoming traffic from that host name or outgoing or both. You also don't mention what version of Mac OS X you are running and whether or not you are trying to block that host with a specific application like Little Snitch or similar. Some logs would be helpful as well. Consult this page to help you formulate better questions for the community to be able to answer.

203.130.48.8-BJ-CNC is a valid hostname according to IETF standard RFC 952.

  A "name" (Net, Host, Gateway, or Domain name) is a text string up
  to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus
  sign (-), and period (.).

To block outgoing traffic to it, use the hostname in your /etc/hosts file like so:

127.0.0.1    203.130.48.8-bj-cnc

Then do:

sudo dscacheutil -flushcache

to load the new rules.

If you want to be able to block outgoing traffic to the actual ip address of the machine you'll need to use Mac's builtin packet filter (originally from OpenBSD's excellent PF. A pf.conf rule would look like this:

block out log quick on $ext_if proto { tcp, udp, icmp } to 203.130.48.8

Blocking incoming traffic from that ip is generally handled just fine by using Mac OS X's default application firewall in  -> System Preferences -> Security & Privacy -> Firewall. Alternatively you can set the policy via the commandline like so:

sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setblockall on

for thoroughness, you may also want to block all icmp requests:

sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmod on

and finally enable it thus:

sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on


No need to try all key combos until it works, because you'll be disappointed. Check out this page from Apple Support, and you'll find, sadly, there is no reverse key combo because Finder has nothing to work with - no focus for the command.

Once the window is closed, not even Command - Tab > [minimized app icon] will open the app window!

The only way to open the app is to click on its icon in the Dock.


Where does Safari Web Inspector store images?

This indeed looks to be a bug.

You can watch all file access on your system with the opensnoop command. This requires root access - run it, then try hitting the download button - you'll see no access from Safari.

Time to hit Feedback Assistant and tell them what's going on!

The earlier comment is a good workaround - once the image is displayed, just hit CMD-C to copy it for pasting elsewhere.


Prepend folder names to file name and flatten file structure

Tricky one, especially if you want to keep all the spaces etc. Run the following in the top directory (the one which contains 2013-02   Snow and birds etc):

find . -type f -exec sh -c 'for f do x=${f#./}; echo mv "$x" "${x////_}"; done' {} +

The assignment to x gets rid of the leading ./ from find, the ${x////_} replaces all (remaining) occurrences of / with _.

Also, I've protected the actual mv with an echo so you can verify first whether the commands look ok. Rerun the command without the echo to actually rename/move the files.


External bootcamp drive not seen on different MacBook Pro

You do not have an EFI partition on the external drive. This would prohibit booting Windows on a different Mac. I expect that when you installed Windows, the boot files were placed in the EFI partition of the internal drive.

One possible solution would be to start over. This time make sure the external drive is correctly partitioned. The rules for partitioning are given in the Microsoft document UEFI/GPT-based hard drive partitions. If you are using the October 2018 Windows 10 release (1809), then I would recommend a WRE size of 800 MB.

Another possible solution would be to shrink your windows partition and add an EFI partition to the external drive. This is best done while booted to the Window Recovery Environment. (Hold down the shift key when rebooting Windows). After adding a EFI partition, you would then enter the commands to create the boot files in this partition. The command that actually creates the boot files is called bcdboot.

Below is a Windows installation similar to yours. This was setup in VirtualBox. The size of the drives and partitions are different, but the commands you would need to enter should close to what is shown.

The commands shown below were entered into a Command Prompt window after booting to the Windows Recovery Environment. These command create a bootable EFI partition at the end of the Windows disk. Also, the Windows boot files are removed from the original EFI partition.

Microsoft Windows [Version 10.0.17763.107]
(c) 2018 Microsoft Corporation. All rights reserved.

X:\windows\system32>diskpart

Microsoft DiskPart version 10.0.17763.1

Copyright (C) Microsoft Corporation.
On computer: MININT-9R6AU7J

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          155 GB      0 B        *
  Disk 1    Online          325 GB      0 B        *

DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Reserved            16 MB  1024 KB
  Partition 2    Primary            154 GB    17 MB
  Partition 3    Recovery           800 MB   154 GB

DISKPART> select partition 2

Partition 2 is now the selected partition.

DISKPART> shrink minimum=1000

DiskPart successfully shrunk the volume by: 1000 MB

DISKPART> create partition primary size=800

DiskPart succeeded in creating the specified partition.

DISKPART> format fs=ntfs label=temp quick

  100 percent completed

DiskPart successfully formatted the volume.

DISKPART> assign letter=t

DiskPart successfully assigned the drive letter or mount point.

DISKPART> select partition 3

Partition 3 is now the selected partition.

DISKPART> assign letter=r

DiskPart successfully assigned the drive letter or mount point.

DISKPART> exit

Leaving DiskPart...

X:\windows\system32>xcopy r:\* t: /e /h
R:\Recovery.txt
R:\Recovery\Logs\BootUX (1).sqml
R:\Recovery\Logs\BootUX (2).sqml
R:\Recovery\Logs\BootUX (3).sqml
R:\Recovery\Logs\Reload.xml
R:\Recovery\WindowsRE\boot.sdi
R:\Recovery\WindowsRE\ReAgent.xml
R:\Recovery\WindowsRE\Winre.wim
R:\System Volume Information\tracking.log
9 File(s) copied

X:\windows\system32>diskpart

Microsoft DiskPart version 10.0.17763.1

Copyright (C) Microsoft Corporation.
On computer: MININT-9R6AU7J

DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Reserved            16 MB  1024 KB
  Partition 2    Primary            153 GB    17 MB
  Partition 4    Primary            800 MB   153 GB
  Partition 3    Recovery           800 MB   154 GB

DISKPART> select partition 3

Partition 3 is now the selected partition.

DISKPART> remove letter=r

DiskPart successfully removed the drive letter or mount point.

DISKPART> delete partition override

DiskPart successfully deleted the selected partition.

DISKPART> create partition primary size=800 id=de94bba4-06d1-4d40-a16a-bfd50179d6ac

DiskPart succeeded in creating the specified partition.

DISKPART> format fs=ntfs label=Recovery quick

  100 percent completed

DiskPart successfully formatted the volume.

DISKPART> assign letter=r

DiskPart successfully assigned the drive letter or mount point.

DISKPART> GPT ATTRIBUTES=0x8000000000000001

DiskPart successfully assigned the attributes to the selected GPT partition.

DISKPART> detail partition

Partition 3
Type    : de94bba4-06d1-4d40-a16a-bfd50179d6ac
Hidden  : No
Required: Yes
Attrib  : 0X8000000000000001
Offset in Bytes: 165397135360

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
* Volume 3     R   Recovery     NTFS   Partition    800 MB  Healthy    Hidden

DISKPART> exit

Leaving DiskPart...

X:\windows\system32>

X:\windows\system32>xcopy t:\* r: /e /h
T:\Recovery.txt
T:\Recovery\Logs\BootUX (1).sqml
T:\Recovery\Logs\BootUX (2).sqml
T:\Recovery\Logs\BootUX (3).sqml
T:\Recovery\Logs\Reload.xml
T:\Recovery\WindowsRE\boot.sdi
T:\Recovery\WindowsRE\ReAgent.xml
T:\Recovery\WindowsRE\Winre.wim
T:\System Volume Information\tracking.log
9 File(s) copied

X:\windows\system32>diskpart

Microsoft DiskPart version 10.0.17763.1

Copyright (C) Microsoft Corporation.
On computer: MININT-9R6AU7J

DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART> create partition efi

DiskPart succeeded in creating the specified partition.

DISKPART> format fs=fat32 label=EFI quick

  100 percent completed

DiskPart successfully formatted the volume.

DISKPART> assign letter=s

DiskPart successfully assigned the drive letter or mount point.

DISKPART>  GPT ATTRIBUTES=0x0000000000000000

DiskPart successfully assigned the attributes to the selected GPT partition.

DISKPART> detail partition

Partition 5
Type    : c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Hidden  : Yes
Required: No
Attrib  : 0000000000000000
Offset in Bytes: 166235996160

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
* Volume 5     S   EFI          FAT32  Partition    200 MB  Healthy    Hidden

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Reserved            16 MB  1024 KB
  Partition 2    Primary            153 GB    17 MB
  Partition 4    Primary            800 MB   153 GB
  Partition 3    Recovery           800 MB   154 GB
* Partition 5    System             200 MB   154 GB

DISKPART> select partition 4

Partition 4 is now the selected partition.

DISKPART> remove letter=t

DiskPart successfully removed the drive letter or mount point.

DISKPART> delete partition

DiskPart successfully deleted the selected partition.

DISKPART> select partition 2

Partition 2 is now the selected partition.

DISKPART> extend

DiskPart successfully extended the volume.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Reserved            16 MB  1024 KB
* Partition 2    Primary            154 GB    17 MB
  Partition 3    Recovery           800 MB   154 GB
  Partition 5    System             200 MB   154 GB

DISKPART> select disk 1

Disk 1 is now the selected disk.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    System             210 MB  1024 KB
  Partition 2    Unknown            324 GB   211 MB

DISKPART> select partition 1

Partition 1 is now the selected partition.

DISKPART> assign letter=u

DiskPart successfully assigned the drive letter or mount point.

DISKPART> list volume

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     D   CCCOMA_X64F  UDF    CD-ROM      4840 MB  Healthy
  Volume 1     C   Win BC       NTFS   Partition    154 GB  Healthy
  Volume 3     R   Recovery     NTFS   Partition    800 MB  Healthy
* Volume 4     U   EFI          FAT32  Partition    210 MB  Healthy    Hidden
  Volume 5     S   EFI          FAT32  Partition    200 MB  Healthy    Hidden

DISKPART> exit

Leaving DiskPart...

X:\windows\system32>

X:\windows\system32>bcdboot c:\Windows /s s: /f UEFI
Boot files successfully created.

X:\windows\system32>u:

U:\>cd efi

U:\EFI>rd /s /q Microsoft

U:\EFI>rd /s /q Boot

U:\>exit

After booting back to Windows, I noticed the Windows Recovery Environment did not work properly. Below are the commands entered in a Administrator Command Prompt window which fixed the problem.

Microsoft Windows [Version 10.0.17763.107]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Windows\system32>reagentc /info
Windows Recovery Environment (Windows RE) and system reset configuration
Information:

    Windows RE status:         Disabled
    Windows RE location:
    Boot Configuration Data (BCD) identifier: b1098958-1b75-11e9-a3a8-ba8bed1fcc42
    Recovery image location:
    Recovery image index:      0
    Custom image location:
    Custom image index:        0

REAGENTC.EXE: Operation Successful.

C:\Windows\system32>diskpart

Microsoft DiskPart version 10.0.17763.1

Copyright (C) Microsoft Corporation.
On computer: DESKTOP-Q438CQ5

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          155 GB      0 B        *
  Disk 1    Online          325 GB      0 B        *

DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Reserved            16 MB  1024 KB
  Partition 2    Primary            154 GB    17 MB
  Partition 3    Recovery           800 MB   154 GB
  Partition 4    System             200 MB   154 GB

DISKPART> select partition 3

Partition 3 is now the selected partition.

DISKPART> assign letter=r

DiskPart successfully assigned the drive letter or mount point.

DISKPART> exit

Leaving DiskPart...

C:\Windows\system32>reagentc /setreimage /path r:\Recovery\WindowsRE
Directory set to: \\?\GLOBALROOT\device\harddisk0\partition3\Recovery\WindowsRE

REAGENTC.EXE: Operation Successful.

C:\Windows\system32>reagentc /enable
REAGENTC.EXE: Operation Successful.

C:\Windows\system32>reagentc /info
Windows Recovery Environment (Windows RE) and system reset configuration
Information:

    Windows RE status:         Enabled
    Windows RE location:       \\?\GLOBALROOT\device\harddisk0\partition3\Recovery\WindowsRE
    Boot Configuration Data (BCD) identifier: aea2b938-1ba3-11e9-b797-c059ce58515c
    Recovery image location:
    Recovery image index:      0
    Custom image location:
    Custom image index:        0

REAGENTC.EXE: Operation Successful.

C:\Windows\system32>diskpart

Microsoft DiskPart version 10.0.17763.1

Copyright (C) Microsoft Corporation.
On computer: DESKTOP-Q438CQ5

DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Reserved            16 MB  1024 KB
  Partition 2    Primary            154 GB    17 MB
  Partition 3    Recovery           800 MB   154 GB
  Partition 4    System             200 MB   154 GB

DISKPART> select partition 3

Partition 3 is now the selected partition.

DISKPART> remove letter=r

DiskPart successfully removed the drive letter or mount point.

DISKPART> exit

Leaving DiskPart...

C:\Windows\system32>exit

If you have any questions, post a comment.


Where did the usage bar go in itunes 12.5.1.21?

Are you on the correct page?

If you can see this icon, then you're not. Click it.


keyboard no longer repeats keys when held down

The accented character selection when a key is held was one of the tiny things that changed in Lion. To disable it, run this in the Terminal:

defaults write -g ApplePressAndHoldEnabled -bool false

I will admit, though, it is strange that there's a setting in System Preferences that only affects behavior accessed through a defaults write command.


Talked to a coworker who had the same problem. The issue was that the mtu was set too high on the ppp0 interface.

$ ifconfig ppp0
ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1396
        inet 192.168.0.207 --> 192.168.0.200 netmask 0xffffff00

I changed it from 1396 to 1250 and it now works fine. To make the change permanent, I did the following:

$ sudo <your_text_editor_of_choice> /etc/ppp/ip-up

#!/bin/sh
/sbin/ifconfig ppp0 mtu 1250

$ sudo chmod 755 /etc/ppp/ip-up


Using Console utility to get the full logs with admin perms but as a non admin user

A good work around, for me at least is lnav. It is probably more resource efficient than console, will run happily in an admin mode terminal session and offers:

filters
multiple file interleaving
choice over what log files where
understands a number of standard log file formats
colouring error/warnings (a bit lurid, maybe that can be configured)
neat help about where in log you are and the source of messages (if multi-file)
calculates message rates and can move to slower sections etc
bookmarking
time line summary (e.g. normal, error & warns errors in each 5 min block)
SQL query engine

And much more I'm sure, just starting here. A tool written by and for users I think! 10% of the memory and CPU of Console, more functions.

The binary download wants a later sqlite3 than standard mac distort so I brew'd the lot. Not sure how it works under the rewritten logging system!

So far? I'm thrilled!


Make sure there are no processes hogging your CPU (this eats battery).

Open Activity Monitor from /Applications/Utilities.
Set the Show menu at the top right to All Processes
Click the %CPU column head so the triangle faces down.
Which processes are at the top? How much are they using?

This may reveal what's going on.

Also, you can check the health of your battery to make sure it's not a hardware problem.
Download the free coconutBattery app and see what it has to say about your batter's capacity.


Top will do it. However, this is not documented in the man page.

Example:

  top -stats pid,command,power -o power -l 0

And of course you can grep the process of your choice

You can also use the powermetrics command to get some general info.

See documentation via man or here

A nice example can be found here

  powermetrics -i 1000 --poweravg 1 | grep 'Average cumulatively decayed power score' -A 20


At what point do iPads stop displaying "not charging" when connected to power?

The iPad manual (page 136) and other Apple documentation (see bottom) are not very specific in this regard meaning...

...they do not state specific minimum currents required for charging.
...they only distinguish between:

charging while the iPad is awake (USB hubs with 1100 mA; newer Macs/displays)
charging while the iPad is in sleep mode (USB hubs with 500 mA; standard USB/old Macs)

  Low-battery image or “Not Charging” message appears

   or

  When charging, make sure you’re using the 10W USB power adapter that came with iPad or the USB port on a recent Mac. The fastest way to charge is to use the power adapter.
  For faster charging, turn iPad off.
  iPad may not charge when connected to the USB port on an older Mac, a PC, a keyboard, or to a USB hub.
  If your Mac or PC doesn’t provide enough power to charge iPad, a Not Charging message appears in the status bar. To charge iPad, disconnect it from your computer and connect it to a power outlet using the included Dock Connector to USB Cable and 10W USB power adapter.

Also see the following documents:

iPad: Charging the battery
Batteries: iPad


Where should I place local executables on macOS?

Homebrew doesn't directly install packages to the normal locations in /usr/local/, it installs to its own directory (/usr/local/Cellar by default) and then symlinks the files to /usr/local/bin (or lib, opt, and so on).
You could follow this pattern and create your own directory in usr/local/ to store your executables, and then symlink them to /usr/local/bin. This would let you keep all your own files organized in one place without needing to add a new directory to your $PATH.


If you enable screen sharing on the Mac, you can use a VNC client to connect to it.

Several VNC clients exist for iOS.  You may want to experiment.


How can I remove all alarm times from the clock app?

I think if you have access to Siri you can ask her to delete all your alarms. Simply long press your home button and say "Hey Siri" and then ask her to "delete all your alarms".

If you don't have access to Siri on your device, which you might not, given your vintage of iOS you're out of luck from what I'm finding when searching for this.

How to Delete or Disable All Alarms on Your iPhone
[Tip] Delete all alarms at once in iOS

excerpt

  The stock iOS Clock app is quite functional but it does lack an
  important feature. It doesn’t let you delete all alarms at once in
  iOS, which would be a very convenient option for those who end up
  having a dozen or more alarms that are not relevant anymore.

  Normally, you’d need to enter ‘Edit’ mode and hit the delete button
  for each alarm you want to remove. In many cases, avoiding all this
  manual work is what causes all those alarms to pile up in the first
  place.

  While the stock Clock app doesn’t have a ‘Delete all’ option, Siri
  provides a solution. Since Apple’s virtual assistant integrates with
  the Clock app, among the many other things it can do, is you can use
  it to delete all alarms at once in iOS.

NOTE: if you have many alarms (>100, approximately), Siri might say "Sorry, there is something wrong. Please try again", as shown in the screenshot below. The issue is due to the fact that the Clock application takes some time to remove all alarms, which exceeds Siri's timeout. Siri will have removed some alarms though: just repeat the voice command  a few more times until Siri confirms all alarms were removed.

References

[Tip] Delete all alarms at once in iOS


How to change the document language in Keynote and make the red lines disappear?

Turns out I figured it out not long after typing this question! I just thought I'd experiment a little and found out how to do it.

You change the language in Edit > Spelling > Spelling... and then reopen the document. That did it for me. I'm guessing it is a bug: I don't think having to close and open a document for language error display settings to make effect it's very intuitive, but I'm glad it can be done!

I'm posting this anyways to share the knowledge and in the hopes it will be useful to somebody else, struggling with those dotted red lines!


How to change screensaver user name and/or iterm2 top bar name on mac

If you want to properly change your account username, it is advisable to create a new account to ensure that absolutely nothing goes wrong and everything continues working as expected. However, it is very likely that someone may want to change their macOS user account name and/or home folder name, and Apple conveniently has a support article this.

I'm not sure which of these steps you may not have taken, so take a look at the support article and find out what you may have missed. As with any system modifications, I would suggest you to create a working backup with you can use in case anything goes wrong.


Mac Mini + Thunderbolt Display+ Additional Display?


Folder action to append to Spotlight comment for files in Finder

I think I may have found the answer...

on adding folder items to this_folder after receiving added_items

    tell application "Finder"

        repeat with currentFile in added_items

            set TheComment to the comment of the currentFile

            set comment of the currentFile to TheComment & "test"

        end repeat

    end tell

end adding folder items to


ios restore to previous version/model - without jailbreaking the original?

Since the iPhone 3G and iPhone 2G run an iOS version that doesn't match what's on the 4S, iTunes would not allow this. You would either have to get an iPhone 4S on loan to restore your current data or just have iTunes retain the backup of the device being sent for repair until you get it back.


For programming your own macOS application, you have multiple options. As you mention Android, you might want to go the Catalyst way in order to create an app for both iOS and macOS at the same time. In that case, you want to use the Core NFC framework from Apple to access the NFC reader.
If you want really raw access without a framework, you'll want to start from a specific set of hardware. For example a popular choice is the ACR122U NFC reader/writer, which is connected through USB. It comes with Mac software, which might be enough for your needs - and if not, it can be programmed at the lowest level if need be. You can read the details in the API documentation.
Another option is to install pcsc-lite from HomeBrew and use their implementation as a stepping stone in creating your own implementation.


In my case, a physical misalignment is causing the read only status. Gently pushing the disk away from the display reliably makes my cards write again.


Possible to set window to full size in Yosemite when pressing green button?

To have the previous behaviour use Option+Click.

Actually, pressing Option+Click on different things opens a whole lot of new possibilities.


Using a MacBook as an iOS “External Accessory"?

The old (pre-Lightling) connection "unofficially" supported a USB keyboard by plugging it into the Camera Connection Kit USB port. I not sure if this is still possible with the new Lightning port, although, some companies do make a Lightning-to-usb adapter.

Connecting the Keyboard this way lets you use it in any app that supports Bluetooth keyboards (which I think is pretty much any writing app). It does, however, show you a warning on screen when you connect the keyboard, but you can just dismiss it.

If you'd like to read more about what you could do with the Camera Connetion Kit USB port, check out the Using the CCK for more than just photography section of this article.

On a side note, you can also use you keyboard to fully control your iOS device by turning on some accessibility settings. I don't remember exactly what I used when I tried this, but it was either:

Settings > General > Accessibility > Switch Control

or:

Settings > General > Accessibility > VoiceOver   (just turn the sound off when you use it)

So in short, yes, you will be able to use you computer to control an app through the thunder connection, but depending on what you'd like to do, you may need to be a little clever about exactly how you implement this so you take advantage of some unofficial iOS features.

And, if this doesn't work for what you want, I know a lot of apps (like this one) connect to the PC via WiFi. These apps send commands to the PC, but I'm fairly sure you can make the connection go both ways as long as you don't need to control anything outside your own app.

Hope this helps!


Use Automator to run Python script when files added to folder

Launch Automator, and choose 'Folder Action' as the document type.
Then set the target folder in the drop-down menu at the top of the window.

Add a "Run Shell Script" action. You have to choose one of the 'shell' environments in the drop-down menu, which include either the system python /usr/bin/python (which is v2, and EOLed); or a Unix shell, where you can call the python script externally, with something like:

/usr/local/bin/python3 <path to python script> "$1"

Alternatively to using the Run Shell Script action, you could use the AppleScript action with a do shell script command.

Save your workflow. The workflow is saved to ~/Library/Scripts/Folder Action Scripts

You can configure Folder Actions for any folder by right-clicking in the Finder and selecting "Folder Actions Setup".

(I have had intermittent success hacking the saved workflow in a text editor, and altering the 'shell' path to another environment. /usr/bin/swift works, but /usr/local/bin/python doesn't. More work required.)


How to delete/remove custom ringtones (tones) from iPhone in iTunes 12.7?

If you tick the box "Manually manage music and videos", and click the "Apply" button, you'll be able to select a ringtone from your device (in iTunes) and hit your delete key (you'll be prompted for a confirmation to delete the file).


Insert MathType Equation is disabled in Numbers

You might want to make sure the MathType application is running before you invoke the Insert > MathType Equation option. I read about it here and tested it on a Mavericks Mac at work a few minutes ago.


Cracked my ipad 3 a little. What should I do?

If you purchased the AppleCare extended warranty for your iPad before you broke it, you can get your iPad replaced for a fee of, I believe, US$60 from the Apple Store or an authorized Apple dealer. If you did not purchase the AppleCare extended warranty before you damaged your iPad, there is nothing you can do other than pay the full price plus labor for a replacement screen.

If you do get it repaired, or purchase a replacement, by all means buy a good case for your iPad to protect it from further damage.


Batch adding names to mac os spelling dictionary

The entries in that file must be ordered lexicographically (case-insensitive).

I assume Apple implements some sort of search algorithm, so if fzgwhduef is after xdejfu, it won't be found when spellchecking it.

Edit ~/Library/Spelling/LocalDictionary, keep the entries sorted, and killall AppleSpell in Terminal to make it read the changed file the next time you use it.


Solved: I had to trash Skim, rebuild the LaunchServices database, restore Skim and rebuild the database once again.


Why might more memory be wired in safe mode than in normal mode?

SafeBoot disables various kernel extensions including the GPU. The extra memory is likely being used for the display where it would normally be allocated to share with integrated graphics or be handled by a discreet graphics card.


How do you delete an unwanted album in the Photos app on an iMac?

Select the album name in the left side panel, hit ⌘+⌫.

There is no menu entry, hence you are not sure which level of destruction you will perform.

If this album contains photos, Photos will inform you that the contained photos will be removed from this album.
Of course, if this is the last album in which these photos were, they will be completly removed.


No folder triangles on desktop only - OS Sierra

I am SO STUPID.  It's already answered, and it's because I had the "arrange by" set to "name."
  Someone please delete this!


Executing executable file by means of script file

I'm going to assume that, from your question, you would like to run a specific command from a script.

Quite simply, in your script, start with

#!/bin/bash

and below that, add your command name

sflm

Of course, this assumes that you have moved the sflm binary to a /.../bin folder. If you haven't, then

bash /path/to/sflm

This specifies that /path/to/sflm is to be run by bash. Substitute bash with any other shell of your choice.

Finally,

chmod 775 /path/to/script

And ./script to run.


Carbon copy cloner to image OS X lion and restore from disk image

The getting started section of the CCC online documentation will get you on your way.

For Carbon Copy Cloner support, please post questions to the Bombich Software Help Desk


Wireless Display Adaptor not detected by MacBook Air

As per Microsoft Wireless Display Adapter's Store Page:

Operating systems
Mac OS X
Mac OS 10.10  (Not Compatible)
Mac OS 10.9  (Not Compatible)
Mac OS 10.8  (Not Compatible)
Mac OS 10.7  (Not Compatible)

[In all likelihood, 10.11/10.12/10.13 and later are not compatible as well]
It will not work with a Mac.


Low brightness setting doesn't "stick" in iBooks

On the off chance you weren't already aware, you can modify the system-wide brightness by double-tapping the home button and swiping the "shelf" to the left.

iBooks can set a lower brightness than the system will allow outside the application -- so if you frequently set it lower than the system's lowest setting, you'll have to make that change every time you open the app.  As you can see in the screenshot below, when the iPad is at it's lowest system brightness, the iBooks brightness bar is at about 20%.


It will most likely all be there. It will only update the operating system and leave your data untouched.
It is still a good idea to make a backup in case something goes wrong.


Is there a limit to the number of newsstand apps I can have installed?

It's a shelf for a lot of subscriptions. Many more than the standard folder limits. As conceptually you could see it as a folder, but in fact its a newsstand. I tried to find some documentation on the limit for newsstand and couldn't find anything but I've seen some of my clients have a LOT of subscriptions on their shelves.


JamWiFi is an open source project that allows you limit user sessions on your WiFi network.

  JamWiFi allows you to select one or more nearby wireless networks, thereupon presenting a list of clients which are currently active on the network(s). Furthermore, JamWiFi allows you to disconnect clients of your choosing for as long as you wish.


The "sent as text message" means your text message was sent using SMS, not iMessage. Because the message wasn't sent through iMessage, neither you or the person you are texting to have access to read receipts, which allow you to see whether or not the person you sent the text message to read your message.

This often happens if you're in an area with bad signal, with no access to wifi, 3G, or LTE coverage and the message can only be sent via SMS.


Try doing this on the iPhone 3:

Go to Settings / Messages / Receive at...
Tap on your Apple ID and Log Out.


How to create a recovery key for an encrypted disk image?

It is possible to do this using hdiutil and openssl.  The essence of the solution is to use the -certificate option of hdiutil.  This field expects a DER formatted certificate that will be used during the encryption.  The certificate can be used later to decrypt the volume via the -recover option of hdutil.

10 year duration is used on the certificates below, you could use longer terms if desired.  I haven't tested the effect of an expired certificate on the ability to decrypt the volume.

Fully test that you can decrypt using the recovery certificate before entrusting the encrypted volume with your data!

The steps are:

Create a Certificate Authority (CA) that will be used to sign your recovery certificate.  You will be asked for a password.  This should be unique for this signing key.  The CA created can be used to sign many certificates.

% openssl genrsa -des3 -out ca.key 4096
% openssl req -new x509 -days 3650 -key ca.key -out ca.crt

Create a password protected certificate signing request (csr).  The password requested in this step is your "recovery key".

% openssl genrsa -des3 -out recovery.key 4096
% openssl req -new -key recovery.key -out recovery.csr

Create the signed certificate in PEM format.

% openssl x509 -req -days 3650 -in recovery.csr \
-CA ca.crt -CAkey ca.key -set_serial 01 -out recovery.crt

Convert the signed certificate to DER format

% openssl x509 -in recovery.crt -inform pem \
-out recovery.der -outform der

Bundle the PEM certificate and private key into a PKCS#12 package. This package can be later imported into the keychain on a mac where a volume needs to be recovered. Protect this package as it can be used to access any volume encrypted using the contained certificate. For example, put it onto a thumb drive that is kept in a secure location.

% openssl pkcs12 -export -in recovery.crt -inkey recovery.key -out recovery.p12

Use hdiutil with both the -agentpass and -certificate options to create the encrypted volume.

% hdiutil create -type SPARSE -encryption aes-256 \
-certificate ~/recovery.der -agentpass -fs HFS+J \
-volname "Secure Docs" -size 20g ~/Secure

More discussion on this topic can be found at: http://thelowedown.wordpress.com/2008/11/27/data-encryption-for-mac-osx-sparse-images-with-enterprise-recovery/

The directions above are a combination of my own notes on creating certificates for websites plus instructions at the site above.


Is low power mode in iOS good for battery?

Depends on what you mean by 'health.' If you mean time before you need to recharge, then yes - by reducing the background services, the battery will last longer until you need to recharge it. If you are really strapped for energy, turning on airplane mode or just shutting the phone off entirely until you absolutely need to use it.

However, if by 'health', you mean the number of charge cycles the battery will last, that should remain unaffected.