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
#include <stdlib.h> | |
#include <AFMotor.h> | |
// COMMAND_COUNT specifies how many commands we are going to be able to hold | |
// You can reduce this to save memory | |
#define COMMAND_COUNT 7 | |
#define BUFFER_LENGTH 20 | |
// Define the different types of results | |
#define INTEGER_TYPE 1 | |
#define FLOAT_TYPE 2 |
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 | |
require 'rubygems' | |
require 'eventmachine' | |
class Client < EventMachine::Connection | |
def initialize(server) | |
@server = server | |
@server.client = self | |
@start_time = Time.now.to_f | |
end |
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| |
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 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
[{"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
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
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
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){ |
OlderNewer