Skip to content

Instantly share code, notes, and snippets.

@urbiworx
urbiworx / gist:2760aa46399b8c58548e
Last active August 29, 2015 14:18
Easy way to create In-Content Editing Slider within Business Catalyst
<div class="bxslider">
<div ice:editable="section" class="slide" style="position: relative;">
<img alt="" width="1200" height="400" src="http://placehold.it/1200x400" ice:editable="image" />
</div>
</div>
<script>
$(document).ready(function(){
if($("bc-skip").length==0){ //not in edit mode, start bxslider
$('.bxslider').bxSlider();
@urbiworx
urbiworx / gist:f813cec2c760bec7cfa9
Created March 14, 2015 11:33
RWE Variable to Switch
[{"id":"6d488ad.f92b774","type":"R-SH Variable","devicetype":"","deviceid":"","name":"","x":427,"y":755,"z":"b9fbcfe.f46043","wires":[["1dece818.e21318"]]},{"id":"1dece818.e21318","type":"R-SH Switch","devicetype":"","deviceid":"","name":"","x":649,"y":755,"z":"b9fbcfe.f46043","wires":[[]]}]
@urbiworx
urbiworx / gist:a5373e84e93830a485e8
Last active August 29, 2015 14:16
Install/Update RWE Smarthome Smarthomemaid
[{"id":"938462ae.6c7ba","type":"exec","command":"echo ","append":"","useSpawn":"","name":"","x":429,"y":752,"z":"1fcb32c8.e034cd","wires":[["c1d3a904.3e2c58"],["c1d3a904.3e2c58"],["c1d3a904.3e2c58"]]},{"id":"7eadd92a.815228","type":"template","name":"","field":"payload","template":"raspberry | sudo -S sh -c \"cd /node-red; npm install node-red-contrib-rsh; service node-red restart;\"","x":267,"y":754,"z":"1fcb32c8.e034cd","wires":[["938462ae.6c7ba"]]},{"id":"e4ebe9e4.1b1418","type":"inject","name":"Install RWE Smarthome","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":103,"y":752,"z":"1fcb32c8.e034cd","wires":[["7eadd92a.815228"]]},{"id":"c1d3a904.3e2c58","type":"debug","name":"","active":true,"console":"false","complete":"false","x":625,"y":750,"z":"1fcb32c8.e034cd","wires":[]}]
@urbiworx
urbiworx / gist:675462f55210d81b5220
Created February 27, 2015 18:43
Set Temperature
[{"id":"9fb3cf76.604c3","type":"R-SH Set","devicetype":"RoomTemperatureActuator","deviceid":"","name":"","x":1168,"y":473,"z":"338df7ff.cc7208","wires":[["75b13ab8.8a4ec4"]]},{"id":"b4a7e209.4b582","type":"inject","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":826,"y":473,"z":"338df7ff.cc7208","wires":[["29c114fa.d63eec"]]},{"id":"75b13ab8.8a4ec4","type":"debug","name":"","active":true,"console":"false","complete":"false","x":1354,"y":469,"z":"338df7ff.cc7208","wires":[]},{"id":"29c114fa.d63eec","type":"function","name":"","func":"msg.payload={\n\tPtTmp:10\n};\nreturn msg;","outputs":1,"x":985,"y":472,"z":"338df7ff.cc7208","wires":[["9fb3cf76.604c3"]]}]
@urbiworx
urbiworx / gist:b405f09aca90be2f3fd4
Created February 26, 2015 18:44
Flow Light On Smarthome
[{"id":"b0297612.4fd688","type":"R-SH Push","devicetype":"SwitchActuator","deviceid":"","name":"licht","x":289,"y":350,"z":"681a559a.97e5ac","wires":[["ec71e07c.138e2"]]},{"id":"ec71e07c.138e2","type":"function","name":"","func":"msg.payload={lighton:msg.payload.IsOn==\"True\"}\nreturn msg;","outputs":1,"x":508,"y":350,"z":"681a559a.97e5ac","wires":[["af041576.50fbe8"]]},{"id":"af041576.50fbe8","type":"freeboard","name":"test","x":734,"y":350,"z":"681a559a.97e5ac","wires":[]}]
@urbiworx
urbiworx / gist:76a5f8c7cf6952eb079e
Created February 21, 2015 10:52
XML Performance Test
[{"id":"3226df99.cdd92","type":"xml-converter","name":"","ignorenamespace":false,"autoinline":false,"multithread":true,"x":489,"y":716,"z":"48e4c7b7.b71b38","wires":[["66440dac.99bbf4"]]},{"id":"f7d2093d.082df8","type":"inject","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":131,"y":738,"z":"48e4c7b7.b71b38","wires":[["f6079827.09f868"]]},{"id":"f6079827.09f868","type":"function","name":"","func":"context.global.count=0;\ncontext.global.time=(new Date()).getTime();\nvar ret=new Array();\nfor (var i=0;i<10000;i++){\nret.push({payload:\n\t\t '<?xml version=\"1.0\"?><catalog> <book id=\"bk101\"> <author>Gambardella, Matthew</author> <title>XML Developer\\'s Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> '+\n\t\t '<description>An in-depth look at creating applications with XML.</description> </book> <book id=\"bk102\"> <author>Ralls, Kim</author> <title>Midnight Rain</title> <genre>Fantasy</genre> <price>5.95</pr