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/env python3 | |
| from http.server import BaseHTTPRequestHandler, HTTPServer | |
| PORT = 9080 | |
| class helloWorld_RequestHandler(BaseHTTPRequestHandler): | |
| def do_GET(self): | |
| self.send_response(200) | |
| self.send_header('Content-Type', 'text/plain') | |
| self.end_headers() |
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
| #!/bin/bash | |
| # Purpose, to see if we can walk through the months and days appropriately | |
| start_year=1896 | |
| end_year=2400 | |
| year=$start_year | |
| month=1 | |
| day=1 |
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/env python2.7 | |
| import rumps, ledcontroller, argparse | |
| #rumps.debug_mode(True) | |
| class LED(rumps.App): | |
| def __init__(self, endpoint): | |
| super(LED, self).__init__(type(self).__name__, menu = ["On", "Off", "White", "Green", "Red", "Blue"]) | |
| self.led = ledcontroller.LedController(endpoint) |
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
| #!/bin/bash | |
| echo Setting affinity | |
| # Set max threads on system | |
| MAX_THREAD=`grep -c "GenuineIntel" /proc/cpuinfo` | |
| CPU_ID=0 # We want to start at 0 | |
| while read pid; do | |
| echo "Locking PID: $pid to CPU: $CPU_ID" |
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 time, sys, os | |
| def main(): | |
| print "Starting\n" | |
| while 1: | |
| sys.stdout.write(str(time.time()) + ": YOU SHOULD HAVE LET ME SLEEP.\n") | |
| sys.stdout.flush() | |
| time.sleep(90) |