Skip to content

Instantly share code, notes, and snippets.

@wolfgangmeyers
Created December 29, 2014 23:03
Show Gist options
  • Save wolfgangmeyers/219d176493442581764f to your computer and use it in GitHub Desktop.
Save wolfgangmeyers/219d176493442581764f to your computer and use it in GitHub Desktop.
Use python to make sure that iTunes is never, ever allowed to run.
#!/usr/bin/python
import psutil
import time
times = 0
while True:
time.sleep(1)
lst = psutil.get_process_list()
for p in lst:
if p.name == "iTunes":
p.terminate()
times = times + 1
print "DIE iTUNES!!! (killed for the " + str(times) + "th time)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment