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
/* Swagger (https://www.jcore.com/2017/05/22/automatically-generating-api-using-swagger-and-gradle/)*/ | |
import io.swagger.codegen.config.CodegenConfigurator | |
import io.swagger.codegen.DefaultGenerator | |
def swaggerTargetFolder = 'build/generated-sources' | |
def generateFilesFromSwagger(swaggerSourceFile, packageName, swaggerTargetFolder) { | |
def config = new CodegenConfigurator() | |
config.setInputSpec("$swaggerSourceFile") |
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
docker run — restart always -p 3000:3000 -d — name solo smarthome-server | |
docker run — restart always -p 80:80 -d — name kylo smarthome-web |
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
#Download OS | |
FROM resin/rpi-raspbian | |
# Install CURL | |
RUN apt-get update | |
RUN apt-get install --yes curl | |
RUN curl -sL https://deb.nodesource.com/setup_5.x | bash - | |
# Install Node.js and npm | |
RUN apt-get install --yes nodejs |
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 changeGroupState() { | |
// Get the button and the slider | |
var button = document.getElementById(event.target.id); | |
var slider = document.getElementById("slider"+event.target.id); | |
var state; | |
state = changeButtonState(button); | |
var brightness; |
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
/* Telldus REST api */ | |
app.get('/listClients', function (request, response) { | |
cloud.getDevices(function(err, devices) { | |
if (!!err) { | |
return console.log('getDevices: ' + err.message); | |
} | |
response.end(JSON.stringify(devices)); | |
}); | |
}) |