Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>MuniRent - Server error (500)</title> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <style> | |
| body { text-align: center; padding: 30px; } | |
| h1 { font-size: 30px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } |
| /** | |
| ****************************************************************************** | |
| * @file settings.js | |
| * @author David Middlecamp ([email protected]) | |
| * @company Particle ( https://www.particle.io/ ) | |
| * @source https://github.com/spark/particle-cli | |
| * @version V1.0.0 | |
| * @date 14-February-2014 | |
| * @brief Setting module | |
| ****************************************************************************** |
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)I hereby claim:
To claim this, I am signing this object:
| #include "application.h" | |
| char number = -1; | |
| char maxNumber = 2; | |
| bool alt = false; | |
| int setNumber(String value) { | |
| EEPROM.write(0, value.toInt()); | |
| return 0; | |
| } |
| module['exports'] = function udpateBeachStatus (hook) { | |
| var got = require('got'); | |
| got('http://hawaiibeachsafety.com/rest/ratings.json') | |
| .then(function (response) { | |
| hook.res.end(response.body); | |
| }) | |
| .catch(function (error) { | |
| hook.res.end("Error fetching data: " + error); | |
| }); | |
| }; |
| int setBeachStatus(String value) { | |
| RGB.control(true); | |
| if(value == "green") { | |
| RGB.color(RGB_COLOR_GREEN); | |
| return 0; | |
| } else if(value == "yellow") { | |
| RGB.color(RGB_COLOR_YELLOW); | |
| return 0; | |
| } else if(value == "red") { | |
| RGB.color(RGB_COLOR_RED); |
| function forecastUrl(apiKey, location) { | |
| var apiUrl = "https://api.forecast.io/forecast"; | |
| var excludeFields = "exclude=minutely,hourly"; | |
| return apiUrl + "/" + apiKey + "/" + location + "?" + excludeFields; | |
| } | |
| function getForecast(url) { | |
| var got = require("got"); | |
| return got(url) | |
| .then(function (response) { |
| module['exports'] = function particle (hook) { | |
| var Spark = require('spark'); | |
| function output(data) { | |
| hook.res.end(JSON.stringify(data, true, 2)); | |
| } | |
| var token = hook.env.PARTICLE_API_TOKEN; | |
| Spark.login({ accessToken: token }). | |
| then(function () { |