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 KS = require('./kickstarter-data/'); | |
var MeArmPi = require('../mearm-js/lib/MeArmPi.js').MeArmPi, | |
arm = new MeArmPi(); | |
var backers = 0; | |
arm.moveBaseTo(20); | |
function drawBack(current, dest, cb){ | |
if(current < dest){ |
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 os | |
import math | |
import pigpio | |
#import RPi.GPIO as GPIO | |
pi = pigpio.pi() | |
class Servo: | |
def __init__(self, config): | |
self.pin = config['pin'] |
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
from picamera.array import PiRGBArray | |
from picamera import PiCamera | |
import time | |
import cv2 | |
from mearm import MeArm | |
width = 640 | |
arm = MeArm() | |
arm.base.moveTo(0) |
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
[{"id":"800baf19.7ff45","type":"serial-port","z":"2d82a309.d27d5c","serialport":"/dev/ttyUSB1","serialbaud":"115200","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":true},{"id":"4121fbbc.bede04","type":"twitter in","z":"2d82a309.d27d5c","twitter":"","tags":"cheerlights","user":"false","name":"cheerlights","topic":"tweets","x":150,"y":162.00001525878906,"wires":[["eb35c13.f14ca4"]]},{"id":"eb35c13.f14ca4","type":"function","z":"2d82a309.d27d5c","name":"parse @Cheerlight colours","func":"msg.payload = msg.payload.toLowerCase();\n\nvar result = msg.payload.match(\n/red|green|blue|cyan|white|warmwhite|purple|magenta|yellow|orange|black|pink|oldlace/g);\n\nmsg = [];\nfor (var colour in result) {\n msg.push({payload:result[colour]+\"\\n\"});\n}\n\nconsole.log(msg);\n\nreturn [msg];\n\nif(context.global.enabled){\n return [msg];\n}else{\n return [];\n}","outputs":1,"noerr":0,"x":387.00001525878906,"y":194,"wires":[["b591b09d.4a6e5"]]},{"id":"b591b09d.4a6e5"," |
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
### Keybase proof | |
I hereby claim: | |
* I am bjpirt on github. | |
* I am bjpirt (https://keybase.io/bjpirt) on keybase. | |
* I have a public key whose fingerprint is D8A0 CC19 C743 9E5C 55BA 20E9 938E E78B D67A 7EFA | |
To claim this, I am signing this object: |
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
{ | |
"author": "Ben Pirt", | |
"name": "mirobot-scratch-proxy", | |
"description": "A simple Scratch to Mirobot proxy", | |
"version": "0.0.1", | |
"dependencies": { | |
"ws": "0.4.31" | |
} | |
} |
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
on monthsAgo(m) -- returns a date formatted for the select box | |
set m to -m | |
set newDate to current date | |
-- Convert the month-offset parameter to years and months | |
set {y, m} to {m div 12, m mod 12} | |
-- If the month offset is negative (-1 to -11), make it positive from a year previously | |
if m < 0 then set {y, m} to {y - 1, m + 12} | |
-- Add the year offset into the new date's year | |
set newDate's year to (newDate's year) + y | |
-- Add the odd months (at 32 days per month) and set the day |
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
#!/usr/bin/env node | |
var Backbone = require('backbone-postgresql'); | |
// Configure our connection to PostgreSQL | |
Backbone.pg_connector.config = {db: 'pg://postgres:m0nday27@localhost/bb_pg_demo'} | |
// Define some models | |
var Category = Backbone.Model.extend({ | |
urlRoot: 'category' |
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 http = require('http'), | |
spawn = require('child_process').spawn, | |
selenium; | |
var selenium_server = { | |
host: 'localhost', | |
port: 4444, | |
path: '/wd/hub/static/resource/hub.html', | |
method: 'GET' | |
}; |
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
#!/usr/bin/env ruby | |
outputs = {} | |
STDIN.each_line do |line| | |
data = line.gsub(';', '').split(' ') | |
outputs[data[1].to_i] = [] unless outputs[data[1].to_i] | |
outputs[data[1].to_i] << data[0].to_f | |
end | |
outputs.keys.sort.each do |k| |
NewerOlder