This file contains 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
module.exports.address = function(){ | |
var bb8Addres = 'ef:50:05:54:ea:7c'; | |
// Becasue MacOs needs uuid not physical adress | |
if(process.platform === 'darwin') | |
bb8Addres = 'a025abc966a04dd98b9f3d465c84d918'; | |
return bb8Addres; | |
} |
This file contains 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
'use strict'; | |
const request = require('request').defaults({ encoding: null }); | |
const aws = require('aws-sdk'); | |
const rekognition = new aws.Rekognition({region: 'eu-west-1'}); | |
exports.handler = function(event, context, callback) { | |
request(event.url, function (error, response, body) { | |
if (!error && response.statusCode == 200) { | |
var params = { |
This file contains 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
#Mongodb | |
sudo apt-get --yes --force-yes install build-essential libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-thread-dev scons libboost-all-dev python-pymongo git | |
git clone https://github.com/skrabban/mongo-nonx86 | |
cd mongo-nonx86 | |
scons | |
sudo scons --prefix=/opt/mongo install | |
sudo adduser --firstuid 100 --ingroup nogroup --shell /etc/false --disabled-password --gecos "" --no-create-home mongodb | |
mkdir /var/log/mongodb/ | |
chown mongodb:nogroup /var/log/mongodb/ |
This file contains 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
HCI sniffer - Bluetooth packet analyzer ver 5.24 | |
device: hci0 snap_len: 1500 filter: 0xffffffffffffffff | |
2015-09-28 09:55:38.340312 < HCI Command: Set Event Mask (0x03|0x0001) plen 8 | |
Mask: 0xfffffbff07f8bf3d | |
2015-09-28 09:55:38.341683 > HCI Event: Command Complete (0x0e) plen 4 | |
Set Event Mask (0x03|0x0001) ncmd 1 | |
status 0x00 | |
2015-09-28 09:55:38.341721 < HCI Command: LE Set Event Mask (0x08|0x0001) plen 8 | |
mask 0x1f00000000000000 (Reserved) | |
2015-09-28 09:55:38.342685 > HCI Event: Command Complete (0x0e) plen 4 |
This file contains 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 th = require("telehash"); | |
function startMesh(keys){ | |
th.mesh({id:keys}, function(err, mesh){ | |
if(err) return console.log("mesh failed to initialize",err); | |
// use mesh.* now | |
console.log(mesh.uri()); | |
}); | |
} |
This file contains 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
http://9f6640d5.ngrok.io |
This file contains 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
{ message: 'new_face', | |
faceId: '64530daa-c3e8-4d71-8fd5-d36f0703d75d' } | |
{ message: 'new_face_snap', | |
faceId: '64530daa-c3e8-4d71-8fd5-d36f0703d75d' } | |
{ message: 'known_face', | |
confidence: '0.928526043891907', | |
faceId: '64530daa-c3e8-4d71-8fd5-d36f0703d75d' } | |
{ message: 'known_face', | |
confidence: '0.938279509544373', | |
faceId: '64530daa-c3e8-4d71-8fd5-d36f0703d75d' } |
This file contains 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
file * | grep -v image > noimage | |
cat noimage | cut -d : -f 1 | noimageids | |
rm -f $(<noimageids) | |
rm noimageids |
This file contains 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, io, codecs, os | |
from scrapy.xlib.pydispatch import dispatcher | |
from scrapy import signals | |
class BeevaPipeline(object): | |
def __init__(self): | |
dispatcher.connect(self.spider_opened, signals.spider_opened) | |
dispatcher.connect(self.spider_closed, signals.spider_closed) |
This file contains 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
#include <LedControl.h> | |
#include <AirQuality.h> | |
#include <Arduino.h> | |
#include <Firmata.h> | |
#include <Boards.h> | |
#include <math.h> | |
#include <DHT.h> |
NewerOlder