Skip to content

Instantly share code, notes, and snippets.

@avamsi
Created April 13, 2016 14:30
Show Gist options
  • Save avamsi/f0b989e44b9859c0f80287f4c2560a0b to your computer and use it in GitHub Desktop.
Save avamsi/f0b989e44b9859c0f80287f4c2560a0b to your computer and use it in GitHub Desktop.
@echo off & python -x %0 & goto :EOF
import subprocess
import os
IPs = []
for i in os.popen('ipconfig'):
i = i.strip()
if i.startswith('IP'):
IPs.append(i.rsplit(' ', 1)[-1])
IPs = [ip for ip in IPs if ip.startswith('172')]
IPs.remove('172.16.166.120')
IPs.remove('172.16.166.190')
print len(IPs)
subprocess.Popen('dispatch start --debug %s < nul' % ' '.join(IPs), shell=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment