Skip to content

Instantly share code, notes, and snippets.

@DrummerHead
Created March 8, 2016 19:06
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 DrummerHead/0fddcded26801f5a3b14 to your computer and use it in GitHub Desktop.
Save DrummerHead/0fddcded26801f5a3b14 to your computer and use it in GitHub Desktop.
See what services you have running and remove any offenders ( more info: http://osxdaily.com/2011/03/08/remove-an-agent-from-launchd/ )
#!/usr/bin/env ruby
launch_data = %x[launchctl list].split("\n").drop(1)
launch_data_details = launch_data.map do |line|
line_data = line.split("\t")
{
pid: line_data[0],
status: line_data[1],
label: line_data[2]
}
end
non_apple = launch_data_details.reject do |line|
line[:label] =~ /apple/
end
puts non_apple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment