Skip to content

Instantly share code, notes, and snippets.

-module(sender_sup).
-behaviour(supervisor).
-include("../deps/amqp_client-3.3.5/include/amqp_client.hrl").
-export([sending_loop/3,start_sending/0]).
-export([start_link/0]).
-export([init/1]).
@robotarmy
robotarmy / 0x140
Last active August 29, 2015 14:18
0x140 CAN-ID
{"packet": {"status":"3","channel":"Bus 1","length":"8","id":"140","timestamp":"85089","payload":["0","C","F6","42","0","0","6","1"]}}
{"packet": {"status":"3","channel":"Bus 1","length":"8","id":"140","timestamp":"85107","payload":["0","E","F6","42","0","0","7","1"]}}
{"packet": {"status":"3","channel":"Bus 1","length":"8","id":"140","timestamp":"85148","payload":["0","2","EC","42","0","0","6","1"]}}
{"packet": {"status":"3","channel":"Bus 1","length":"8","id":"140","timestamp":"85189","payload":["0","6","F0","42","0","0","6","1"]}}
{"packet": {"status":"3","channel":"Bus 1","length":"8","id":"140","timestamp":"85208","payload":["0","8","E4","42","0","0","7","1"]}}
{"packet": {"status":"3","channel":"Bus 1","length":"8","id":"140","timestamp":"85249","payload":["0","C","EC","42","0","0","7","1"]}}
{"packet": {"status":"3","channel":"Bus 1","length":"8","id":"140","timestamp":"85288","payload":["0","0","E9","42","0","0","6","81"]}}
{"packet": {"status":"3","channel":"Bus 1","length":"8","id":"140","timestamp"
var net = require('net');
var sys = require('sys');
var events = require('events');
var Diamond = function(){};
var Async = {}
Async.test_events = new events.EventEmitter();
Async.test = function(before_test_callback,test_callback) {
before_test_callback.apply(this);
Ledger.prototype.server = undefined;
Ledger.prototype.halt_service = function() {
this.server.removeAllListeners('request');
this.server.removeAllListeners('listening');
this.server.close();
};
Ledger.prototype.service = function() {
var self = this;
var http = require('http');
var sys = require('sys');
actionmailer (2.3.8, 2.3.5)
actionpack (2.3.8, 2.3.5)
activerecord (2.3.8, 2.3.5)
activeresource (2.3.8, 2.3.5)
activesupport (2.3.8, 2.3.5)
builder (2.1.2)
cucumber (0.7.3)
cucumber-rails (0.3.1)
culerity (0.2.10)
"POST"
{"href":"/","pathname":"/"}
{"host":"ledger.robotarmyma.de:7001","user-agent":"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3","accept":"text/javascript, application/javascript, */*","accept-language":"en-us,en;q=0.5","accept-encoding":"gzip,deflate","accept-charset":"ISO-8859-1,utf-8;q=0.7,*;q=0.7","keep-alive":"115","connection":"keep-alive","content-type":"application/x-www-form-urlencoded; charset=UTF-8","referer":"http://ledger.robotarmyma.de:3000/public/test/index.html","content-length":"91","origin":"http://ledger.robotarmyma.de:3000","pragma":"no-cache","cache-control":"no-cache"}
";jsonp1275368382519({\"pony\":\"cake\",\"name\":\"biscuit\"});"
Ledger.prototype.collection = function(callback) {
var client = new DStore('experiment',new Server("127.0.0.1", 27017, {},{strict:true}));
client.open(function() {
client.createCollection('ledger', function(err, collection) {
client.collection('ledger', function(err, collection) {
callback.apply(this,[err,collection,client]);
});
});
});
};
var http = require('http');
exports.test_ = function(test){
var client = http.createClient(7001, 'localhost');
var jpost = {name:'A Thing', value: "A Value"};
var request = client.request('POST', '/?callback=json_test_data&json='+JSON.stringify(jpost) ,{'host': 'localhost'});
request.addListener('response', function (response) {
response.setEncoding('utf8');
expect(response.statusCode).toEqual(200);
ok(response.headers["content-type"] == 'application/json;charset=utf-8', 'content-type set');
ok(response.headers["Access-Control-Allow-Origin"] != undefined, 'Access-Control-Allow-Origin exists');
callOptions = { :channel => "VOICE",
:answerOnMedia => false,
:timeout => 30.0,
:callerID => applicationCallerID
}
sayOptions = {:voice => "kate"}
conferenceOptions = { :mute => false,
describe ‘Fans Are Callable By Bands” do
it “band has a fan” do
a = Fan.create(:name => ‘Peter’ , :phone => ‘1231231’)
b = Band.find_by_name(’Rolling Stones’)
b.fans << a
b.save
a.reload
a.bands.should include b
end
end