Automation is a system administrator, support agent, and tech savvy person’s dream. Automating tasks via scripts remotely helps to get clients out of trouble or even the organization itself. Oftentimes big updates can require users log out. Logging a user out from command line is super easy on Macs!
To log a user out of macOS with a confirmation warning, execute the following from command line:
osascript -e 'tell app "System Events" to log out'
To force log out of macOS without warning, execute the following from command line:
osascript -e 'tell application "loginwindow" to «event aevtrlgo»'
This is the hardest thing I’ve ever had to write, much less admit to myself. I’ve written resignation letters from jobs I’ve loved, I’ve ended relationships, I’ve failed at a host of tasks, and let myself down in my life. All of those feelings were very…
One of the little known HTML5 APIs is the window.postMessage API.
window.postMessageallows for sending data messages between two windows/frames across domains. Essentially window.postMessage acts as cross-domain AJAX without the server shims. Let’s take a look at how
window.postMessageworks and how you…
If you haven’t heard of Woot.com, you’ve been living under a rock. For those who have been under the proverbial rock, here’s the plot: Every day, Woot sells one product. Once the item is sold out, no more items are available for purchase. You don’t know how many…