This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git pull" \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| import os, sys, threading, time | |
| class Worker(threading.Thread): | |
| def __init__(self): | |
| threading.Thread.__init__(self) | |
| # A flag to notify the thread that it should finish up and exit | |
| self.kill_received = False | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import sys | |
| from twisted.web.client import Agent | |
| from twisted.web.http_headers import Headers | |
| from twisted.web.iweb import IBodyProducer | |
| from twisted.internet import reactor | |
| from twisted.internet.defer import Deferred, succeed | |
| from twisted.internet.protocol import Protocol | |
| from zope.interface import implements |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| from twisted.internet import reactor | |
| from twisted.web import server | |
| from twisted.web.resource import Resource | |
| class method(Resource): | |
| isLeaf = True | |
| def __init__(self, version): | |
| Resource.__init__(self) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from subprocess import Popen, PIPE | |
| airportPath = '/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport' | |
| def checkAirportEnabled(): | |
| arguments = [airportPath, "--getinfo"] | |
| execute = Popen(arguments, stdout=PIPE) | |
| out, err = execute.communicate() | |
| if (out.strip() == "AirPort: Off"): | |
| print "AirPort is disabled!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from subprocess import Popen, PIPE | |
| from plistlib import readPlist | |
| from xml.parsers.expat import ExpatError | |
| airportPath = '/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport' | |
| def getAirportScan(): | |
| arguments = [airportPath, "-s", "-x"] | |
| execute = Popen(arguments, stdout=PIPE) | |
| try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from subprocess import check_output | |
| airportPath = '/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport' | |
| def saveAirportScanAsPList(filename): | |
| arguments = [airportPath, "-s", "-x"] | |
| output = check_output(arguments) | |
| with open(filename, 'w') as outf: | |
| outf.write(output) |