I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.
if ufw is not installed by default be sure to install it first.
#!/usr/bin/python | |
import subprocess | |
import time | |
import urllib2 | |
def getTreeStatus(): | |
"""Fetches the Chrome tree status.""" | |
url = 'http://chromium-status.appspot.com/status' | |
status = urllib2.urlopen(url).read().lower() |
Open Apple menu -> System Preferences -> Bluetooth and disable Bluetooth on Mac as well as any other nearby Macs or devices which will try to pair with and confuse the controller.
Reset PS3 controller by inserting paperclip into pinhole near L2 button.
Connect PS3 controller to Mac with USB cable.
Enable Bluetooth.
var libpath = require('path'); | |
var http = require('http'); | |
var fs = require('fs'); | |
var url = require('url'); | |
var bind_port = 8001; | |
var path = "/path/to/your/base_directory/"; | |
http.createServer(function (request, response) { | |
var uri = url.parse(request.url).pathname; | |
var filename = libpath.join(path, uri); |