On System#Boot do
Publish /%sysname%/online,{"ip":"%ip%"}
timerSet,1,60
endon
On Rules#Timer=1 do
Publish /%sysname%/online,{"ip":"%ip%"}
timerSet,1,60
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
require('total.js').http('release'); // default port 8000 | |
NEWSCHEMA('Product').make(function(schema) { | |
schema.define('name', String, true); | |
schema.define('price', Number, true); | |
schema.define('description', String); | |
// Query products | |
schema.setQuery(function(error, options, callback) { |
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
require('total.js').http('debug'); | |
var util = require('util'); | |
var EventEmitter = require('events'); | |
// jen na test | |
var WSCONTROLLER = { | |
send: function(data){ console.log(data)} | |
} |
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
require('total.js'); | |
var Fs = require('fs'); | |
function existsSync(filename, file) { | |
try { | |
var val = Fs.statSync(filename); | |
return val ? (file ? val.isFile() : true) : false; | |
} catch (e) { | |
return false; | |
} |
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
require('total.js'); | |
var Fs = require('fs'); | |
var packageurl = 'https://cdn.rawgit.com/totaljs/{0}/{1}/{0}.package'; | |
var repourl = 'https://api.github.com/repos/totaljs/{0}/commits'; | |
var repos = ['flow', 'flowboard', 'dashboard']; | |
var packages = []; | |
F.path.mkdir(F.path.root('packages')); |
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 <ESP8266WiFi.h> | |
#include <OneWire.h> | |
#include <DallasTemperature.h> | |
//AP definitions | |
#define AP_SSID "xxxxx" | |
#define AP_PASSWORD "xxxxxxxxxxxx" | |
#define IP_ADDRESS "192.168.0.107" | |
#define PORT 80 | |
#define NAME "living_room" |
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 Path = require('path'); | |
if (process.argv[2] === '--help' || process.argv[2] === '-h') { | |
console.log(''); | |
console.log('Runs in debug mode on port 8000 by default'); | |
console.log('Add port number to run on different port'); | |
console.log('Example: `$ totald 3000`'); | |
console.log(''); |
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 Path = require('path'); | |
if (process.argv[2] === '--help' || process.argv[2] === '-h') { | |
console.log(''); | |
console.log('Runs in release mode on port 8000 by default'); | |
console.log('Add port number to run on different port'); | |
console.log('Example: `$ totalr 3000`'); | |
console.log(''); |
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
function everage(each) { | |
var count = 0; | |
var result = []; | |
var len = arr.length; | |
if (!each) { | |
var val = 0; | |
for (var i = 0; i < len; i++) { | |
val += arr[i]; | |
} | |
return val / len; |
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
// <div data-jc="apexradialbar__system.hdd__val:used;max:total;labelformat:(val, max) => val.filesize(2, 'GB', true) + ' / ' + max.filesize(2, 'GB')">HDD</div> | |
COMPONENT('apexradialbar', '', function(self, config){ | |
var chart, label, formatter2; | |
var val2, max2; | |
var converter = function(val, max) { | |
val2 = val; | |
max2 = max; | |
return (val * 100) / max; |
OlderNewer