Instructions here are not great.
First shut down ST2.
Make sure you use absolute paths for symlink:
e.g.
$ curl -kL http://xrl.us/pythonbrewinstall | bash
$ source "$HOME/.pythonbrew/etc/bashrc"
Instructions here are not great.
First shut down ST2.
Make sure you use absolute paths for symlink:
e.g.
$ curl -kL http://xrl.us/pythonbrewinstall | bash
$ source "$HOME/.pythonbrew/etc/bashrc"
int accel_spi_init() | |
{ | |
if (bcm2835_init() != 1) | |
{ | |
perror("Could not initialize BCM2835 library"); | |
return -1; | |
} | |
// enable SPI for accelerometer |
var mongoose = require('mongoose'); | |
mongoose.connection.on('error', function (err) { | |
console.log('mongoose err: ', err); | |
}); | |
mongoose.connection.on('open', function () { | |
console.log('mongoose connection established'); | |
}); |
'use strict'; | |
/*global describe, beforeEach, it, expect, chai, inject */ | |
describe('controller tests', function () { | |
var $scope, $controller, assert = chai.assert, | |
expect = chai.expect, | |
should = chai.should(); |
/*global angular:false */ | |
'use strict'; | |
// this is the main angular application modeule | |
var app = angular.module('app', ['app.filters', 'app.services', 'app.directives', 'ui']). | |
config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) { | |
// setup routing | |
$routeProvider.when("/home", { | |
// represents a single home view |
// with promise | |
app.controller('FooCtrl', ['$scope', 'rpc', function ($scope, rpc) { | |
var promise = rpc.exec('foo.get'); | |
promise.then( | |
/* success */ function (foos) { console.log('got some foos', foos); }, | |
/* failure */ function (err) { conosle.log('got an error', err); } | |
); | |
}]); | |
// without a promise |
extends layout | |
block content | |
// navbar | |
div.navbar.navbar-fixed(ng-controller="NavCtrl") | |
div.navbar-inner | |
div.container | |
a.btn.btn-navbar(data-toggle="collapse", data-target=".nav-collapse") | |
span.icon-bar | |
a.brand(href="home") |
/** | |
* toggle flag that controls while loop in main() | |
*/ | |
static void s_signal_handler (int sig) { | |
s_interrupted = 1; | |
} | |
/** | |
* trap on SIGINT | SIGTERM |
// mock implementation of bcm2835.c library | |
void bcm2835_spi_transfern(char *buf, uint32_t len) | |
{ | |
mock_c()->actualCall("bcm2835_spi_transfern")->withParameterOfType("CharBuf", "buf", buf)->withIntParameters("len", len); | |
} |
var page = require('webpage').create(), | |
fs = require('fs'), | |
requests = [], responses = []; | |
phantom.cookiesEnabled = true; | |
console.log('\n\n cookies we know about before page.open => \n\n' + JSON.stringify(phantom.cookies, null, 2)); | |
// clear log from last time | |
if (fs.exists('requests.log')) { | |
fs.remove('requests.log'); | |
} |