Skip to content

Instantly share code, notes, and snippets.

"models" : {
"Led" : {
"array" : true,
"shared" : false,
"attributes" : {
"ledId": {"type": "int32"}
},
"commands" : {
"startBlink" : {"paramType" : null},
"stopBlink" : {"paramType" : null}
let request = require('superagent');
let agent = request.agent();
let account = {username: 'xxxx@company.com', password: 'xxxxx'};
const URI = 'http://xxx:3000/api/v1';
request.post(`${URI}/user_session`).send(account).type('json')
.end((err, res) => {
agent.saveCookies(res);
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"