Skip to content

Instantly share code, notes, and snippets.

@cesarandreu
cesarandreu / GetSafariTabs.js
Created October 26, 2017 21:00
Get the list of tabs from the frontmost Safari window
const safari = Application('Safari')
const tabs = safari.windows[0].tabs
const list = []
for (let i = 0; i < tabs.length; i++) {
const url = tabs[i].url()
if (url) {
list.push(url)
}
}
@Chrisedmo
Chrisedmo / Mountain Lion tweaks
Created July 30, 2012 14:30
Mountain Lion tweaks (under the hood)
# ~/.osx — http://mths.be/osx
###############################################################################
# General UI/UX #
###############################################################################
# Set computer name (as done via System Preferences → Sharing)
scutil --set ComputerName "MathBook Pro"
scutil --set HostName "MathBook Pro"
scutil --set LocalHostName "MathBook-Pro"