This file contains hidden or 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
//Simulation | |
var world = {gravity: 9.8, intervalTime: 100, verticalLimit: 600, dt: 0.1} | |
function simulation (obj) { | |
var t = 0, top = 0; | |
var interval = setInterval(function () { | |
if(top>world.verticalLimit) clearInterval(interval); | |
top += (world.gravity*obj.mass)*t; | |
obj.el.style.top = top+"px"; | |
t += world.dt; |
This file contains hidden or 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 x = [ {node: "ip2", app: "dbsyncer", containerId: "1234"}, | |
{node: "ip2", app: "logforwa", containerId: "3423"}, | |
{node: "ip4", app: "dbsyncer", containerId: "2213"}, | |
{node: "ip4", app: "logforwa", containerId: "3434"} ] | |
var newObj = {}; | |
x.forEach(function (item) { | |
newObj[item.node] = newObj[item.node] || []; | |
This file contains hidden or 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
#!/bin/bash | |
#You need to enable i2c port | |
#sudo raspi-config | |
# Choose option: (8) Advanced Options | |
# A7 I2C and then enable yes. | |
#sudo reboot | |
#Update and install python rpi | |
sudo apt-get update | |
sudo apt-get dist-upgrade |
NewerOlder