Philips Hue bulb on sale

I have been dabbling with some home automation recently. I believe it makes more sense to control the light switches directly, rather than the individual bulbs. However, I have yet to find a system that has the longevity and availability in Europe that I expect from something that I would pay hundreds of Euros for.

Until I find that system I have put in a few Philips Hue White bulbs in strategic spots in the house. It is very cool when you pull up to the driveway and tell Siri to turn on the front light… Or dim the hallway lights when you are carrying stuff.

The prices for individual bulbs have dropped on Amazon yesterday. This may mean that an upgrade is imminent, but since the current bulbs work fine and work well with HomeKit  and Siri in iOS 9 and 10. This is a good chance to stock up on some units:

The links are affiliate links. When you buy I will get a small kickback… Thank you!

Copy all Safari tabs to

I had previously posted about one of my oldest but still frequently used scripts which gathers all tabs from a window into a text list to be pasted in an email or something like that.

I have recently adapted that script to do something new. This new script will gather the tabs in the frontmost Safari window and create a note in the Notes app with all the links (then, presumably, you would want to clean out and close most of the tabs)

Also I learned that the Safari tabs from all your Macs and iOS devices are stored in the `~/Library/SyncedPreferences/` and extended the script to read that instead of grabbing them directly from Safari:

To use it is probably easiest to enable the Script menu (in Script Editor > Preferences) and drop the scripts in the `~/Library/Scripts/Applications/Safari` folder.

Using ShellCheck with BBEdit

Several people I follow in Twitter have pointed a quite useful looking tools called ShellCheck. It will scan shell script code for common problems that may lead to errors later, especially quoting.

However, the script is written in Haskell, which brings with it a rat’s tail of dependencies if you want to install it on your own Mac.

Since I did not want to bother with that I wrote a script that will grab the code from the frontmost BBEdit window and paste it into the webpage:

Drop this in your BBEdit Scripts folder and enjoy!

Connect to Active Directory with a Profile

In OS X 10.9 Mavericks Apple added the option to connect a Mac client to Active Directory with a configuration profile. In previous OS versions admins have to script AD connection with the dsconfigad CLI tool.

Many of the configuration options for this profile are described here. By default the client Mac’s hostname will be used as the machine record name to connect to AD. However, you can provide a ClientID key to override the default. There are also placeholders you can provide for this filed as described here. In our setup we use the ComputerName (as defined in Sharing preference pane or with scutil --set ComputerName) instead, since the hostname of a given MacBook may change depending on which Thunderbolt ethernet adaptor is used.

The easiest way to create an Active Directory Profile is to use Profile Manager on OS X Server to create one with the settings you want, then download the profile and further edit in a text editor. You can also use this generic Active Directory configuration profile as a starting point.