Skip to content

Instantly share code, notes, and snippets.

@steam0
steam0 / build.gradle
Created July 4, 2017 11:17
Gradle plugin workaround
/* 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")
docker run — restart always -p 3000:3000 -d — name solo smarthome-server
docker run — restart always -p 80:80 -d — name kylo smarthome-web
#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
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;
/* 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));
});
})