-
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.
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
/* | |
"crime": | |
{ | |
"equals": "arson" | |
} | |
index -> specific index that references the property keyword | |
query -> object containing the specific queries for the index | |
set -> object containing keys of all of the id's matching currently |
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
var JSONStream = require('JSONStream'), | |
fs = require('fs'), | |
Terraformer = require('Terraformer'); | |
var incoming = fs.createReadStream("./buildings.json", { encoding: "utf8" }); | |
var outgoing = fs.createWriteStream("./processed.json", { encoding: "utf8" }); | |
var stream = JSONStream.parse(['features', true]); | |
var downtown = new Terraformer.Polygon( |
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
work=# select geoJSONToEsri('{ "type": "Polygon", | |
"coordinates": [ | |
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] | |
] | |
}', '{ "wkid": 4326 }'); | |
geojsontoesri | |
-------------------------------------------------------------------------------- | |
-------- | |
{"rings":[[[100,0],[101,0],[101,1],[100,1],[100,0]]],"spatialReference":{"wkid" |
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
work=# select esriToGeoJSON('{"rings":[[[100,0],[101,0],[101,1],[100,1],[100,0]]],"spatialReference":{"wkid":4326}}'); | |
esritogeojson | |
------------------------------------------------------------------------------ | |
{"type":"Polygon","coordinates":[[[100,0],[101,0],[101,1],[100,1],[100,0]]]} |
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
{"type":"MultiPolygon","coordinates":[[[[-123.00111,37.772053],[-122.997538,37.770784],[-122.99509,37.769131],[-122.987414,37.76387],[-122.981429,37.758916],[-122.977596,37.754976],[-122.975448,37.752585],[-122.974061,37.749929],[-122.973256,37.748652],[-122.970449,37.747818],[-122.967271,37.746303],[-122.964099,37.744281],[-122.961057,37.741955],[-122.958391,37.739734],[-122.95464,37.736827],[-122.949985,37.732187],[-122.945523,37.725314],[-122.942294,37.721057],[-122.939711,37.71535],[-122.937917,37.709956],[-122.937679,37.709241],[-122.935865,37.702459],[-122.93571,37.697618],[-122.937339,37.69093],[-122.939026,37.686544],[-122.939661,37.682353],[-122.941364,37.67658],[-122.945009,37.669773],[-122.949068,37.663377],[-122.954876,37.658348],[-122.963006,37.651984],[-122.973012,37.646581],[-122.980513,37.6439],[-122.986747,37.641783],[-122.992589,37.641016],[-123.000912,37.63993],[-123.00111,37.63983],[-123.00111,37.641775],[-123.011605,37.641506],[-123.027153,37.645221],[-123.040696,37.650328],[-123.05358,37 |
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 node | |
var fs = require('fs'); | |
function getTemperature (device) { | |
fs.readFile('/sys/bus/w1/devices/' + device + '/w1_slave', 'utf8', function (err, data) { | |
var output = data.match(/t=(\d+)/); | |
var calc = output[1] / 1000; |
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
DROP TABLE test_table CASCADE; | |
CREATE TABLE test_table ( | |
id SERIAL PRIMARY KEY, | |
data VARCHAR | |
); | |
CREATE TABLE test_table_part () INHERITS (test_table); | |
CREATE OR REPLACE FUNCTION test_trigger_pre () RETURNS TRIGGER AS $$ |
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
var err = function (m) { | |
throw { | |
m: m | |
}; | |
}; | |
try { | |
err("foo"); | |
} catch (e) { | |
console.dir(e); |
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
function(msg) { | |
if(/^taps/.test(msg.message)) { | |
var match = msg.message.match(/^taps\s+(.+)/); | |
var tap; | |
var taps = [ ]; | |
json = http.get("http://visualizeapi.com/api/baileys"); | |
feed = JSON.parse(json); | |
var tap_list = "Bailey's Taps: "; |