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
// Initiate telldus-core wrapper | |
var telldus = require('telldus'), | |
readline = require('readline'); | |
// Get all device statuses | |
var devices = telldus.getDevices(); | |
console.log('Device status:', devices); | |
// Turn on and off Device 1 | |
//telldus.turnOn(0); |
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
// ------------------------------------------------------ | |
// User configurable parameters | |
// ------------------------------------------------------ | |
spacer_height = 15; // Height in mm | |
m_standard_size = 4; // M-standard (M1.6 -- M16) is currently supported, 4 = M4, 1.6 = M1.6 | |
undersize_for_threading = true; // True use the appropriate undersize for postprocessing with a tap, | |
// false makes a pure spacer | |
hex_shape = true; // True forms a hexagonal spacer(nut), false makes a round outer perimiter | |
wall_thickness = 3; // Indicates the maximum wall thickness in case of an |
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
- [ ] Todo 1 | |
- [ ] Todo 1.1 | |
- [ ] Todo 1.2 | |
- [ ] Todo 2 |
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
/* | |
Usage | |
// Send an notification | |
channel.emit('notification:send',{ | |
title: 'Woop', | |
body: 'Woop woop', | |
icon: 'gfx/icon.png' | |
}); |
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
/* Usage: | |
channel.emit('audio:play',message); | |
channel.emit('audio:on'); | |
channel.emit('audio:off'); | |
*/ | |
// Sounds module, used for emitting those annoying bl-up sounds when receiving a message | |
define(['queue','mediator'], function (queue,mediator) { |
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
define({ | |
message: [ | |
[261.63*2,0,50], | |
[261.63*3,0,50], | |
[261.63*4,50,50], | |
[261.63*5,50,50] | |
], | |
person_joined: [ | |
[261.63*3,0,200], | |
[261.63*1,0,200], |
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
<?php | |
$cache_url = 'http://www.yr.no/sted/Sverige/V%C3%A4sternorrland/Johannedal/forecast.xml'; | |
$cache_file = 'cache/weather.dat'; | |
$cache_life = '120'; // Cachetid, sekunder | |
$period_text = Array('Natt','Förm.','Efterm.','Kväll');// Vädret i<period_text> | |
$sym_text = Array( | |
"1" => "Soligt och klart", | |
"2" => "Lätt molnighet", | |
"3" => "Delvis molnigt", |
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
// Measure space usage on axises, we need to do this before drawing anything | |
i = 0; | |
while ((dataset = this.datasets[i++])) { | |
axises = [[this.yAxises[dataset.y.axis],1,2],[this.xAxises[dataset.x.axis],3,0]]; | |
for (j = 0; j < axises.length; j++) { | |
axis = axises[j]; | |
if (!axis[0]._measured) { | |
temp = parseInt(axis[0].font.split(' ')[0]); | |
padding[axis[(axis[0].axis % 2) ? 1 : 2]] += margin + (axis[0].scale?axis[0].majorTickHeight:0) + (axis[0].name?temp:0) + (axis[0].labels?temp:0); | |
axis[0]._measured=true; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>huset.nu</title> | |
<meta charset="utf-8"> | |
<link href="home.png" rel="icon" type="image/x-icon"> | |
<!-- Mobile viewport fix --> |
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
var sqlite3 = require('sqlite3'), | |
config = require('./config.json'), | |
datasource = require('./datasource.js'), | |
util = require('util'); | |
module.exports = { | |
Init: function (callback) { | |
this.queries = Array(); | |
this.queries['create_log_value_table'] = 'CREATE TABLE %s (id INTEGER PRIMARY KEY, value INT, timestamp DATETIME DEFAULT CURRENT_TIMESTAMP)'; | |
this.queries['create_state_value_table'] = 'CREATE TABLE states (id INTEGER PRIMARY KEY, name TEXT, value INT)'; |
OlderNewer