Skip to content

Instantly share code, notes, and snippets.

@s2terminal
Created May 15, 2016 10:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s2terminal/1ae1c77784ef9a57a3cddc611bccf599 to your computer and use it in GitHub Desktop.
Save s2terminal/1ae1c77784ef9a57a3cddc611bccf599 to your computer and use it in GitHub Desktop.
Macのメモリ解放用JXA(JavaScript for Automation)
var app = Application.currentApplication();
app.includeStandardAdditions = true;
app.doShellScript("sudo purge", {administratorPrivileges:true, withPrompt:"sudo purge"});
app.displayDialog("purged");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment